Overview
Scripts are interactive message flows that a contact can engage with. They can be as simple as a single message or as complex as a hundred branching paths. The Script may capture information from the contact, or may send personalized information out. The Script can even trigger notification emails to your team to let you know when a contact is engaging. Scripts can be used in a variety of ways:
- as an outgoing Campaign, sent to a particular imported CSV or Audience segment
- as the automated introduction in your web-chat embed or for "open bot" SMS accounts
- as a #Command, initiated by the contact sending a particular message or selecting an option from the web-chat Quick Action Menu
- as the response to an incoming question
In addition to building your own Script, your account may also have access to the Mainstay Script Library, a collection of pre-built Scripts that you can add to your account and customize.
Script Metadata
- To create a new Script from the Scripts tool, click “Create New.”
-
Enter a Script Name so you can easily find this Script later.
- Note: If a name is not entered, you will not be able to save the Script.
- Add a Description, as desired.
- Add one or more Labels as desired.
Script Builder Menu
The top menu gives additional tools for managing your script:
- Test: send this Script to yourself or someone on your team so you can experience it like your recipients would. See Testing your Scripts.
- Delete: remove this Script permanently.
- Duplicate: create a copy of this Script. This is good to do if you have a Script on a new topic, but will follow a similar structure, or if you are creating a new version of this Script with new messages or options.
- Add Reminder: add a reminder to the script side bar (see below).
Reminders
This feature allows you to remind contacts to complete the Script after a certain period of time has passed since the Campaign was sent. A Script is considered "incomplete" if the learner has received a yes/no, multi-choice, or open-prompt question and has not provided a valid response.
This is a great way to automatically reach out to contacts that did not respond at all, or started responding but still have remaining questions, without needing to reschedule an entire follow-up campaign.
The Reminder text should be a simple message that explains to the contact why they received this and requests that they answer the outstanding question(s). A Script can have multiple Reminders - just make sure these are set to different amounts of time to avoid sending multiple Reminders at once!
See "Testing Your Scripts" to experience a Reminder for yourself.
Script Expiration
Set an expiration time for the Script, after which the contact will be automatically exited from the Script state. This is helpful for interactive Scripts that include yes/no, multiple-choice, or open prompt questions; after a certain period of time, you may not want to continue collecting responses, and instead return the contact to the default (bot response) state so they can ask questions.
Check out this walkthrough for creating a Script:
Script Message Types
The Script is a series of messages connected together in a sequential flow, with options to branch at yes/no and multiple-choice questions. Here are the types of messages your Script may contain:
-
Simple message: A message of static text (optionally including emoji, links, images, etc.) that will then automatically advance to the next message in the flow.
-
Message + yes/no prompt: A message that will present the contact with two options: Yes or No. Selecting this will automatically create a branch, where the next message the contact receives will depend on their answer to this question.
- Note: to add the next message, click the + Add button next to the corresponding branch (Yes or No).
- You can change a Yes/No question to a multi-choice question at the top of the text box.
-
Message + multiple choice prompt: A message that will present the contact with multiple options, which you can customize. Selecting this will automatically create a branch, where the next message the contact receives will depend on their answer to this question. There is no limit to the number of multiple choice options you present, but we recommend at most 5, for a better user experience.
- Note: to add the next message, click the + Add button next to the corresponding branch.
- Note: to add another branch, click the + button at the end of the multiple-choice list and enter the new option text.
- You can drag-and-drop the options to reorder them; all child nodes will move along with the choice.
-
Message + open text prompt: A message that will similarly wait for the contact to respond, but that does not branch depending on their answer.
-
Link to another message: This will move the contact to another message in the flow. This is especially helpful for "closing off" branches, such as when two or more options (of a multiple choice prompt) should take the contact to the same next message.
For managing these script messages, in general:
- Use the + Add button to the right of a Script message to add another one.
- Click the pencil icon within a Script message to edit it.
- While editing, click the Delete button to the right of the message to delete it, and any "child" messages, from the Script.
- While editing, simply click out of the editing textbox to Save your changes.
View:
Edit:
Script Message Body Options
Each Script message body may optionally include additional content. These can be inserted using the buttons along the bottom.
-
Organization Attributes: Click the puzzle icon to open the Organization Attribute search, which allows you to insert any reusable snippet, just like in Knowledge Base answers. See Organization Attributes Manager.
-
Contact Fields: Click the person icon to open the Contact Field search, which allows you to insert any built-in field (such as name, phone, email, etc.) or any custom field into the message body. See Contact Fields Manager.
- Note: if Preferred Name is inserted and the contact does not have a value for this field, then the contact's First Name will be inserted instead.
- Note: since every contact may have a different value for this field, the character counter in the bottom-right will no longer be exact if you insert a Contact Field.
- Note: once you have entered one or more Contact Fields in a Script message, a customizable Fallback message will automatically be shown. This represents the message a contact would receive if they don't have a value for the embedded Contact Field. (As such, you cannot include this or any other Contact Field in the Fallback message.)
-
Links: Click the link icon to open the bit.ly link shortener. This will create a short link using the mainst.ai domain. See Shortened Links (bit.ly / mainst.ai) for more information. (Note that you can also type or paste in full URLs instead.)
-
Emoji: Click the smiley icon to open the emoji selector.
-
Images: Click the image icon to open insert an image, either from the web or uploaded from your device. The image will be presented in a preview below.
- Hover over the image to see an [x] button; click this button to remove the image.
Script Actions
It is also possible to trigger Script Actions, depending on the type of Script message. For a Simple message type:
- Send responses to email: This will trigger a notification email when the contact reaches this message in the Script. See Email Action.
- Set a field value: This will update a custom contact field to have a particular value. See Set Field Value Action.
- Clear a field value: This will update a custom contact field to remove its value. See Clear Field Action.
- Opt out contact: This will set the contact's communication preferences for this channel to Opted Out, meaning that they will no longer be able to receive messages for this channel. Use this with extreme caution.
-
Set Custom Pause Time: This will introduce a delay before the next message is sent, rather than advancing immediately.
- Attach vCard: This will attach a virtual contact card so the learner can save this bot to their phone contacts. See vCard (Virtual Contact Cards).
For a Message + yes/no prompt, Message + multiple choice prompt, or Message + open text prompt:
- Send responses to email: This will trigger a notification email when the contact reaches this message in the Script. See Email Action for more details, such as choosing the recipient and email body.
-
Save responses: This will update the contact record, recording their answer to this question to a contact field. See Save Action for more details, such as selecting the field and using data-type validation to automatically re-prompt on invalid responses.
- If you use a Save Action to set a phone number for a web-chat contact, this will transform them into a multi-channel contact.
- If you use a Save Action to set a phone number for an SMS contact, then subsequent messages will be sent to the new phone number. Use this with caution.
- Set a field value: This will update a custom contact field to have a particular value. See Set Field Value Action.
- Clear a field value: This will update a custom contact field to remove its value. See Clear Field Action.
- Opt out contact: This will set the contact's opt-out status to true, meaning that they will no longer be able to receive messages. Use this with extreme caution.
Best Practices
When creating Scripts that you will send as outgoing Campaigns, it is important to create engaging messages that will not be flagged as Spam by phone carriers - or make your recipients want to opt out! See Tips to Avoid Spam Filters for suggestions on quality communication.
Additionally, the Script Builder will warn you if your messages or multi-choice options contain placeholder text like "Add message here" or "Enter an option":
The Script Builder will also warn if you have three messages that will send without any interaction in between. You can still send campaigns like this, but it's generally best to avoid overwhelming the recipient with too many messages at once.
Comments
0 comments
Article is closed for comments.