Configure scripts for alert notifications

Updated at:

This topic describes how to configure scripts for alert notifications.

1. Go to the product console.

2. Create a business instance and select Conversation Engine 3.0.

3. Go to the business instance, select Scenario Management, and create a new scenario.

Set the script name and click Save.

4. Go to the scenario that you created.

5. Configure the start intent. Note: You must set a start intent for the main conversation flow in any scenario.

Click Create and set the question to "Start".

6. Click Conversation Flow Management to configure the script.

1) Set the conversation flow name and click OK.

2) After the flow is saved, click Edit to configure the script.

3) On the conversation flow page, attach the "Start" intent to the start node. To do this, click the start node and select the start intent that you configured.

After you click the start node, a dialog box appears. Click the Edit button to associate the start intent.

You can change the name of User Branch-1 to a custom name or leave it as is. After you finish the configuration, click OK.

After you confirm, click Save.

After saving, click the down arrow on the start node or drag a common node from the left pane onto the canvas. This example uses the down arrow method. Select the node, set the node name, and then click OK.

The start node and the common node are now connected. Click the common node and place the cursor in the text box to write the broadcast message.

After you set the text, find the subsequent action and select Hang Up. The current configuration is now complete.

After you set the broadcast message, add an action and select Hang Up.

After you finish the settings, click Save.

After you save the common node content, click the Save button in the upper-right corner to apply the conversation flow configuration.

4) The previous steps show how to write a standard text message. However, in real-world applications, you may need to customize parts of the broadcast message. For example, information such as names and addresses is different for each contact in an outbound call. In this case, you need to use the system's built-in variable reference. The format is `${envVars['VENDOR_PARAM']['VariableName']}`. You do not need to enter this manually. When you configure the node broadcast, you can add a variable by selecting Variables on the node and finding the starting part of the format.

Select Variables and find the Environment Parameters section.

Find and select `${envVars['VENDOR_PARAM']}`.

Set the variable name. Add `['']` to `${envVars['VENDOR_PARAM']}` to specify the variable name. Use square brackets and single quotation marks.

After you finish the configuration, select the subsequent action and add the Hang Up action.

After you set the Hang Up action, click Save below the node.

After you save the node, save the entire conversation flow to apply the changes.

5) Debug the broadcast message.

Text debugging method: After you save the conversation flow, click Voice Debug to test the current configuration.

In the debug output, you can see that some of the variables you set have not been assigned a value. Click the Variable Impersonation button above the debugging window to assign values and pass parameters to the variables.

After you set the parameters for the variables, click Confirm. Then, click Clear Screen to retrieve the variable parameters and debug again.

If you want to perform a voice debug to check the robot's tone, you can click the phone icon in the lower-left corner of the debugging window to make a simulated call.

Note: During a voice debug, to broadcast variables, you must perform the variable impersonation and clear screen operations again for the changes to take effect.

7. After you finish debugging and confirm that there are no issues, return to Scenario Management and publish the scenario for review.