How do I dynamically select the announcement to play to each caller?

If enabled for your account, you can customize the announcement or announcements that a Data Announcer applet plays to each caller. The Data Announcer uses a value or values in a data source to identify the audio file or files to play.

To configure this feature, perform the following tasks:

  1. Ensure that you have a data source that contains the appropriate value or values available to the Data Announcer. The value or values in the data source must match (including the case) the file name or names of the appropriate audio file or files; multiple values must be comma-separated. You can also use relative paths rather than just file names if the audio file is stored within a folder.
  2. In the same interaction plan as your data source, create a Data Announcer applet.
    In Announcement Type, select Audio File. In Announce From, select the data source that contains the required value or values. For more information about the Data Announcer applet, see Data Announcer applet.

The Data Announcer applet uses the value or values in the specified data source, plus settings configured for the current node, to build the URL or URLs of an audio file or files to play. If the data source contains a comma-separated list of values, the Data Announcer looks for and plays all corresponding audio files in the order in which they appear. If the audio file or any of the audio files do not exist, the Data Announcer plays no audio and routes the call to the applet specified in the Next Applet on Failure field.

A Data Retriever applet retrieves the caller's closest pizza restaurant and the restaurant's opening hours from the appropriate interface. The applet stores these values in a Data Source called PizzaPlaceDetails. The Data Announcer then builds the audio files' URLs from the following values:

  • The base URL of the announcement, for example, https://nvm.announcements.net.
  • The ID of the current Contact World account, for example, 111 which is the ID for the HouseOfPizza account. Contact support if you do not know your account ID.
  • The value or values that the Data Retriever applet retrieved and stored in PizzaPlaceDetails, for example, "Location/Basingstoke","Monday_Sunday_1100_2300".
  • The file extension, ".wav"

The Data Announcer looks for and plays the following audio files:

https://nvm.announcements.net/111/Location/Basingstoke.wav and https://nvm.announcements.net/111/Monday_Sunday_1100_2300.wav.