Implementation
Easily set up your action's external webhook in NLX's Dialog Studio
Last updated
Easily set up your action's external webhook in NLX's Dialog Studio
Last updated
Implementation is where you'll set up a static response or external webhook/API for your action. When a conversation is brought to an Action node in an intent flow, the webhook for that action will trigger by sending a POST request to a specified URL and run the process required.
Need more context? See Action node
To access this feature, click the Implementation tab of your action:
External mode is used for integrating with a URL that triggers your action:
Set implementation toggle to External
Select the appropriate HTTP method from the Method dropdown (usually POST for an action)
Expand endpoint section > enter the URL
Use NLX's AWS CloudFormation template provided within the Instructions section
Click Save
Whether you have sensitive data or frequently enter the same URL string, try setting up a parameter in your workspace for enhanced security and efficiency.
Optional setup
Headers: expand section > Click + Add header > Enter the Name and static Value to be sent with the request. Useful for custom headers such as an API key, content type, content length, etc.
Dynamic: Enabling the toggle allows you to view the header and provide it a custom value on the Action node's side panel when triggering the action in an intent flow
Development endpoint: For situations where multiple URLs are used by the environment
Now that your implementation setup is complete, you may move on to configuring your request model.
Static mode is useful for creating a static payload when building demos or for early testing. Switch the implementation's toggle to Static to begin:
Enter your response in JSON structure
Click Save
Now that your implementation setup is complete, you may move on to configuring your request model.
HTTP payloads that are delivered to your action's configured URL endpoint will contain several headers, including:
Header | Value | Description |
---|---|---|
| application/json | The only content type currently supported is JSON. |
| v3 | The version associated with the action configuration. |
| <uuid> | A unique identifier of the bot. |
| <uuid> | A unique identifier of the channel associated with the bot. |
| string | A human friendly label indicating the channel type in use such as |
| <uuid> | A unique identifier of the conversation that triggered this action. |
| <uuid> | A unique identifier that can be used for debugging with the NLU Logs. |
| <uuid> | A unique identifier of the deployment associated with the bot. |
| string | The intent ID from where the action has triggered. |
| string | The bot language code used in the current conversation. |
| string | A user identifier such as a E.164 format phone number, UUID or other formats depending on the channel type. |
The body of the request your webhook will receive may contain the conversation context (nlx_context
) if the send context option is enabled in the action settings. It will always include the properties defined in the action's Request model.
Name | Type | Description |
---|---|---|
| object | The conversation context containing essential values such as the |
| string | A unique identifier of the bot. |
| string | A human friendly label indicating the channel type in use such as |
| string | A unique identifier of the channel associated with the bot. |
| string | A unique identifier of the conversation that triggered this action. |
| string | The bot language code used in the current conversation. |
| string, number or boolean | A set value of a custom context attribute. The attribute name can be an alphanumeric string with dashes and underscores. |
| any | One or more set values corresponding to the schema defined in the action's request model. |
The response body of your action can optionally include the following properties:
Name | Type | Description |
---|---|---|
| object | A map of key value pairs that you would like to be set as context attributes. |
| string, number or boolean | A set value of a custom context attribute. The attribute name can be an alphanumeric string with dashes and underscores. |
For example the response body of an action may look like this: