Feedloop AI
  • GETTING STARTED
    • Discover Feedloop AI
    • Authentication
      • Sign Up
      • Login
    • Platform
      • Workspace
      • Project
      • People
      • Usage
  • WHAT IS AGENT
    • What is Agent
      • ⚪Manage Agent
    • Basic Agent
      • ⚪Instruction
        • Who
        • What
      • ⚪Training
        • Rules
        • Example
      • ⚪Skill
        • Knowledge
        • Analys
      • ⚪Style
    • Procedures
    • Advance Reasoning
      • ⚪Creating New Agent
      • ⚪Advance Agent Activation
      • ⚪Deleting Agent
      • ⚪Advance Agent Managing Existing
  • AGENT SETTINGS
    • Instruction
      • Who
      • What
      • Additional Instruction
    • Training
      • Chat Rules
      • Retrieval
      • Answering
    • Context
      • Primitive Context
      • Array
    • Tools
      • Knowledge
      • API - Call
        • Manage API Call
        • Basic Configuration
        • Header
        • Body Field
          • Input Binding
            • Page 2
          • Output Binding
        • Testing API Call
        • Trouble Shooting
        • Example Implementation
          • API Call Covid
      • Data Connector
    • Card
      • Intro & Summary Text
      • Data Visualization Card
      • Analyze Card
    • Procedure Basic Info
      • Activation Condition
      • Goal
      • Action
    • Procedures Interaction
      • Procedures Step
      • Procedures Context
      • Procedures Tools
  • AGENT UTILITY
    • Resource
      • Document PDF
        • Preparing your PDF
      • Data Connector
        • Create new data connector
        • Configure dataset, table, and column
        • Using Data Playground
        • Dataset in Data Playground
        • Training in Data Playground
        • SQL generation and modification
        • SQL Execution
    • Apps
      • Chat Widget
      • Web App
    • Testing
    • Monitoring
      • Customer Chat
      • Context
      • Document
  • TASK
    • ⚪Image Analyzer
      • Building Analyzer
      • ID Identifier
    • ⚪Document Analyzer
      • Contractual Document Analyzer
    • ⚪Database Analyzer
    • ⚪Additional Solution
      • Text Sentiment Analyzer
      • Customer Complaint Analyzer
  • For Developer
    • API Chat
      • Chat Initialization
      • Chat Message
      • Chat History
      • Error Handling
    • Embed Widget
      • Embedding the Widget
      • Identity Attributes
      • Widget Attribute Details
Powered by GitBook
On this page
  • Input Binding Overview
  • Configuring Variables
  • Configuring Payload Constructor
  1. AGENT SETTINGS
  2. Tools
  3. API - Call
  4. Body Field

Input Binding

PreviousBody FieldNextPage 2

Last updated 6 months ago

This section explains how to configure the Input Binding options for Variables and the Payload Constructor when setting up an API call. By properly configuring these elements, your API requests will include dynamic data derived from the conversation or procedure context.


Input Binding Overview

The Input Binding section allows you to define the data that will be dynamically bound to your API requests. There are two key options for binding data:

  1. Variables

  2. Payload Constructor

These options ensure that your API requests include real-time, dynamic data based on user interactions or system-generated values.

Configuring Variables

Purpose:

  • Variables are placeholders that dynamically pull data from the conversation or procedure context. These represent real-time values (e.g., user ID, purchase date) that change based on user input or system events.

How to Configure Variables:

Build Variables in Context

  1. Open the Input Binding Section:

    • In the API Call configuration screen, scroll down to the Input Binding section.

  2. Select Variables:

    • From the dropdown, select Variables as the input binding option

Choose Variables from the Global Context or Conversation Context:

  • Global Context: Refers to data that is stored at the agent level and can be used across different procedures or conversations.

  • Conversation Context: Refers to data that is gathered during the specific conversation or interaction.

  1. Select Specific Variables:

    • Check the boxes next to the variables that you want to include in the API request.

  2. Dynamic Binding:

    • These variables will be dynamically inserted into the API request. For example, if you bind the userid variable, the request will include the actual user ID value that was provided during the conversation.

Example Configuration for Variables:

If the conversation involves gathering user data to retrieve customer details, you might configure the following:

  • Variables: userid, nama_lengkap, nomor_telepon

These variables will automatically be filled with the user’s input and sent with the API request

Configuring Payload Constructor

Purpose:

  • The Payload Constructor allows you to structure the data that will be sent in the body of the API request. It maps the variables from the local procedure or global context to the correct fields in the API request payload.This way, when the request is sent, it includes the relevant data to complete the transaction or query. You would map these context variables to the appropriate fields in in the Payload Constructor to ensure that each request contains the correct.

How to Configure the Payload Constructor:

  1. Select the Payload Constructor Option:

    • In the Input Binding section, select Payload Constructor from the dropdown.

  2. Define the Payload Structure:

    • The payload should be formatted as a JSON object or other structured format required by the API. You will use variables from the local procedure context to fill the relevant fields.

  3. Mapping Variables to the Payload:

    • Inside the payload constructor, map the conversation or procedure variables to the API fields. This ensures that the dynamic data from the current interaction or procedure is correctly formatted for the API request.

  4. Example Payload Structure: Here’s how you might configure a payload for submitting a claim:

{
  "userid": "{{{userid}}}",
  "kode_barang": "{{{kode_barang}}}",
  "tanggal_pembelian": "{{{tanggal_pembelian}}}"
}
  • userid: Pulls the unique user ID.

  • kode_barang: Pulls the product code.

  • tanggal_pembelian: Pulls the purchase date.

For example, if the system needs to send a claim request, the user_id, tanggal_pembelian, and kode_barang can be dynamically bound to the request payload.

  1. Payload Auto-Binding:

    • The variables will dynamically bind to the payload when the API call is made. The values will be pulled from the local procedure context to ensure they reflect the real-time inputs of the current procedure.

Context
Input Binding Section
Variables from context
Select Specific Variables
Example Variables
Input in Payload Constructor