The Merge Symbol endpoint is used request information about the Merge Symbols used in your Campaigns.
Merge Symbols are textual representations of field names, and are used when personalizing the content of a message. For example, instead of using "Hello Customer" as a greeting, you could replace "Customer" with the recipient's actual first name, by pulling values from a "first name" field in your source table. Within the Advanced Editor, the platform would display this statement using a Merge Symbols such as: "Hello {(first_name)}."
When you add a personalization field to your message content, you can optionally apply a formatting mask to the field. The formatting mask is used to control the appearance of the text in the field. For example, you can format date fields as "mm/dd/yyyy." The selected formatting mask is represented within the Merge Symbol using a variety of different codes. Continuing the previous example, the "mm/dd/yy" date field format mask is represented by the code: "d:d." Therefore, the Merge Symbol for this field would be: "{(date_field||d:d)}."
Merge Symbols are also used when you insert items, such as Content Blocks, into the content of a message. For example, let's say you inserted a Content Block named "Silver Rewards Content" into a message. Within the Advanced Editor, the platform would represent this Content Block using a Merge Symbol consisting of the Block's name and Object Reference ID enclosed in double-brackets. For example: "{(Silver Rewards Content|8687)}."
Endpoint (North America): https://api.eccmp.com/services2/api/MergeSymbol
Endpoint (Europe): https://api.ccmp.eu/services2/api/MergeSymbol
Endpoint (Japan): https://api.marketingsuite.jp/services2/api/MergeSymbol
For more details on the Merge Symbol API, please see the Merge Symbol API Technical Guide.
The Merge Symbol endpoint supports the following GET operations.
This endpoint allows you to retrieve a list of the Merge Symbols for various system fields and your custom metadata fields (see Metadata Settings for more details on your custom metadata fields).
Click hereClick here to see a sample response message in JSON format.
[
{
"key": "Personal URL",
"value": "{[PersonalURL]}"
},
{
"key": "Pk ID",
"value": "{[PkID]}"
},
{
"key": "Message ID",
"value": "{[MessageID]}"
},
{
"key": "Campaign ID",
"value": "{[CampaignID]}"
},
{
"key": "Tracking Params",
"value": "{[TrackingParams]}"
},
{
"key": "To Address Value",
"value": "{[ToPropertyValue]}"
},
{
"key": "Metadata Field - test123",
"value": "{(meta:test)}"
},
{
"key": "Metadata Field - Creative Type",
"value": "{(meta:creative_type)}"
},
{
"key": "Metadata Field - Campaign_Type",
"value": "{(meta:campaign_type)}"
},
{
"key": "URLs - View As Web Page",
"value": "http://!INSERT_DOMAIN_NAME!/ats/msg.aspx?sg1={(URLSignature1)}"
},
{
"key": "URLs - Barcode Image",
"value": "http://!INSERT_DOMAIN_NAME!/ats/barcode.ashx?bc=!ENTER_VALUE!"
}
]
This endpoint allows you to retrieve a list of the Merge Symbols for all the fields within a specified Table, by providing the Table's Object Reference ID.
Click hereClick here to see a sample response message in JSON format.
[
{
"key": "AccNo",
"value": "{(ac)}"
},
{
"key": "Phone",
"value": "{(phone)}"
},
{
"key": "Phone 64207 - CNV Shared Short Code (29) Status ID",
"value": "{(phone_sp29_status_id)}"
},
{
"key": "First Name",
"value": "{(first_name)}"
},
{
"key": "Last Name",
"value": "{(last_name)}"
},
{
"key": "Email",
"value": "{(email)}"
},
{
"key": "pk_recipient_id",
"value": "{(pk_recipient_id)}"
}
]
This endpoint allows you to retrieve the Merge Symbol for an item, by providing the item's Object ID.
Click hereClick here to see a sample response message in JSON format.
{
"merge_symbol_value": "{[Silver Rewards Content|52732]}",
"obj": {
"obj_id": 45990,
"display_name": "Silver Rewards Content",
"type_id": "ContentBlock",
"ref_id": 52732,
"parent_obj_id": 37249,
"eligibility_status_id": "READY"
}
}
This endpoint allows you to retrieve the Merge Symbol for an item, by providing the item's type and Object Reference ID.
Click hereClick here to see a sample response message in JSON format.
{
"merge_symbol_value": "{[Silver Rewards Content|52732]}",
"obj": {
"obj_id": 45990,
"display_name": "Silver Rewards Content",
"type_id": "ContentBlock",
"ref_id": 52732,
"parent_obj_id": 37249,
"eligibility_status_id": "READY"
}
}
When you add a personalization field to your message content, you can optionally apply a format mask to the field. The format mask is used to control the appearance of the text in the personalization field. The selected format mask is represented within the Merge Symbol using a variety of different codes. This endpoint allows you to retrieve a list of these format mask codes.
Click hereClick here to see a sample response message in JSON format.
[
{
"key": "Padded Number(000###)",
"value": "n:"
},
{
"key": "Number(##,###)",
"value": "n:N0"
},
{
"key": "Money(##,###)",
"value": "f:N0"
},
{
"key": "Money with Decimals(##,###.##)",
"value": "f:N2"
},
{
"key": "Money with Currency Symbol(¤##,###)",
"value": "f:C0"
},
{
"key": "Money with Currency Symbol and Decimals(¤##,###.##)",
"value": "f:C2"
},
{
"key": "Date Only - Short(mm/dd/yyyy)",
"value": "d:d"
},
{
"key": "Date Only - Long(dddd, MMMM dd, yyyy)",
"value": "d:D"
},
{
"key": "Time Only - Short(h:mm tt)",
"value": "d:t"
},
{
"key": "Time Only - Long(h:mm:ss tt)",
"value": "d:T"
},
{
"key": "Date & Time - Short(mm/dd/yyyy h:mm tt)",
"value": "d:g"
},
{
"key": "Date & Time - Long(dddd, MMMM dd, yyyy h:mm:ss tt)",
"value": "d:f"
},
{
"key": "Date - Month & Day(MMMM dd)",
"value": "d:m"
},
{
"key": "Date - Month & Year(MMMM, yyyy)",
"value": "d:M"
},
{
"key": "Date - Custom(any date format yyyy-MM-dd)",
"value": "d:"
},
{
"key": "Truncate Left(only show the first X characters from the left)",
"value": "SSL"
},
{
"key": "Truncate Right(only show the first X characters from the right)",
"value": "SSR"
},
{
"key": "URL Encode(for including data in links)",
"value": "URL"
}
]
Back to API Category - Data Management