Jump to: navigation, search

Scripts

Important
This information applies to SMS and Email channels only. Voice scripts are created in Designer.

A script is a file that combines the text, recorded audio and business rules, or set of instructions, sent out to a customer via a text message or email.

Scripts can be very simple -- involving only one-way communication with no interactive capabilities -- or in the case of SMS, they can involve a dialogue engine that enables interaction between the script and the customer.

You can create the script or have your account representative create it for you. You can import and export a script and edit the script and basic script attributes, such as response groups, message variables, and email image resources.

Script content is created using the following:

  • One-way SMS content - JavaScript
  • Sender ID for two-way SMS (which allows the customer to reply) - SMS Longcode, ShortCode, or Free-To-End-User (FTEU)
  • Email content - HTML (.xsl files)
  • Email addresses - XML


Basic Sample code for SMS alert:

Use JS begin function to send SMS (‘sender ID’ , ‘sms content’) Note use of personalisation is supported.

// Sample Code:
function begin() {
sendTextMessage(‘CompanyABC’, 'Hi ' + getCurrentContact().getFirstName() + ' ' +
getCurrentContact().getLastName() + ', here is your SMS message.');
}

View and monitor scripts

To view and monitor your scripts: Click the Scripts tab and the Scripts tabbed page appears with the Show All page active. Select Show: Account Scripts to view a list of the available scripts in the active Account, or select Show: Enterprise Scripts to view a list of the available enterprise scripts.

The Scripts table displays the following information for each script:

  • Script name - You can click the name to edit the script. See Edit a script.
  • Actions menu - From the Actions menu, you can test or download a script. See Test a script and Download a script.
  • Duration - The number of seconds represents the total length of all audio files included in the script - in other words the length of the call if the recipient listens to the entire message.
  • Last Modified, Last Modified By and Last Used - These columns indicate when the script was last edited and by whom, or last used.
  • Expiration - Iidentifies when the script will expire and no longer available.

Edit a script

To edit a script:

  1. Click the Scripts tab and the Scripts tabbed page appears with the Show All page active.
  2. Select Show: Account Scripts to view a list of the available scripts in the active Account.
  3. Click the script name link from the list, or select Edit.. The Edit Script page appears.
  4. Enter a new name in the Name field.
  5. Enter a description in the Description field.
  6. Identify when the script will be deleted by selecting from the Automatically Delete Script duration options.
  7. To review the variables, resources or response groups, assuming the script includes the functionality, click the appropriate tab.
  8. Click the Advanced Edit tab to edit the XML file or the JavaScript Edit tab to edit the JavaScript file.

Test a script

It is important to test a script prior to sending a sub-campaign to ensure the script is working properly. We suggest you send multiple test messages to test each option defined in the script. You can test a script by using it to send a message to any valid phone number or email address.

  1. On the Scripts > Show All page, select Test from the Actions menu next to the name of the script to be tested. The Send Test window appears.
  2. Select the channel from the menu.

Test an email script

  1. Enter the email address to which the test email will be sent in the Email Address field.
  2. (Optional) Enter the Summary Email Address to which a summary report is sent.
  3. If the script requires special values to be contained in any field of the contact list, enter the values to be used for the test email. For example, if your script includes the use of a name and a dollar amount as a part of the email message, it may require that the name populate the FirstName and LastName fields and that the dollar amount populate the other1 field. The values you enter must exactly match the values as they appear in your contact list.
  4. Click Send Test to send the test message.You will receive an email at the specified email address.

Test a text script

  1. Enter the wireless phone number to which the test message will be sent in the Phone Number field.
  2. (Optional) Enter the Summary Email Address to which a summary report is sent.
  3. If the script requires special values to be contained in any field of the contact list, enter the values to be used for the test message.For example, if your script includes the use of a name as a part of the text message, it may require that the name populate the FirstName field. The values you enter must exactly match the values as they appear in your contact list.
  4. Click Send Test to send the test message. You will receive a text at the specified wireless phone number.

Delete a script

Each script in the account appears in a list on the Scripts tabbed page, including those currently being used in one or more sub-campaigns and those assigned to a campaign strategy.

To delete one or more scripts from your account:

  1. On the Scripts tabbed page, select the check box next to the script(s) to be deleted.
  2. Click Delete. A confirmation message appears.
  3. Click OK. The script is deleted from the system.

To delete a script from the enterprise account, you must first sign in to each listed account and set each of the listed campaign strategies and scheduled sub-campaigns to use a different script.

The same is true for enterprise level scripts.

Replace a script

Each script in the account appears in a list on the Scripts tabbed page, including those currently being used in one or more sub-campaigns and those assigned to a campaign strategy.

You can update the script being used for a running (or previously running) sub-campaign by replacing it with an edited version. For example, if you run a sub-campaign to send out text messages, you can change one of the follow-up messages in the script. This capability is available only to users who have Advanced Edit permission.

To replace one or more scripts in your account:

  1. On the Scripts tabbed page, select the script(s) to be replaced on the script title bar(s).
  2. Click Replace. The new script should generally not remove or change the capabilities or response groups in the existing script.
  3. Once the script has been replaced, click Apply.

This will attempt to update all sub-campaigns that have used the script within the last 60 days. The user interface will provide feedback on which sub-campaigns were updated.

Extreme care must be taken when making changes to the script on an existing sub-campaign, especially when functionality is added or removed. The script writer must be aware of the potential impact a change can have on sub-campaigns and reports.

Edit Variables

If your script contains variables, you can edit their values on the Variables tab. If there are no variables in your script, this tab is not available.

To edit the value for a variable:

  1. Click Edit. The Variable Edit dialog box appears.
  2. Enter the new value for the variable.
  3. Click Save Variable.

Add and edit Resources

Resources are the files contained in a script. Click the Resources tab to access the list of resources, and add or edit them.

Add a resource file

To add a resource file:

  1. From the Scripts tabbed page, click the name of the script to be edited. The Edit Script page appears.
  2. Select the Resources tab. The Resources tabbed page appears.
  3. From the Resources menu bar, click Add Resources. The Add Resources window appears.
  4. Click Browse to locate the new resource file on your computer or network, select the file and click Open.
  5. Enter a description of the resource and click Save Changes.

Update a resource file

To update a resource file:

  1. Identify the resource to be updated from the list, and click Update. The Update Resource window appears.
  2. Click Browse to locate the updated resource on your computer or network, select the file and click Open.
  3. Enter a description and click Save Script.

Save a resource file

To save a resource file to your computer or network:

  1. Identify the resource to be saved from the list, and click Download.
  2. Click Save to save the file to your computer or network, or click Open to open the file in the appropriate application (such as Notepad for text files, or Media Player for WAV files).
  3. Enter a description and click Save Changes.

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on 24 May 2017, at 08:35.