Parameter Bundles
By having a Parameter bundle, you can set up Parameters. Parameters are values that must be provided to obtain the result for the query. They can be set as required or optional, and the AI will only c
Before you begin
This tutorial requires a webhook setup. Add a test webhook URL to your webhook settings.
http://mock-webhook.mind.aiThis tutorial requires two entity types for the Parameter setups. Add regex entity types "Account Number" and "MSISDN" in Knowledge.
Account Number
Regex Pattern Block 1
REGEX PATTERN ^[0-9]{8}$
DESCRIPTION 8 digits
MSISDN
Regex Pattern Block 1
REGEX PATTERN [nN]?[fF] ?[0-9] ?[0-9] ?[0-9] ?[0-9] ?[0-9] ? [0-9] ?[0-9]
DESCRIPTION 9 digits: 1st digit can be n or N, 2nd digit can be f or F
Regex Pattern Block 2
REGEX PATTERN [1,2,3,6,8,9] ?[0-9] ?[0-9] ?[0-9] ?[0-9] ?[0-9] ?[0-9]
DESCRIPTION 7 digits: 1st digit can be 1,2,3,6,8,9
Regex Pattern Block 3
REGEX PATTERN [1,2,3,6,8,9] ?[0-9] ?[0-9] ?[0-9] ?[0-9] ?[0-9] ?[0-9] ?[0-9]
DESCRIPTION 8 digits: 1st digit can be 1,2,3,6,8,9
Regex Pattern Block 4
REGEX PATTERN [0,1,2,6,8,9]-?[0-9]-?[0-9]-?[0-9]-?[0-9]-?[0-9]-?[0-9]-?[0-9]-?[0-9](-?[0-9A-Za-z])?
DESCRIPTION 10 digits with " - " in between of each digit
Regex Pattern Block 5
REGEX PATTERN [0,1,2,6,8,9] ?[0-9] ?[0-9] ?[0-9] ?[0-9] ?[0-9] ?[0-9] ?[0-9] ?[0-9]( ?[0-9A-Za-z])?
DESCRIPTION 10 digits: 1st digit can be 0,1,2,6,8,9 and last digit can be 0-9, A-Z, a-z)
Add Parameter Bundle
Add a Parameter Bundle to set up each Parameter.
Click Add Component in the Components panel.
Click Parameter Bundle.

3. In the popup, enter Parameter Bundle name as "Verify" and Parameter names as "Name", "Product", and "Phone Number".
4. Deselect the Required checkboxes of Phone Number Parameter as they are optional.
5. Click Add.

Set up Parameters
To start setting up a Parameter, see if the Parameter is required or optional first. As mentioned above, optional Parameters are not invoked by default. For optional Parameters, you can set a Binding Expression which is a JSONPath expression to extract a default value from the conversation context, which is most likely a return value from a webhook. You can also set a Default Value, which is the specific value of the Parameter. If the customer gives another value, the Parameter is overwritten with the value provided by the customer. Also, check if the Parameter value is single or compound. A single value means the Parameter has only one entity as a value, while a compound value possibly includes multiple entities. Compound value Parameters need Designator. Key Path to indicate the specific value to use among the values. If the value that you want to extract is in the collection, write a chain of keys without specifying the location inside the collection.
To collect the Selection Term or Query Statement, you need to set up the Selection Class with Check. Only one Check action can be added to a Selection Class. Check allows you to get the Selection Term or Query Statement from the customer, system, or both.
For Single Value
Select the
NameParameter in the Components panel to set it up.

2. In the Component Settings panel, stay in the Single Value tab.
3. Enter "Name" for Local Binding Key. This key will be used locally in the current Subject and store the Parameter value.
4. You can optionally enter the data source, which is a collection of objects where data is extracted via the key list. This case doesn't require the data source.
5. Set up the entity type to determine the data type of Parameter as "Any Entity" in System Entities.
6. Click Save.

For Compound Value
Select the
ProductParameter in the Components panel to set it up.

2. In the Component Settings panel, select the Compound Value tab.
3. Enter "Product" for Local Binding Key. This key will be used locally in the current Subject and store the Parameter value.
4. You can optionally enter the data source, which is a collection of objects where data is extracted via the key list. This case doesn't require the data source.
5. Set up the entity type to determine the data type of Parameter as "Account Number" in My Entities. Compound Parameters can have multiple entity types.
6. You can optionally enter Designator. Key Path, which is the chain of keys indicating the specific value to refer to. Enter Designator. Key Path as "$.mind-visions.id".
7. Click Save.

For Single Value
Select the
Phone NumberParameter in the Components panel to set it up.

2. In the Component Settings panel, stay in the Single Value tab.
3. Enter "PhoneNumber" for Local Binding Key. This key will be used locally in the current Subject and store the Parameter value.
4. You can optionally enter the data source, which is a collection of objects where data is extracted via the key list. This case doesn't require the data source.
5. Set up the entity type to determine the data type of Parameter as "MSISDN" in My Entities.
6. You can optionally enter Binding Expression, which is a JSONPath expression to extract a value from the conversation context when the Parameter isn’t called out by the customer, or enter Default Value, which is a preset value when the Parameter isn’t called out by the customer. This case doesn't require a default value.
7. Click Save.

Collect Parameter Value
To collect the Parameter value, you need to set up a Check action to the Parameter. Check allows you to get the Parameter value from the customer, or both customer and system.
Check with customer is a way to prompt the customer to get the value. This is an example in a Verify customer Subject to get the Name Parameter value from the customer.
CONVERSATION PREVIEW

Select the
NameParameter in the Components panel and click Add Action in the Conversation panel.Click Check and stay in the
Customertab in the Action Settings panel.

3. You can optionally enter an instruction to be displayed before the prompt in the Action Settings panel. This can be an instruction for the customer to follow or additional information. This form can include Mustache template language. Enter the message as below.
Let me verify your name.4. Enter the prompt to the customer as "What is your full name?".
5. Select the number of max prompt attempts which is how many times the prompts will be repeated in case of not getting the expected response.
6. Click Save.

When the Check action is set up, the expected customer response will be shown with the binding key.

Check with customer using webhook is a way to prompt the customer to get the value. This is an example in a Verify customer Subject to get the Product Parameter value from the customer using a webhook.
CONVERSATION PREVIEW

Select the
ProductParameter in the Components panel and click Add Action in the Conversation panel.Click Check and select the
Combinedtab in the Action Settings panel.

3. Choose a webhook URL http://mock-webhook.mind.ai to use from the dropdown and enter URL Parameter (domain path and/or query string) as tutorial/tv-account?code=200&out=m.
Webhook URL (Method: GET)
BASE URL http://mock-webhook.mind.ai
URL PARAMETER tutorial/tv-account?code=200&out=m
Response Body
{
"mind-visions-quantity": "multiple",
"mind-visions": [
{
"name": "Mind Vision",
"id": "92741023",
"etc": "Mind Economy Package",
"desc": "Mind Economy Package with 120 channels"
},
{
"name": "Mind Vision",
"id": "91244132",
"etc": "Mind Sports Extra Package",
"desc": "Mind Sports Extra Package with 180 channels"
},
{
"name": "Mind Vision",
"id": "72364018",
"etc": "Mind Movie Lover Package",
"desc": "Mind Movie Lover Package with 250 channels"
}
]
}4. Select the request method as GET.
5. Select an error message display method as Template and select an action as Terminate to take in case of HTTP 400. If Passthrough is selected, the webhook response will be displayed without modification.
6. Enter an error message that will be displayed to the customer.
Sorry, I am terminating the session.7. Decide if you want to escalate the session by turning the Escalate on Termination toggle on or off. It will send the entire chat script to your backend system upon the termination. To turn on the escalation, you need to have an escalation webhook set up in the Scope.
8. Optionally, you can enter Key and JSONPath pairings for Result Mapping. Enter Key and JSONPath pairing as below.
Result Mapping Pair 1
KEY mind-visions
JSONPATH $.mind-visions
9. You can optionally enter an instruction to be displayed before the prompt in the Action Settings panel. Enter the instruction as below.
Account List:
{{#mind-visions}}
{{name}}: ({{id}})
{{/mind-visions}}10. Enter the prompt to the customer as "Which account do you want to continue with?"
11. Select the number of max prompt attempts which is how many times the prompts will be repeated in case of not getting the expected response.
12. Click Save.

When the Check action is set up, the expected customer response will be shown with the binding key.

Last updated
Was this helpful?