Search documentation...


Mapping Data


In Hightouch, Mapping refers to the establishment of a one-to-one relationship between a column or field in your model and a record's property or field in a destination. Depending on your sync's destination, you can map your data with either the basic mapper, which does column-based mapping, or the advanced mapper, which gives the additional options of mapping with static values, with variables, or with Liquid templating.

Basic mapper

Column mapping

Column in your sourceField in your destination

With the basic mapper, you tell Hightouch which columns in your source should get fed into which fields in your destination. In column mapping, it's expected that every row has different values for each column.

Click 'suggest mappings' to auto-complete a column-based mapping based on column and field titles. Auto-completion works by searching for matching and near matching column and field titles. You should confirm that the auto-completion has made the correct selections:

Suggest Mappings

Advanced mapper

For destinations where the Advanced Mapper is enabled, you have the additional capability to create mappings that include a static value, a sync-based variable value, or complex values using the Liquid templating language. We're in the process of rolling out our Advanced Mapper to all existing destinations, and any new destinations will automatically be released with this new capability. Please let our CS team know if there's a specific destination or use case that is a high priority for you to leverage this.

Static mapping

With static mapping, you can specify a constant value to include in the mapping. Select 'static value', the value's data type, and enter the value in the field provided. Click 'apply'.

Static Mapping

In this example, We're mapping the string 'EMEA' to the 'region' field in our destination. 'EMEA' will be inserted into every record's 'region' field:

Static Mapping

Variable mapping

With variable mapping, you can include a variable with meta-data about your sync and send it to a field in your destination. Select 'variable value', the variable you would like to include, and click 'apply':

Variable Mapping

In this example, We're mapping the current time to the 'Time sent' field in our destination. An ISO timestamp (YYYY-MM-DD) will be inserted into every record's 'Time sent' field:

Variable Mapping

Template mapping

With template mapping, you can create more complex mappings using our library of Liquid-inspired functions as well as standard functions of the Liquid templating language. Please visit Liquid's documentation for more information on usage.

Select 'template', then select a variable and a function. The function's code will automatically appear in the editor window:

Template Mapping

In this example, We're checking if a row's last_name column includes the string "Stark". If it does, the row is processed. If it doesn't, the row is rejected.

Liquid templating

The template mapper can also implement all of Liquid's regular functionality (see the Liquid Reference), beyond the Liquid-inspired functions we have provided for you in the UI.

Variables follow this format:

{{ row['company'] }}

The double-handlebars enclose a Liquid snippet that is generating output. The name of the column should go in between the single quotes inside the square brackets (akin to array field notation).

Functions follow this format:

{{ row['last_name'] | includes : 'Stark' }}

A single pipe comes after the variable, then the name of the function and any necessary parameters. See the Liquid Reference or Liquid Cheatsheet for a full list of available functions.

Liquid variables in the advanced mapper

$ <column_name>
$ Model Name
$ Timestamp

All of the model's column names will have a corresponding variable. You also have access to a variable for the name of the model and the timestamp for the sync's run:

Template Mapping

Liquid-inspired functions in the advanced mapper

base64_decoderow['email']|b64_decodeBase64 decode input
base64_encoderow['email']|b64_encodeBase64 encode input
castrow['phone']|cast:'string'Cast input to specified type. Allowable types are 'string', 'number', 'boolean'
includesrow['last_name']|includes:'Stark'Check input for a substring. Row will be rejected if substring is not found
parserow['first_name']|parseParse input to JSON
JSON_construct| json_construct: 'city', row['city'], 'state', row['state_province']Construct JSON object
regex_replacerow['last_name']|regex_replace: '<[a-zA-Z]>', '<replacement>'Search and replace substrings of input using RegEx
regex_testrow['last_name']|regex_test: '<[a-zA-Z]>'Check input for a RegEx match. Row will be rejected if no match is found using RegEx
sha256row['email']|sha256Hash input using SHA-256
sha512row['email']|sha512Hash input using SHA-512
to_daterow['dob']|to_dateParse input and return a Date object (ISO 8601 format)
to_unixrow['date_sent']|to_unixConvert input to Unix time
validate_emailrow['email']|validate_emailReject emails that aren't RFC 2822 compliant email addresses

Liquid function chaining

More than one Liquid function can be called on one input. Separate the functions with a single pipe:


{{ row['full_name'] | camelcase | sha256 }}
{{ row['email'] | downcase | validate_email | sha256 }}

Extended Liquid and use cases

See the Liquid Reference or Liquid Cheatsheet for a full list of available functions.

Conditional Output

Use Liquid conditionals to specify output based on input. For example, this Liquid snippet

{% if row['title'] == "Awesome Shoes" %}
  These are awesome shoes.
{% elsif row['title'] == "Ugly Shoes" %}
  These are ugly shoes.
{% else %}
  No shoes selected.
{% endif %}

outputs the following result in the destination:

Liquid Conditional Output

Math Functions

Use the abs function to send an absolute value:

{{ row['value'] | abs }}

Use the round function to round a value to the nearest integer or specified number of decimals:

{{ row['value'] | round: 2 }}

See Liquid Math Functions

String Functions

Use the capitalize function to capitalize the first letter of a string:

{{ row['title'] | capitalize }}

Use the strip function to remove all whitespace from the left and right sides of a string:

{{ row['title'] | strip }}

Use the append function to add a file extension to a string:

{{ row['file_name'] | append: '.png' }}

See Liquid String Functions

Template mapping use cases

The Template Mapper is especially useful in situations where your chosen destination requires that your data be sent in a very specific format and you don't want to 'bake' this specificity into your model.

  • Webflow requires slugs to not have any special characters. Use regex_replace to remove them.
  • Enable lead routing in your destination using Liquid conditionals without touching your central dbt model.
  • Validate emails for Mailchimp.

Ready to get started?

Jump right in or a book a demo. Your first destination is always free.

Book a demoSign upBook a demo

Need help?

Our team is relentlessly focused on your success. Don't hesitate to reach out!

Feature requests?

We'd love to hear your suggestions for integrations and other features.

On this page

OverviewBasic mapperColumn mappingAdvanced mapperStatic mappingVariable mappingTemplate mappingLiquid templatingLiquid variables in the advanced mapperLiquid-inspired functions in the advanced mapperLiquid function chainingExtended Liquid and use casesTemplate mapping use cases

Was this page helpful?