Relevant to: Demand Acceleration Platform
You can use Liquid Markup in the Demand Acceleration Platform when setting up outbound integrations and Lead Reports.
Liquid Markup is an open source language that enables a greater level of customization and flexibility to determine system outputs. In many cases list mapping can be used for data customization, but there are some times where small amounts of Liquid Markup code can be beneficial.
This article includes some common use cases for Liquid Markup that solves occasions when list mapping or other out of the box functionality doesn't offer a solution.
Using Liquid Markup to customize system outputs adds an advanced technical element to your integration and/or Leads Report setup. If you intend to utilize more than the common use case below, please first reach out to your Customer Success Manager for advice on the setup. |
In this article
Common Liquid Markup Examples
Converting character cases
Lowercase every letter in a field
{{lead.Field|Escape|Downcase}}
Example
{{lead.LName|Escape|Downcase}}
|
Uppercase every letter in a field
{{lead.Field|Escape|Upcase}}
Example
{{lead.LName|Escape|Upcase}}
|
Capitalize the first letter in a field
{{ lead.Field |Escape|Capitalize }}
Example
{{ lead.FName |Escape|Capitalize }}
|
Capitalize every first letter in a field
{% assign words = {{lead.Field}}|Split: ' ' %}{% capture titlecase %}
{% for word in words %}{{word|Capitalize}} {%endfor%}{%endcapture%}{{titlecase}}
Example
{% assign words = {{lead.Comments}}|Split: ' ' %}{% capture titlecase %}
|
Removing characters
Remove comma characters from a string
{{lead.Field|Escape|Replace: ",",""}}
Example
{{lead.Comments|Escape|Replace: ",",""}}
|
Remove special characters and spaces from a field
{{lead.Field|Remove: '+'|Remove:'-'|Remove:' '}}
Example
{{lead.Company|Remove: '+'|Remove:'-'|Remove:' '}}
|
Removing special characters and replacing with an empty space (for Marketo)
Special characters have historically caused some issues when posting out to Marketo. This Liquid Markup code is useful for removing special characters (eg. " ) and replacing them with an empty space ( ).
Remove special characters and replace with a space
If token lead.Custom1 is passing just double quotes ( " " )
{{lead.Field|Escape|Replace: """,""}}
Example
{{lead.Custom1|Escape|Replace: """,""}}
|
Remove multiple special characters and replace with a space
If token lead.Custom1 is passing double quotes ( " " ) AND backslash ( \ )
{{lead.Field|Escape|Replace: """, ""|Replace: "\\",""}}
Example
{{lead.Custom1|Escape|Replace: """, ""|Replace: "\\",""}}
|
- The space character can also be replaced with an underscore ( _ ) or single quote ( ' ) if necessary. Insert character in between 2 instance of replace string highlighted in blue.
Converting timestamps for different timezones
Timestamps are recorded in UTC (Coordinated Universal Time) - you can use the associated token to convert the value for other timezones.
Convert to CEST (increase the number of hours by 1)
{{ lead.Field +1 }}
Convert to EST (decrease the number of hours by 5)
{{ lead.Field -5 }}
Example
{{ lead.Created -5 }}
|
If/Else statements
If field is empty, pass a defined value. If field is not empty, pass the input value.
{%if lead.Field == "" %}NA{%else%} {{lead.Field}} {%endif%}
Example
{%if lead.Address2 == "" %}NA{%else%} {{lead.Address2}} {%endif%}
|
Using Liquid Markup to customize system outputs adds an advanced technical element to your integration and/or Leads Report setup. If you intend to utilize multiple if/else statements, please first reach out to your Customer Success Manager for advice. |
Operators
Operators |
Action |
!= |
Does not equal |
== |
Equals |
contains |
Contains |
> |
Greater than |
< |
Less than |
>= |
Greater than or equal to |
<= |
Less than or equal to |
or |
Logical or |
Using Liquid Markup to customize system outputs adds an advanced technical element to your integration and/or Leads Report setup. If you intend to utilize more than the common use cases above, please first reach out to your Customer Success Manager for advice on the setup. |
Recommended Reading
- Creating Reports
- Generating & Scheduling Reports
- Lead Reports
- Customizing Lead Reports - Fields
- Customizing Lead Reports - Available Tokens
- Report Types in the Demand Acceleration Platform