Question Variations
Can Real-Time Routing webooks capture nested variables from the Response body?
How do I capture nested variables in a Real-Time Routing webhook?
Applies To
Real-Time Routing webhook
Answer
Real-time routing webhooks can capture variables in the response body, but the response body must be in JSON format.
Here's an example demonstrating how the variable was successfully captured and assigned to a marketing data field. This can be used downstream for purposes like reporting or routing within your IVR, provided a Marketing Data field is available.
- Configure the Real-Time Routing webhook
- Test your Real-Time Routing webhook to make sure you get a successful response. Here is an example of the nested JSON response.
- Navigate back to the 'Configuration' tab in your Real-Time Routing webhook and select the 'Data Mapping' sub-tab
- In the 'Webhook Response Field,' parse the JSON string to extract the correct value. This field serves as the key that Invoca uses to locate the value in the response received from the webhook endpoint. Invoca will then store this value in the Marketing Data Field you specify. In this example, the number value is nested so the input for this field is action.parameters.user_parameters.number
- In the 'Marketing Data Field' input section, search and select the Marketing Data Field that you would like to map the value to.
- Once you have everything configured, select Save.
Additional Information
Nested variables are not supported in XML format.