To set up an alternative greeting for a repeat call to a client, follow these steps:
- Go to the Bot Scripts section in the personal account.
- Open the desired script in the editor. If you don't have a script, create a new one.
- Set the Condition block.
- Set as many Information blocks as there are alternative greeting phrases.
- Enter the greeting phrases in the Message field of the Information block.
- Draw arrows from the Condition block to the Information blocks.
- Click on the arrow and specify the following parameters:
- Type: Condition "AND".
- Condition: {resultNumber} = 0.
The {resultNumber} variable returns the number of successful calls to the candidate within the call task.
- For all subsequent arrows, except the last one, add +1 to the condition. Thus, the second arrow will have the condition {resultNumber} = 1, the third one — {resultNumber} = 2, and so on.
- Specify the Default type in the last arrow. If the number of calls exceeds the number of greetings, the bot will follow this branch.
- Save the script.
Test the script using outgoing calls or in the script editor. During testing in the editor, the {resultNumber} variable will be empty.
If there are several identical candidate numbers in the call task, only the first greeting will work. In this case, you need to set up rules or a callback template or initiate it from the script.