Skip to main content
Variables
Jenny avatar
Written by Jenny
Updated over 7 months ago

If you're looking for help in using your Textline Variables, look no further, you're in the right place!

Variables are a feature of Textline that allows you to pull specific contact information, like the first name, into messages. This information could be about the Contact or the Agent currently handling the Conversation.

Variables are currently available in Automations, Announcements, and Shortcuts. Below is a list of the Variables currently available in Textline. There are some that are only applicable to certain sections of Textline and will be labeled as such.

If your desired Variable lacks information, we have also designed a system to have your variable fall back onto other information. More on Fallbacks below.

How To Use Variables

As mentioned above, Variables can only be used in Automations, Announcements, and Shortcuts, so below are walkthroughs on how to use Variables in each feature.

Automations

In Automations, Variables can be used in the Send a Message and Send a Whisper actions, so you can add your Variable to the message body for it to be referenced later. You'd place the variable you want in your message within {{braces.}} Here is the setup:

Here it is in action. You'll see the first name and size are pulled in automatically:

Note: Variables do NOT work with scheduled messages, so the action Schedule a message for does NOT support variables.

Announcements

Variables for Announcements function in the Announcement body. This is highly important as Announcements allow you to craft one message to send to many Contacts, so including Variables allows you to personalize that message.

Shortcuts

When using a variable in the Conversation Dashboard, the only way to do this is by using a Shortcut. You will need to first build a Shortcut with a variable in the body of the Shortcut:

Once you have added the variable to the Shortcut, then you can call upon the Shortcut in the Conversation Dashboard to auto-populate data for the Contact:

Variables

Assigned Agent

This pulls information from the agent that is assigned to the conversation. These are coming from the agent's profile page in settings.

Name: {{assigned_agent.name}}
Role: {{assigned_agent.role}}

Example

What you type: Hi, {{assigned_agent.name}} is out of the office today, but my name is {{current_agent.name}} and I'm happy to help.

What the customer sees: Hi, Marika is out of the office today, but my name is Rick and I'm happy to help.

Contact

This variable pulls information regarding the contact you are sending the message to. This set is unique in that we will not be able to document every variable possible, simply because we allow you to create custom fields in your Address Book. If you are using a custom field that has a space in the title, replace the space with an underscore _ . Note: The fields Notes, Tags, and custom fields that use a checkbox type are not supported variables.

Name: {{contact.name}}
Phone Number: {{contact.phone_number}}
Custom fields in the Address Book: {{contact.custom_field_name}}

Example

What you type: Hi {{contact.name}}, are you still at {{contact.full_address}}? Want to make sure we send the package to the right address.

What the customer sees: Hi Nick Fury, are you still at 1 Avengers Tower, New York City, NY? Want to make sure we send the package to the right address.

Current Agent

This pulls information from the agent that is currently logged into Textline and performing the action of using a shortcut or sending an Announcement. These are coming from the agent's profile page in settings. Not available in Automations.

Name: {{current_agent.name}}
Role: {{current_agent.role}}

Example

What you type: Hi, My name is {{current_agent.name}} and I am a {{current_agent.role}} at Textline, I'd love to help you.

What the customer sees: Hi, My name is Rick and I am a Support Technician at Textline, I'd love to help you.

Date & Time

If you want to have a variable put in the time or date in your messages, use the following variables. These use the time and date from when the message is actually sent, so if you send an Announcement to lots of contacts that takes time to send, it will be the time or date from when the message is actually sent, not when you created the Announcement.

Time - 24hr: {{system.24hr}}
Time - AM/PM: {{system.ampm}}
Date - Day Mon Year: {{system.ddmmyyyy}}
Date - Mon Day, Year: {{system.mmddyyyy}}

Example

What you type: Hi it is currently {{system.ampm}} on {{system.mmddyyyy}}. Taxes are due on April 15, 2019. Have you filed your taxes yet?

What the customer sees: Hi it is currently 12:05pm on April 12, 2019. Taxes are due on April 15, 2019. Have you filed your taxes yet?

Department

This pulls information from the department where the conversation is currently taking place in or where the announcement is being sent from.

Name: {{department.name}}
Phone number: {{department.phone_number}}

Example

What you type: Welcome! You have reached {{department.name}}, we will get to your request in a few minutes.

What the customer sees: Welcome! You have reached Textline Support, we will get to your request in a few minutes.

Upload

This variable pulls information regarding the contact you are sending the message to. This variable set comes from the column headers in the CSV that you upload as the contact list for your Announcement. Information on formatting your CSV for upload can be found here. This set is special in that we will not be able to document every variable possible because we cannot predict what you have added to your uploaded CSV (not yet at least). If you are using a column header that has a space in the title, replace the space with an underscore _ . This is only available in Announcements.

Name: {{upload.name}}
Phone number: {{upload.phone_number}}
Custom Column: {{upload.custom_column_name}}

Example

What you type: Hi {{upload.name}}, are you still {{upload.status}}? Want to make sure we know who to contact in the future.

What the customer sees: Hi Nick Fury, are you still retired? Want to make sure we know who to contact in the future.

Fallback

As mentioned above, we have designed a Variable system that will allow you to choose the information that gets sent in case the Variable used lacks information. This means that if you use a Variable in a Shortcut or Announcement, but the Variable returns an empty value for the Contact, you can choose to look elsewhere for text. This is done by placing a pipe | after your variable and then continuing. You can even use another variable as your fallback. If you want to use text as a Fallback, make sure to encapsulate the text in quotation marks "like this". Here are a few samples of fallbacks:

  • We want to use the name assigned agent on the conversation, but if there is none, then we use the current agent:

{{assigned_agent.name|current_agent.name}}

  • We want to use the name of the contact, but if there is none, just use the text Chewie

{{contact.name|"Chewie"}}

  • We want to use a custom Address Book field 1, but if there is no data, then use custom field 2, and finally if there is none there either, use the text Fastest Pilot in the Galaxy

{{contact.custom_field1|contact.custom_field2|"Fastest Pilot in the Galaxy"}}

Attachment icon
Did this answer your question?