Trigger Intent Flow
This method simulates triggering a specified Intent Flow and performs the requested actions or variable changes.
A currently active chatbot session for the designated Intent Flow must be specified for the API. You identify the Flow using the Session ID parameter that is returned by the Conversation API at the time the chatbot is started.
For complete details on the Conversation API, contact your Uniphore Support representative.
Invoking the Method Using REST
URL Syntax and Example
http(s)://[host:port/internalPath]/ApplicationName/version/[version]/account/[accountID]/conversation/domains/[ia-domain-name]?sessionID=[sessionID]
https://gointeract.io/interact/version/1/account/12345678/conversation/domains/DCMTelco_Billing?sessionID=62ecbf05-981a-e731-f2af-31812c6d92cf7
The sessionID parameter should contain the value that was provided by the Conversation API at the time the chatbot was started.
HTTP Method
POST
HTTP Headers
Content-Type: application/json;charset=utf-8 Tenant-Id: <account> Application-Key: <public API service application key> Environment-Name: <environment-name>
HTTP Body
The Body can contain chatbot actions or variable assignments, formatted as JSON.
Currently, only the GO_TO_FLOW action is supported by this API.
The variables passed must be available to the specified Intent Flow. Both User and Session Variable types can be used.
Following is a sample Body:
{ "conversationActionDto" : { "actionName":"GO_TO_FLOW", "actionValues": { "flowId":${flow-designer-id} } }, "variables" : { ${varName}: ${varValue} } }
Sample Response
A successful execution will return the following elements, formatted as JSON:
text - Chatbot response for simple text clients (e.g., SMS)
html - Chatbot response for rich UI clients (e.g., web pages)
voice - Chatbot response for voice clients (typically this will become input for a text-to-speech engine)
interactResponse - Detailed information about the specified Flow's status. This is mainly relevant when using a Form.
communicationType - Returns the channel that was used to invoke the API call (i.e., text, voice or rich_ui). The default channel is text.
Following is a complete sample Response:
{ "text": "Which plan do you want to use?", "html": "<p>Which plan do you want to use?<br></p>", "voice": "Which plan do you want to use?", "timestamp": 1623070627025, "interactResponse": { "flowInformation": { "id": "c45bc842655c-cd8z57a24cc00745-b5a6", "name": "change plan" }, "elementResponse": { "page": { "pageNavigation": { "pageReferenceName": "res", "navigationRight": { "buttonState": "NORMAL", "buttonVisible": true, "buttonLabel": "BTN_NEXT", "buttonAction": "server://navigationType?type=NEXT&shouldSendFormData=true" }, "navigationLeft": { "buttonState": "NORMAL", "buttonVisible": true, "buttonLabel": "BTN_BACK", "buttonAction": "local://navigationType?type=BACK_TO_COVER_APP" } }, "pageContent": { "contentSections": [ { "id": "6992f4925aa4-73f68ec9e822d1ee-0859", "sectionHeader": { "id": "6992f4925aa4-73f68ec9e822d1ee-0859", "innerHtml": "Which plan do you want to use?" }, "selectionType": "SINGLE", "sectionNumberOfColumns": 0, "referenceName": "res", "elementType": "IA_RESPONSE_ELEMENT" } ], "allowVerticalScroll": true, "allowHorizonalScroll": false, "time": 0 }, "pageMenu": { "menuVisible": false, "menuButtons": [ { "buttonState": "NORMAL", "buttonVisible": true, "buttonLabel": "BTN_MORE", "buttonAction": "local://CURRENT", "buttonImageName": "icon_more.png" } ] }, "pageNotes": "", "language": "en", "contactUsPage": false } }, "context": { } }, "communicationType": "TEXT" }