You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/destinations/actions.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -241,10 +241,10 @@ You can't concatenate event variables and plain text with static values and func
241
241
### Liquid syntax
242
242
The liquid syntax function allows you to transform event data with fine-grain control before it reaches cloud-mode destinations using the LiquidJS templating language. Use Liquid templates to clean, format, or conditionally transform data such as user properties, timestamps, or event metadata to meet the requirements of your downstream tools. Liquid templates are applied in the Mappings tab of your Segment workspace, ensuring seamless integration with your event pipeline.
243
243
244
-
### Supported liquid tags and filters
244
+
####Supported liquid tags and filters
245
245
The following LiquidJS tags and filters are supported for Segment mappings. These are carefully selected to ensure performance, security, and compatibility with real-time event processing. Unsupported tags and filters are disabled to prevent performance degradation or security risks.
246
246
247
-
### Supported tags
247
+
####Supported tags
248
248
| Tag Name | Description |
249
249
|-------------------|-------------|
250
250
|`assign`| Assigns a value to a variable for reuse in the template. |
@@ -262,7 +262,7 @@ The following LiquidJS tags and filters are supported for Segment mappings. Thes
262
262
|`unless`| Executes logic if a condition is not true (negation of `if`). |
263
263
|`when`| Part of `case` statements for matching specific values. |
264
264
265
-
### Supported filters
265
+
####Supported filters
266
266
| Filter Name | Description |
267
267
|--------------------------------|-------------|
268
268
|`abs`| Returns the absolute value of a number. |
@@ -329,10 +329,10 @@ The following LiquidJS tags and filters are supported for Segment mappings. Thes
329
329
|`where`| Filters an array based on a property and value. |
330
330
|`xml_escape`| Escapes characters for XML compatibility. |
331
331
332
-
### Examples
332
+
####Examples
333
333
Below are two examples demonstrating how to use Liquid templates in Segment mappings to transform event data for cloud-mode destinations. These examples showcase common use cases like string manipulation and conditional logic.
334
334
335
-
#### Example 1: Standardize email addresses
335
+
#####Example 1: Standardize email addresses
336
336
This example converts an email address to lowercase and removes extra whitespace, ensuring consistency for a destination.
337
337
338
338
```json
@@ -351,7 +351,7 @@ Explanation:
351
351
* The `strip` filter removes leading/trailing whitespace.
352
352
* The `default` filter provides a fallback email if the input is missing.
353
353
354
-
#### Example 2: Transform phone number with conditional logic
354
+
#####Example 2: Transform phone number with conditional logic
355
355
This example formats a phone number by removing non-digit characters, adding a country code, and prepending a plus sign.
0 commit comments