Dynamic Values
Overview
Dynamic Values can be used throughout OCP® in several locations. They are dynamic because their value is determined at runtime, based on the caller input and the call flow. They can be used in the following fields:
User Functions
OCP Variables
Orchestrator input fields
To use a dynamic value, enclose its name in double curly brackets, like this:{{"dynamic_value_name"}}
Dynamic Values for Conditions
You have the option to set up dynamic values and fields in the conditions section, using JS functions, that will work for any condition field (either in Intent Disambiguations, Intent Confirmations or Announcements)
To set dynamic conditions follow these steps.
Create a Function in User Function tab, for example myDummyKeyFunction and set a JS code for it.
Create a Condition with an edited name, for example dummyJson, for which you set the Function name as the path value.
Select an operator and the required values that should meet the condition.
Dynamic values for Yes/No Intent disambiguation
You have the option to add a dynamic value for Yes/No disambiguations. In this way you can create values either in OCP variables or in User Functions that can be used as return intents for Yes or No answers.
OCP Variables Example
Create the required OCP variables in Environments Manager.
Click the edit button
in the Intent value box and add the corresponding variables in the form
{{ocpvars:variable_name}}
.In this case Yes will lead to Overdraft-Miscellaneous intent and No to Overdraft-Balance intent.
User Function Example
Create the corresponding User Functions
Click the edit button
in the Intent box and add the corresponding functions as
{{Function_name}}
.In a similar way Yes will lead to Overdraft-Miscellaneous intent and No to Overdraft-Balance intent.