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

  1. Click Add Component in the Components panel.

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

  1. Select the Name Parameter 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

  1. Select the Product Parameter 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.

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

  1. Select the Name Parameter in the Components panel and click Add Action in the Conversation panel.

  2. Click Check and stay in the Customer tab 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.

Last updated