Jacada's IA uses a webhook mechanism in order to perform fulfillment for the DialogFlow NLP Engine.

IA Intent Flows are logical, conversation-driven workflows that send and receive the data needed when fulfilling requests for chatbot-based interactions and transactions.

Because key NLP data components are created and maintained in DialogFlow, an Intent Flow uses the webhook to coordinate data flow and provide appropriate real-time responses.

Copy the IA Application Key

You will need your unique NLP Application Key, found in the Admin Console to configure the webhook in DialogFlow:

  1. From the Applications page of the Admin Console click NLP. The NLP Application details page is displayed:

  2. Select and copy the value in the Application Key field. You will need to paste this key value during the next stage of webhook configuration.

Create the Webhook in the DialogFlow NLP Engine

Agent Webhook:
  1. Open DialogFlow and sign in to the relevant Account.
  2. From the DialogFlow main console web page, select the Agent that is associated with your Domain.
  3. Click Fulfillment in the left-side menu. The Fulfillment page is displayed:


  4. At the top of the Webhook section, activate the toggle to Enabled.
  5. In the URL field, enter the URL of the webhook that IA will use to exchange data with the current DialogFlow Agent, for example: https://int.gointeract.io/interact/webhook/apiai.
  6. In the Headers area, enter the key names with associated values for accessing the IA via webhook:
    • Tenant-Id
    • Application-Key
    • Environment-Name
  7. Click Save at the bottom of the page. The Webhooks configuration will be stored for current Agent.

In the next stage, you activate the webhook for each Intent that needs to be accessed by the IA.

Intent Webhook:
  1. From the DialogFlow main console web page, click Intents. The Intents page is displayed.
  2. Click an Intent that requires webhook configuration. The selected Intent Details page is displayed.
  3. Click Events and then Add event. Enter [Intent Name]_Event, where [Intent Name] is the name of the current DialogFlow Intent. (Replace any spaces in the Intent name with the '_' underscore character.)
  4. Near the bottom of the Intent Details page, activate the following checkboxes:


    • Use webhook
    • Use webhook for slot-filling
  5. Click Save at the top of the page. The Webhooks configuration will be stored for current Intent.
  6. Repeat Steps 2-5 for each Intent that needs to be accessed by the IA.

Test the Webhook in the DialogFlow NLP Engine

Note: You'll need to create the related Intent Flow in the IA and assign it to an DialogFlow Intent before you can test webhook execution.

  1. From the DialogFlow main console web page, select the Agent you want to test. On the right side of the page, you'll see the Testing Console:



    The Console simulates how a chatbot will behave when the selected Intent Flow is triggered.
  2. Enter a sample user request in the 'Try it now' text field and press Enter. The Console will display the NLP response as well as Entity parameter values it has parsed from sample request.
  3. Examine and validate the Console reponse. You should be prompted for each required parameter that is missing from your request. (Depending on your sample request, you may need to provide additional text.)
  4. When the webhook is functioning properly, the Console will display the expected final response from the associated Intent Flow when all required parameters have been supplied.

IA Webhook Troubleshooting

If the webhook for a specific Intent Flow is not executing as expected, you can examine application-level messages by viewing the JSON code that is produced while using the DialogFlow Testing Console.

At the bottom of the Testing Console, click on Show JSON to open a window that displays all message data, parameters and responses for the test IA conversation:

 

Revision:

Comments