Skip to main content
Using Dynamic Variables in Texting Scripts
Updated over 4 months ago

Dynamic variables in texting scripts (for any type of messaging - Peer-to-Peer, Broadcast, and Automated, or Friends and Family Messaging/Canvassing) are a powerful way to personalize text messages. Think of dynamic variables like a mail merge: you insert a placeholder variable into a script that will be replaced with the contact's real information when the message is sent. For example, a script that says "Hey {{first_name}}!" will be populated with "Hey John!" when the message is sent.

Using Impactive's Built-In Dynamic Variables

Impactive offers a number of built-in dynamic variables that are insertable via the buttons located at the top of the script editor:

Simply click on any of these buttons (Campaign Info, User Info, Contact Info, Links, or Custom Fields) to insert any of the dynamic variables listed in that category.

List of Built-In Dynamic Variables Available

The following dynamic variables are built-in to Impactive. Note that not all texting action types offer all of these variable options, but the majority are available across all action types.

Campaign Info

  • Campaign Name: The name of your campaign (visible at the top-left corner of your admin dashboard)

  • Description: The description for your campaign, set in Campaign Settings > Basics.

  • Join Code: The join code that users can input in Impactive to join your campaign, visible in Campaign Settings.

  • Broadcast Phone Number: Your campaign's broadcast phone number, visible in Campaign Settings > Broadcast Texting.

User Info

  • First Name: The user's first name.

  • Last Name: The user's last name.

  • Full Name: The user's first and last name, with a space in between.

  • Email: The user's email address, if available. (Note that not all users have entered email addresses, so there's a slight risk of blanks when using this variable.)

  • Phone: The user's phone number.

  • Team Code: The join code for the user's auto-created team.

Contact Info

  • First Name: The contact's first name.

  • Last Name: The contact's last name.

  • Full Name: The contact's first and last name, with a space in between.

  • Email: The contact's email address, if available. (Note that contacts will only have email addresses in Impactive if that data was imported with the contact list, or if the contact entered their email address in a form or voter registration action.)

  • Phone: The contact's phone number.

  • State: The contact's state, if available. (Note that contacts will only have state in Impactive if that data was imported with the contact list, or if the contact entered their full address or ZIP code in a form or voter registration action.)

Links

  • Campaign Links: Either the web or app join links for user to join your campaign on Impactive, visible in Campaign Settings.

  • Action Links: The direct links to a certain action in Impactive, perfect for directing users to take part in that action. There is no difference between the web and app links, both will properly open the action on either device type (web/app links will soon be consolidated into one).

  • Custom Links: Shortened links created by an admin in Data > Links, which can be any URL.

  • ActBlue Links: Shortened links specifically to ActBlue fundraising campaigns created by an admin in Data > Links.

Custom Fields

Any of the custom fields created under Data > Custom Fields, either multiple-choice selections or short text inputs.

Using Custom Dynamic Variables

You can populate your scripts with custom dynamic variables simply by setting up a custom field to store your desired data, then using that custom field as a dynamic variable in your messaging script.

  1. Create the custom field under Data > Custom Fields.

  2. Take note of the Slug for that new Custom Field, displayed in the table under Data > Custom Fields.

  3. Use that exact slug as the column header in a CSV and fill in data accordingly for each contact (still including the required column headers for first_name, last_name, and phone as described here).

  4. Import the CSV with the custom field data.

  5. In a particular texting script, use the Custom Fields button above the script editor to locate the desired custom field and insert its dynamic variable into the script.

Be careful not to edit the format of the dynamic variable inserted by Impactive (for either built-in or custom dynamic variables). Dynamic variables must always be surrounded by two curly brackets - like {{first_name}} - and you should should never edit the name (within brackets) of the variable that Impactive inserted. Improperly-formatted dynamic variables will not work.

Ideas for Dynamic Variables

Dynamic variables offer very powerful personalization capabilities for scripts - and personalized scripts are known to perform much better than generic, impersonal scripts. Almost anything about a texting script can be customized with dynamic variables, even entire sentences!

Here are a few creative ways to use dynamic variables for higher-performing scripts:

  • Personalize the greeting with the contact's name. We strongly recommend writing scripts that start with a greeting like "Hey, {{first_name}}!"

  • Personalize the message with the contact's locale. Use a built-in dynamic variable for state of residence, or import custom field data for a more specific locale like neighborhood or precinct.

  • Personalize entire sections of the script depending on a contact's interests. It will take some spreadsheet manipulation, but you could create customized sentences of the script that depend on what you know about contacts' interests. For example, if you have data on contacts' top-priority issue, you could create a spreadsheet column that lists a customized sentence of the script according to that issue - like "I know you care most about climate change in our state; our platform includes a number of provisions to reduce carbon emissions by 30% by 2030." You can then import those sentences as a custom variable and insert them into your script for fully-personalized scripts per-contact.

  • Send vote tripling reminders with the names of the friends that users/contacts said they'd get to vote. Use an Impactive form (or import from other non-Impactive data-collection method) to gather the names of three friends that a user or contact pledges to reach out to ahead of Election Day. Then, insert that data as a dynamic variable in a script to remind them who they're supposed to reach out to. You could collect each of the three friends in individual fields (ex. Friend 1, Friend 2, Friend 3) and insert all three of those dynamic variables in a script, or just ask for all three friends in one field and insert that single dynamic variable.

Did this answer your question?