Send Query

Api.ai enables programmers to add speech interface to apps and devices, allowing them to understand and perform verbal requests. This action lets you fire a query on your Api.ai database to retrieve corresponding results. To achieve this, add this action to your canvas and configure it. Select the appropriate connection for Api.ai from the drop-down list. If you haven’t created a connection yet, select ‘Add New’ to create one. 

Field data

Session ID (Mandatory): Enter a unique token to identify the client and manage the session. This token can consist of up to 36 symbols. 

Language (Mandatory): Specify the language to be used for the query to be posted. 

Query (Mandatory): Enter the query that you wish to process in plain text. E.g., if you wish to retrieve the records of a specific intent created in Api.ai, you will need  to enter the name of that intent as an input for this field. The query length should not be more than 255 characters.  

You can add multiple queries by clicking on the ‘+ADD’ link. 

Context_Key (Optional): Enter the key name of the additional context object that you wish to include. 

Context_Value (Optional): Enter the value for the specified context key. You can add multiple context keys by clicking on '+ADD' link.

Entity (Optional): Enter the array of entities that you wish to replace with the developer defined entities. You can add multiple entities by clicking on the '+ADD' link. 

Reset Contexts (Mandatory): Specify if you wish to reset current contexts of the session before setting the new contexts. Available options are 'True' and 'False'. By default, the value for this field is set to 'False'.

Time Zone (Optional): Enter the time zone. 

Location_Latitude (Optional): Enter the latitude.

Location_Longitude (Optional): Enter the longitude.

Once you have entered all the details, click on 'Done' and 'Run' the workflow. This will fire the specified query on Api.ai database and will retrieve the corresponding results. 

1-send-query



Output:
  • output-arrow api-ai-128 Send Query
    • left-triangle id string
    • left-triangle timestamp string
    • left-triangle result object
    • left-triangle status object