JSON IVR Design (deprecated)
The supported way to create and edit IVRs is by using the IVR designer. See Set Up IVR
Creating the flow of an IVR can be done in JSON. There are 8 call states that either trigger the flow or perform an action:
State
Description
Root
Triggers the flow
DataDip
Routing based on data dip.
CallAction
Transfers or ends the call
PlayPrompt
Plays audio prompt
ListenToTone
Play Prompt (optional) and Listen for (DTMF) Tone State
MultiTone
Listens for DTMF until the # and stores it into a variable
Regex
Performs a regex match
TextToSpeech
Plays text
BusinessHours
Routing based on business hour set
HolidayHours
Routing based on holiday hours set
Each flow begins with the code below. States will need to be added in the appropriate location.
Each flow begins with the Root State which triggers the flow when there is an incoming call.
There can be multiple of the same call states which perform different actions.
Each instance of a state has a unique SID.
The "next" property specifies the SID of next state that will perform the next action. Some states do not require a next action, e.g. Call Action. In this instance the next property will be "null" because the call has either ended or has been transferred.
Commas will need to be added between each state (included in the code examples below). Remove the comma following the last state.
The Description and Event properties can be edited with any text as a description or set as null.
The Name property can be edited with any text, but should not be null.
Variables can be created and referenced in states.
Default variables are CallerNumber, CallerName, and ScenarioId.
Variables are case sensitive.
Only DataDip and MultiTone states can create new variables. The names of the variables created by these states are prefixed by the state name followed by _result, e.g. AccountNumber_result.
Example Code Root State:
Explanation: When there is an incoming call, the next action will be the state with SID 2
Example Code Data Dip State:
If InputParameterNames property is null, the body of the post will include the caller name, caller number, Scenario ID, and IVR name. If variables are specified, only the contents of those variables will be included in the body of the post.
Explanation: A HTTP post is sent to the URL. A Microsoft Flow is triggered by the HTTP post. A decision is made by the Power Automate Flow and the returned response will be stored in the "datadip_result" variable. See IVR Data Dip Power Automate Flow Configuration. The next action will be the state with SID 3.
Example Code Call Action State:
ActionToTakeType values:
0 = TransferToInteractionObject
1 = TransferToUser
2 = TransferToVoicemail
3 = EndCall
If transferring, use the ActionTargetId to specify target Object ID of either a user or a resource account associated with a Landis queue or IVR.
Explanation: Disconnect Call.
Example Code Play Prompt State:
Explanation: The audio file will play that is located at the prompt Uri specified. The next action will be the state with SID 5.
Example Code Play Prompt (optional) and Listen for (DTMF) Tone State:
The state will listen for a tone while and after a prompt is played.
Prompt URI Values
URI
null (no prompt)
Repeat URI Values
URI
DoNotPlay (no prompt. Will skip the next timeout period.)
null (replays prompt URI or plays default prompt if prompt URI is null)
CannotConnect URI Values (Plays only if TimeoutNextID is null)
URI
DoNotPlay (no prompt)
null (plays default prompt)
TimeoutNextId
Next SID Number
null
NumberOfRepeats
0-1000
RepeatWaitTimeSeconds
0-1000
If the TimeoutNextID is null, the CannotConnectUri will be played before the call is automatically disconnected.
The prompt, repeat, or cannot connect URI can be found by opening the audio prompt in contact center | more button (...) on the audio player | copy audio URL.
Tone Type Values:
Tone0 = 0
Tone1 = 1
Tone2 = 2
Tone3 = 3
Tone4 = 4
Tone5 = 5
Tone6 = 6
Tone7 = 7
Tone8 = 8
Tone9 = 9
Star = 10
Pound = 11
Explanation: Audio prompt is played. After 10 seconds the repeat prompt is played if no buttons are pressed . After another 10 seconds the next action will automatically be SID 12 if no buttons are pressed. If 0 is pressed at anytime, the next action will be SID 6. If 1 is pressed, the next action will be SID 7.
Example Code MultiTone State:
Explanation: State will collect DTMF digits until the pound key is pressed and store the digits in a variable named GatherAccountNumber_result. Next state is SID 8.
Example Code Regex State:
Explanation: State will match variable "CallerNumber" with regex specified. If number matches, the next state will be SID 9. If not matching, SID 10.
Example Code Text To Speech:
Explanation: State will play the contents of the Text property. Next state is SID 11.
Example Code Business Hours:
Edit the desired business hours set: Configuration | Business hours Sets. Capture the business hours ID (number) at the end of the URL. Use this number for the BusinessHoursID property. The example below is 1.
Example: https://cc.landis.cloud/app/configuration/businesshourssets/edit/1
The proper Timezone text can be found in Administration | Settings | Timezone
Action Type Values
During Business Hours = null
Default Off = 0
Lunch = 1
Break = 2
Emergency = 3
Custom1 = 4
Custom2 = 5
Custom3 = 6
Custom4 = 7
Custom5 = 8
Custom6 = 9
Explanation: Business hours set with ID "1" will be observed using Eastern Standard Time. On hours next state is 17. DefaultOff action next state is 18. Lunch action next state is 19. Break action next state is 20. Emergency action next state is 21. Custom1 action next state is 22.
Last updated