General Scripting Best Practices
- Be sure to build your script from left to right and from top to bottom:
- Renaming the caption in the Studio actions in your script can make your script much easier to read and follow:
- When using MENU, it is good to have an option to repeat the menu options:
Right-click any Studio action to see the Caption field. Any alphanumeric values you type in this field will display below the action image. In this example, the default HANGUP action will no longer display Hangup; instead, it will display End Call.
In this case, the menu tells the caller to press 1 to be directed to an agent. If the user does not take any action within five seconds, a loop plays a message telling the user to try again, and then the MENU actions plays the options again for the user.
- When looping music, be sure to include the WAIT action to create a pause effect between the music ending and starting again:
In this script, the MUSIC action plays a .wav file to the end. At the end of the .wav file, the WAIT action provides a few seconds before the music starts playing again. Additionally, if you play a message (using the PLAY action instead of the MUSIC action), you will also want to add a WAIT; otherwise, the message will repeat without any pauses, which sounds a bit odd.
- When using a menu, it is best to say the department first and then the number. Contacts are usually listening for the department name and then the number.
- When no agents are available, it is best to have a message that states that your organization is experiencing technical difficulties rather than saying no agents are available. Customers tend to be more forgiving of technical difficulties rather than agents not being available when they should be:
In this example, the highlighted area shows COUNTAGENTS being used to count the number of available agents. The expression in IF (AVAIL>0) enables the script to determine what to do next. If there are more than 0 agents available to take the call (making the expression a true statement), then a MENU will tell them to press 1 to request an agent. If there are not more than 0 agents to take the call (making the expression a false statement), then a PLAY action will play a message that explains to the caller that the company is experiencing technical difficulties (as shown in the Sequence property), and then the script hangs up the call.
- When you use the Prompt Manager to create a sequence, make a copy of the sequence text and add it to the Phrase field so you can easily see what text is being spoken:
- Make sure you end a phone script with the HANGUP action:
In this example, the script places a call, plays a message, and then hangs up. Notice the ONANSWER event that logs the call when a person answers the phone.