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. A warning will appear if the script is being used by any upcoming Campaigns, personalized KB responses, #Commands, Webchat variants, Hello Pages, etc., and the Script will not be deleted.
- 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).
- Copy to...: create a copy of this Script in another institution you have access to (see below).
Best Practices Checklist
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 and our Compliance Checklist for suggestions on quality communication.
The sidebar contains a quick checklist to highlight common issues (indicated with a warning triangle sign). Hover over the "i" info for details on each item.
-
Complete message paths: One or more branches is missing a final message. We recommend ending every path with a simple message, not a question.
- We highly recommend "capping" each question with an acknowledgement of the learner's answer.
-
Avoids 3-in-a-row messaging: This script begins by sending 3 or more messages in quick succession. It is recommended to begin scripts by sending only 1 or 2 messages before terminating or pausing for a response.
- You can still send campaigns like this, but it's generally best to avoid overwhelming the recipient with too many messages at once.
- Avoids bit.ly links: One or more messages contain a bit.ly link. Some phone carriers flag these links as spam. To avoid deliverability issues, we recommend using a different link shortener, like mainst.ai.
- All mainst.ai links supoprt click tracking: One or more messages contain a legacy mainst.ai link (7-character path). These do not support link click tracking. We recommend replacing these with the equivalent short link (4-character path) from the Insert Link menu.
-
No placeholder text: This script contains one or more messages with placeholder text.
- example: "Add message here." or "Enter an option".
- Avoids emojis with vCard attachments: A message with a vCard attachment also has one or more emojis in it. Some phone carriers flag these messages as spam.
- Reminders before expiration: This reminder is scheduled to send after the Script's Expiration Time.
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.
- You can change a Simple message to an Open text prompt at the top of the text box.
-
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.
- 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.
- To add the next message, click the + Add button next to the corresponding branch.
- 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.
- You can change an Open text prompt to a Simple message at the top of the text box.
-
Message + branch by Audience: A message that branches automatically, based on which Audience the learner is in.
- To add the next message, click the + Add button next to the corresponding branch.
- To add another branch, click the + button at the end of the Audience list and select an Audience.
- There must always be a Default option, in case the learner does not currently meet the criteria for any of the Audiences.
- The learner may meet the criteria for multiple Audiences; they will receive the messages for the first Audience branch for which they qualify.
- Note that Audiences are recalculated regularly, but not instantly. So if a learner is updated by a Save Action (see below), this may not update their Audiences in time for a subsequent Audience-branching message. Instead, use this feature to branch based on what Audiences the learner is already in, when the Script is received.
-
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 multi-choice options or Audience branches should take the learner to the same next message.
For managing these script messages, in general:
- Click + Add at the top to insert a message before other messages in the Script.
- Use the + Add button to the right of a Script message to add another one after this.
- Click the pencil icon within a Script message to edit it.
- While editing, click the Delete trashcan in the top-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.
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 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).
- Avoid using emoji in the message when attaching a vCard - some phone carriers are more likely to block this as spam.
- Note: If you convert this Simple message to an Open text prompt, the vCard will not be preserved.
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.
- Note: If you convert an Open text prompt to a Simple message, the Save responses action will not be preserved.
- 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.
Generative AI Discussions
Scripts also provide options to switch from a rules-based exchange (as above) to a more fluid, conversational experience, powered by generative-AI.
Visit Gen-AI Discussions in Scripts and Gen-AI Voice in Scripts to learn more about these tools.
Copy to...
If you have access in multiple institutions (such as your Admissions and Retention bots), you will see an option to Copy this Script to another account.
- Click the ... overflow menu, then "Copy to..."
- Select the target institution from the list.
- If this Script contains any Organization Attributes, embedded Custom Contact Fields, or Save/Set Field Value/Unset Field actions, you will be prompted to map these to the equivalents in the target institution.
- For each Contact Field or Organization Attribute, you can:
- (a) Select an existing field or attribute from the list.
- (b) Create a new field or attribute in the target institution (in the drawer).
- (c) Omit a mapping. Embedded items will be replaced with the name of the field or attribute as plain text, while Save/Set Field Value/Unset Field actions will be omitted.
- Click "Copy". A new Script will be created in the target institution.
- Note: attachments like images and contact vcards will also be copied over.
- Note: email actions will only be copied over if they are set to "Determine best email using contact’s fields".
Comments
0 comments
Article is closed for comments.