Adding an IVR Application for Disruptions
You can use this example disruption IVR to retrieve a list of active disruption events and associated audio prompts or say-as definitions from the database and then play them to the caller. You can find the file used in the example (Example_Disruption_IVR.xml) in the Examples and Templates folder of your Sinch Contact Pro installation..
Principle
In this example, the application asks the caller to enter a value that it then uses to match the WHERE items’ ExternalId fields. If the user does not enter a value, the application returns all active events.
The events are sorted newest first.
Each event’s audio or IVRTalk prompts are played in order WHERE – WHY – WHEN.
After the application has played all active messages, the flow proceeds to state Done. By editing the IVR application, here you can, for example, ask for a new filter value or make it possible to forward the call to customer service.
Definitions
The database function is called by DisruptionEvent.GetActiveEvents(self.CALL, params) in the form GetActiveMessages. The params variable is a Python dictionary that can contain the following items:
Key | Explanation |
---|---|
DisruptionSet | Disruption set’s ExternalId. Mandatory |
WhereFilter |
Search pattern for filtering disruption events. Optional Wildcard characters are the same as in SQL:
|
Language | The language to use for retrieving say as attributes. If not given here, the IVR language is used. |
Procedure
- On the System Configurator main screen, choose .
- In the Basics block, configure the
settings according to the following table.
Table 2. Basic settings of custom IVRs Setting Description Name Enter a descriptive name for the IVR. Description Enter additional information about the IVR. Active To activate the IVR, select this option. Note: Do this only after the IVR application is ready without any errors.Add Custom IVR to Reported Applications To include the IVR application in reporting, select this option. Early Queuing To use early queuing function with the IVR application, select this option. Make sure that there is either the connect element in this IVR to connect the call and end early queuing, or there is the transfer element that takes the call to a queue where early queuing is in use. - In the IVR Numbers block, define the phone number for
this IVR application.
Use one of the numbers reserved for this purpose in
.Note: Make sure you don't use any national emergency number as an IVR, a user, or a queue number. - To import the example file, click Import in the
IVR Application Versions view, and choose
Example_Disruption_IVR.xml. Note: Import notifies you of validation errors, but this is because there are no audio prompts defined in the example VXML.
- Save your entries.
- Make at least the following changes in IVR Editor:
- Assign the correct audio prompts or remove prompts if
they are not necessary.
Audio prompts in the example are:
Form Prompt contents (suggestion) FilterOrAll "Type in your area code ending with #. If you want to hear all active disruption messages, press #." NoMessages "No active messages found" Error "There was an error..." Done "All done!" - Go to form GetActiveMessages and set the correct DisruptionSet ExternalId to the params variable. For more information, see Definitions. No other changes inside forms GetActiveMessages or PlayActiveMessages are needed.
- Go to form SetAreaSelection and modify the search pattern in variable wherefilter depending on the format of the DisruptionItem ExternalId of your installation. Check if the user input digits are valid.
- Assign the correct audio prompts or remove prompts if
they are not necessary.
- Save the IVR application and close the view.
- Active the IVR.