Skip to content

Commit 5b221e3

Browse files
authored
Merge pull request #7151 from segmentio/actions-mapping-concat
Explain how to concatenate values in Actions mappings
2 parents 3c7bcd7 + a134eae commit 5b221e3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/connections/destinations/actions.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,14 @@ The coalesce function takes a primary value and uses it if it is available. If t
210210

211211
The replace function allows you to replace a string, integer, or boolean with a new value. You have the option to replace up to two values within a single field.
212212

213+
### Concatenate function
214+
215+
To combine two values in the event variable field, you can concatenate them using plain text and variables together. For example, to prepend the country code to a phone number, enter `+1{{Phone Number}}`.
216+
217+
Segment evaluates this field as a string, so placing text next to a variable automatically concatenates them.
218+
219+
![Mapping UI showing two concatenated fields: "+1 phone" and "context.page.url context.page.path"](images/mapping-concatenation.png)
220+
213221
### Flatten function
214222

215223
The flatten function allows you to flatten a nested object to an object with a depth of 1. Keys are delimited by the configured separator. For example, an object like {a: { b: { c: 1 }, d: 2 } } will be converted to { 'a.b.c': 1, 'a.d': 2 }.
@@ -219,7 +227,6 @@ The flatten function allows you to flatten a nested object to an object with a d
219227
> info ""
220228
> Self-service users can add a maximum of two conditions per Trigger.
221229
222-
223230
Mapping fields are case-sensitive. The following type filters and operators are available to help you build conditions:
224231

225232
- **Event type** (`is`/`is not`). This allows you to filter by the [event types in the Segment Spec](/docs/connections/spec).
Loading

0 commit comments

Comments
 (0)