Overview
What Are Script Actions?
Scripts allow you to create a templated conversation that can guide contacts through a conversation and receive the best information possible.
- Script Save Actions (tutorial) can be added to open text, yes/no, and multi-choice prompts to save contact responses directly to the contact profile and start building a progressive profile on your contact population.
- Script Set Field Value Actions allow you to set a particular contact field to a particular value.
- Script Email Actions (tutorial) let you forward the conversation directly from the script so that you can forward the contact to the appropriate resource.
Why use a Script Action when building a Script?
Script Actions will allow you to take scripts to the next level and be more creative with your scripts.
- Allow you to pre-build a conversation that would smartly escalate the conversation to the corresponding audience depending on the contact’s response.
- Allows you to capture contact information or set particular data and build a progressive profile that can be used to provide contact’s more personalized information later on.
- You can use the contact capture information from save actions and set field value actions to create Audiences and send contacts additional resources depending on their profile.
- You can capture information directly from your contacts and sync it with your existing integrations.
- You can identify that contacts have reached particular parts in a script, which is useful for A/B testing, identifying information sources, lead generation, and more.
Email Action
How to add an email action to a prompt
Script Actions will allow you to take scripts to the next level and be more creative with your scripts.
- Allow you to pre-build a conversation that would smartly escalate the conversation to the corresponding audience depending on the contact’s response.
- Allows you to capture contact information and build a progressive profile that can be used to provide contact’s more personalized information later on.
Adding an Email Action
Let's say you have a script where you ask contacts what office they want to connect within your institution and you want to forward the contact's response directly to the office's email so they can respond.
- Click the Add button where you want to + add the action
- Select the option to Send the response to email.
- Select the email that you want to forward the conversation.
- ** You can test the script using the test button and sending it to your test account **
- ** Make sure that you add the email action to the right prompt since an email will be sent out for every contact who reaches that prompt. **
Edit an Email Action to use the Best email
Let's say that you have Email Forwarding Suggestion rules set up to determine the contact's counselor using one of their custom fields (Ex: Zip Code). You want to send a script to connect students with their counselors and want to use those rules to forward the contact to the appropriate counselor. Then you want to use those rules and have the bot determine the best counselor using the contact's information in this case the Zip Code.
- Assuming you have the email forward suggestions set up you will see the option to determine the best email using the contact's custom fields.
- When adding the email action simply check the option to Determine best email using contact’s attributes and the bot will use those rules to determine the best email to forward the conversation to.
Remove an Email Action from a prompt
If you want to completely remove the email forward from the script prompt then do the following:
- Chose the email action that you want to edit.
- You can either update the email or click the trash icon to delete it.
Save Action
Adding a save action
Let's say you want to create an introduction script that asks students for their contact information. You already have a contact field for the first name and email.
Note that all contact fields live on the contacts page; to learn more about the contact field go here.
Note that with the save actions you can update these contact field's values and if you have a pre-build segment you can use that segment to follow up accordingly. To learn more about building Audiences go here.
To Add a Save action to the prompt:
- Click the + add next to the prompt where you want to add the action
- Note that you can only add a save action to yes/no prompts, open text prompts and multi-choice prompts
- Select the option to save the response
- Select the field you want to save the response to
- Note that if the field does not exist you can create one from the script editor(with exception of multi-choice and boolean types) or by going into the Contact Fields Manager.
- Map the options in the fields to the options on the prompt
- Once you add the save action, if it's on an open text prompt, it will show you how it validates that the contact input is a valid response.
- The bot will re-prompt the user 1 time if they provide an invalid response, and then move to the next prompt if the contact does not provide a valid response the second time.
Set Field Value Action
Sometimes you want to update the contact record in a particular way, regardless of how they answered a question (or even if it wasn't a question at all!). For example:
- Set a custom field Source for new contacts who go through the web-chat intro, and include this field in your integration, so that your external platform knows which contacts came from Mainstay:
- When you capture information from the contact in a Save Action, set a meta-data field that indicates where this information came from:
- In a "menu"-style Script, where the recipient can choose an option from a multi-choice list, get information, and then loop back to that menu, you might want to indicate which options they've chosen with a separate true/false indicator for each one:
To Add a Set Field Value action:
- Click the + add next to the message where you want to add the action
- Select the option to Set a field value
- Select the field you want to update
- If the field does not exist, you can create one in the Contact Fields Manager.
- Set the value you want to record to that field
- Click to Save
Unset Field Action
Any field can be cleared out in the contact panel, or cleared out in an import or via API by setting the value to "UNSET". It's also possible to clear out a custom field's value using a script action:
To Add an Unset Field action:
- Click the + add next to the message where you want to add the action
- Select the option to Unset a field
- Select the field you want to clear
- If the field does not exist, you can create one in the Contact Fields Manager.
- Click to Save
Comments
0 comments
Article is closed for comments.