LogoLogo
  • GETTING STARTED
    • Welcome to the NLX platform
    • How NLX works
    • Guides
      • Analytics dashboard
      • Chat
      • Generative Journey (Slots)
      • Model Context Protocol
      • Voice
      • Voice+
      • Touchpoint components
        • Carousel modality
        • Video modality
    • Terms & concepts
    • Generative AI
    • Developer
  • Build
    • Workspace setup
    • Flows
      • Intro to flows & variables
      • The Canvas
      • Flow settings
      • Nodes
      • Flow appearance
    • Resources
      • Actions
        • Implementation
        • Request model
      • Analytics tags
      • Context variables
      • Data requests
        • Implementation
        • Response model
        • Request model
      • Knowledge bases
        • Ingest content
        • Add metadata (beta)
        • Apply KB
      • Lifecycle hooks
        • Implementation
      • Modalities
      • Secrets
      • Slots (custom)
        • Adding values
        • Translating slots
      • Voice+ scripts
        • Add + download script
        • Deploy script + install SDK
        • Create Voice+ flow
    • Integrations
      • Channels
        • Alexa
        • Amazon Chime SDK
        • Amazon Connect
        • AWS End User Messaging SMS
        • AWS End User Messaging Social
        • Bandwidth
        • Genesys
        • Twilio
        • Zendesk Sunshine
      • LLM services
        • Amazon Bedrock
        • Anthropic
        • Azure OpenAI
        • Cerebras
        • Cohere
        • Google Vertex AI
        • Groq
        • NVIDIA
        • OpenAI
        • xAI
      • NLP
        • Amazon Lex
        • Google Dialogflow
        • Google Dialogflow CX
        • Custom NLP
    • Translations
  • Test & Deploy
    • Applications
      • Attach flows
      • Assign default behavior
      • Add channels
        • API
          • REST API
        • Alexa
        • Amazon Chime SDK
        • Amazon Connect
        • AWS End User Messaging SMS
        • AWS End User Messaging Social
        • Genesys
        • Genesys SMS
        • Messenger
        • Microsoft Teams
        • Slack
        • SMS via Bandwidth
        • Twilio SMS
        • Twilio Voice
        • WhatsApp via Twilio
        • Zendesk Sunshine
      • Deploy
      • Optional: Set lifecycle
      • Optional: Set languages
    • Test
      • Test a conversation
      • Automated tests
      • Test an external integration
  • Analyze
    • Conversations
    • Analytics
      • Creating dashboards
      • Formulas & multi-metrics
      • Canvas analytics
    • Training
  • Workspace Settings
    • Escalation channels
    • Resource tags
    • Audit
  • Admin
    • Access control
      • Roles & permissions
    • Notifications
    • FAQ
    • Contact support
Powered by GitBook
On this page
  • What's the Implementation of a Data request?
  • External implementation
  • Static response
  • Production and Development environments
  • API spec
  1. Build
  2. Resources
  3. Data requests

Implementation

Set up a static or external response for your data request in your NLX workspace

Last updated 2 days ago

What's the Implementation of a Data request?

A Data request's Implementation is where you'll set up a static response or external integration for your Data request. When a user arrives at a in a flow, it triggers the static response or HTTP method for engaging with your data.

Once invoked using a Data request node in your flow, information from your data source can then be relayed in messaging or used in conditional logic in subsequent nodes of the flow.


External implementation

External mode is used when data is hosted externally and can be reached through API:

  • Set the implementation toggle to External

  • Select the appropriate HTTP method from the Method dropdown

  • Expand endpoint section > Enter the URL

  • Use NLX's AWS CloudFormation template provided within the Instructions section

  • Click Save

Optional:

  • 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.

  • 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 and/or response models.


Static response

Static mode is used in cases where the response is unchanging, which may be particularly useful for building demos or for early testing. Switch the implementation's toggle to Static to begin:

  • Enter the data array or objects in JSON structure

  • Click Save

Now that your implementation setup is complete, you may move on to configuring your request and/or response models.


Production and Development environments

Data requests can be configured with two different endpoints to allow for better flexibility and control during testing and development of your applications. Either setup allows you to change the URL, URL parameters, and Headers for each:

To swap from Production to Development environment while testing in your NLX workspace, select the settings gear from your Test widget and choose Development in the Environment dropdown:


API spec

HTTP payloads that are delivered to your Data request's configured URL endpoint contain several headers, including:

Header
Value
Description

Content-Type

application/json

The only content type currently supported is JSON

nlx-webhook-version

v3

The version associated with the data request configuration

x-nlx-botId

<uuid>

A unique identifier of an application

x-nlx-channelId

<uuid>

A unique identifier of the channel associated with an application

x-nlx-channelType

string

A human friendly label indicating the channel type in use such as API, AmazonChime or Genesys

x-nlx-conversationId

<uuid>

A unique identifier of the conversation that triggered this data request

x-nlx-correlationId

<uuid>

A unique identifier that can be used for debugging

x-nlx-deploymentKey

<uuid>

A unique identifier of the deployment associated with the application

x-nlx-intentId

string

The intent ID from where the data request has triggered

x-nlx-languageCode

string

x-nlx-userId

string

A user identifier such as a E.164 format phone number, UUID or other formats depending on the channel type.

Name
Type
Description

nlx_context

object

nlx_context.botId

string

A unique identifier of the application

nlx_context.channelType

string

A human friendly label indicating the channel type in use such as API, AmazonChime or Genesys

nlx_context.channelId

string

A unique identifier of the channel associated with the application

nlx_context.conversationId

string

A unique identifier of the conversation that triggered this data request

nlx_context.languageCode

string

nlx_context.<attributeName>

string, number or boolean

A set value of a custom context attribute. The attribute name can be an alphanumeric string with dashes and underscores

<propertyName>

any

Name
Type
Description

context

object

A map of key value pairs that you would like to be set as context attributes

context.<attributeName>

string, number or boolean

A set value of a custom context attribute. The attribute name can be an alphanumeric string with dashes and underscores

<propertyName>

any

For example, the response body of a Data request may look like this:

{
    "Profile": {
        "FirstName": "Alice",
        "Preferences": ["window seat", "aisle seat"]
    }
}

Whether you have sensitive data or frequently enter the same URL string, try setting up a in your workspace for enhanced security and efficiency.

Dynamic: Enabling the toggle allows you to view the header and provide it a custom value on the side panel when referencing information from a Data request in a flow

Production: The endpoint called in deployed applications when a is hit during conversation where this request is assigned

Development: Optional endpoint that can be called when in NLX

The application's used in the current conversation

The body of the request your API receives may contain the conversation context (nlx_context) if the send context option is enabled in the data request settings. It will always include the properties defined in the Data request's .

The conversation context containing essential values such as the conversationId and any that have been set up to this point in the conversation

The application's used in the current conversation

One or more set values corresponding to the schema defined in the data request's

The response body of your Data request should include the properties defined by the . Optionally, it can include the context object:

One or more set values corresponding to the schema defined in the data request's

Secret
testing conversations or flows
request model
request model
response model
response model
Data request node's
Data request node
Data request node
language code
language code
Implementation tab of a Data request
Configure environments while testing conversations or flows
context variables