How to Create Custom Variables

In addition to the standard variables that are available in the SendPulse service, you can add custom variables. There are several ways to do this:

How to Create a Custom Variable in a Mailing List

Open a mailing list where you want to add a variable and click Create variable.

Enter a variable name.

You can use the following characters in the variable name:

  • all Unicode alphabetic characters (regex meta group);
  • all numeric characters (regex meta group);
  • dots, commas, question marks, and exclamation points;
  • single and double quotes;
  • hyphens and underscores;
  • right slash;
  • space.

Select the variable type.

The variable type depends on the type of information that needs to be passed in it:

  • String stores a text value, e.g., subscriber name and company name.
  • Number stores a numeric value, such as a phone number.
  • Date stores a numeric value in the calendar date format, e.g. date of birth and date of registration.

To display the {{date}} values correctly, use the following date format: MM/DD/YYYY.

Select the "Subscriber editable" checkbox if you want to allow subscribers to edit their data themselves.

How to Add Variables While Uploading a File with Contacts

Open a mailing list where you want to add a variable and Add contacts.

Add new contacts to a mailing list

In the "Upload file" tab, choose a file with contacts, and click Upload. Supported file formats are TXT, CSV, XLS, XLSX.

Upload a file with the contacts

In the next step, add a variable for each column with additional data from the file: above a column, click Disabled and add a variable from the drop-down list or create a new variable.

Enable variables in the mailing list

Click Add to upload the contacts from the file to the service.

Finish adding the contacts to the mailing list

After the contacts are uploaded into the mailing list, all the variables that you enabled during the upload will be displayed in additional columns.

Custom variables colomns

You can edit the names of variables or delete custom variables. Hover over a name of a variable with a mouse pointer and click the pencil icon to edit the variable name or click the bin icon to delete the variable.

Edit or delete a variable

How to Edit Variable Values

To edit a value of one variable for a single contact, click this value and make changes. Save the updated value by pressing the "Enter" button or by clicking the "Change variable value" button.

Edit a variable value

To update variable values ​​for several contacts at once, upload a file with the list of contacts and updated data to the service. Select the "Update variable values ​​for existing contacts" checkbox and click Add.

Update variable values for several contacts

How to Add Custom Variables to an Email Template

You can create your email template in the layout template editor or an HTML editor, or import a ready-made template. To add a variable to any of these templates, enter it in double curly braces, for example {{name}}, in the right place in the template.

Note: For data from variables to be added to emails, variable names must completely match in mailing lists and templates. If you specify a variable name with a capital letter in a mailing list, for example {{Name}}, then enter this variable with a capital letter in templates.

To add variables to a template while creating a campaign, select an email template and proceed to edit it. Place the cursor in the place where you want to add a variable and click the "Variables" button.

Add variables to an email template while creating a campaign

Select a variable from a drop-down list. The standard variables and all the variables from the mailing lists that you choose for this campaign are available in the drop-down list.

A variable in an email template

You can also use smart personalization in emails to increase the efficiency of email campaigns.

How to Delete Variables

You can delete a variable for a specific contact or the whole mailing list.

The "Email address" and "Phone" variables cannot be deleted.

To delete a variable value for a single contact, hover over the variable, and click the pencil icon. Then delete the variable value, and press “Enter” or the arrow icon next to the field where the value was.

To delete a variable, hover your cursor over the column name. Then click on the trash can icon that appears.

Afterwards, you will see a pop-up window where you need to confirm that you actually want to delete the variable.

How to Hide Variables

You can hide certain variables in the contact list. Click on the three dots on the right and select which variables you want to display in the checkbox that opens.

    Rate this article about "How to Create Custom Variables"

    User Rating: 4 / 5

    Popular in Our Blog

    Try SendPulse today for free