Limitations
Only the following Endpoints support the inject and notify API requests:- Facebook (Meta) Messenger
- LINE Messenger
- Azure Bot Services
- RingCentral Engage
- Slack
- Socket
- Sunshine Conversations
- Voice Gateway
- AudioCodes
- Webchat
- Webhook
Inject
An inject API request sends text and data from an external service to a Flow. This approach allows you to convert them into complex information, for example, into lists and galleries, and then send it to the user through the Endpoint. You can send a simple message to your Flow, for example,makeList, along with the data from an external API request, and use the Nodes in the Flow to recognize the message and send a list to the user with information from an external API.
Notify
A notify API request sends text or data to the user through the Endpoint. With this approach, the user receives the text or data from the external API without any additional Flow logic.How to Use Inject and Notify
You can use the HTTP Request Node or Code Node to trigger external processes through the Cognigy.AI API and pass the necessary data to the inject and notify API requests in addition to the specific external payload.Inject and Notify API URLs
For the inject and notify API methods, use the Endpoint service for the API URL. You can find your Endpoint URL and URL token in the Endpoint settings under the Endpoint URL field or Config URL field, for Webchat Endpoints. The API routes are:- Notify:
{EndpointURL}/notify/{URLToken} - Inject:
{EndpointURL}/inject/{URLToken}
https://endpoint-trial.cognigy.ai/4e5e2f01110c935fff81ec54bbce12c175b831d8105dc69face36a8983feec17, the base URL is https://endpoint-trial.cognigy.ai and URL token is 4e5e2f01110c935fff81ec54bbce12c175b831d8105dc69face36a8983feec17. In this case, the API routes are:
- Notify:
https://endpoint-trial.cognigy.ai/notify/4e5e2f01110c935fff81ec54bbce12c175b831d8105dc69face36a8983feec17 - Inject:
https://endpoint-trial.cognigy.ai/inject/4e5e2f01110c935fff81ec54bbce12c175b831d8105dc69face36a8983feec17
Payload
You can retrieve the necessary data for the inject and notify payload from the Input object with CognigyScript, as follows:| Payload Parameter | CognigyScript |
|---|---|
| text | ci.text |
| data | ci.data |
| sessionId | ci.sessionId |
| userId | ci.userId |
| URLToken | ci.URLToken |