Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This document will brief you on how to use the URL Params and queries in your Experience Designer flows.

You can use the params and queries passed from the chatbot URL to customize your flow in the Experience Designer.

For example, you can initiate the flow studio based on the flowId passed in the chatbot URL.

Defining a query parameter

The query params used in the chatbot URL will be available at msg.req.query.<queryparam>

In the Bot In Parser of the Bot Provider V2 Node, you should assign the fetched Query to the originalRequest object.

In this example, we are assigning the obtained flowId to the originalRequest object.

msg.payload.originalRequest.data.flowId=msg.req.query.flowId;

Using the query

You can then obtain the Query in the msg object at msg.payload.originalDetectIntentRequest.payload.flowId

In this example, we will assign the flowId to msg.payload.flowId in the function node connected to the Flow Manager node in the Experience Designer.

Invoking the Chatbot with the query parameter

You can add the query parameter to the Chatbot URL.

https://<domain-name>.orbita.cloud:8443/oeapi/<ChatbotURI>?<queryparameter>=<data>

In this example, you can use the https://<domain-name>.orbita.cloud:8443/oeapi/bot/url-params?flowId=5fe082b28e97c439b7206355

Sample flow

After importing the attached flow, you have to paste the below code in the Bot In Parser of Bot Provider V2 node.

msg.payload.originalRequest.data.flowId=msg.req.query.flowId;

Related Articles

  • No labels