The Unique Promotion Assignment use case is designed for advanced personalization, allowing you to deliver 1-to-1 offers that are specific to an individual customer and the campaign they are part of. By using a 'composite key' that combines both the Customer ID and Campaign ID, you can look up unique promotional details from a single data source. This powerful technique supports complex campaign mechanics, such as issuing unique coupon codes per user, and ensures the highest level of targeting without needing to create separate templates.
Problem Statement
Each user gets a personalized promotion tied to a specific campaign, but there’s no simple way to fetch and show the correct promotion for that unique user-campaign combination within a single message template.
Goal
A user receives a promotion tied to a specific campaign, and the promotional details must be displayed only when both the user and campaign IDs match the criteria in your data source.
Solution
Data Connections can bring in campaign-specific personalization at the user level. By creating a Data Connection with a composite key (e.g., merging `[%CUSTOMER_ID%]` and `[%CAMPAIGN_ID%]`), you can use this unique key in your template formulas to look up and display hyper-targeted content for each user.
Implementation
Step 1: Create a Data Connection with a Composite Key
Before uploading your data, you must merge the user and campaign IDs into a single field to act as the primary key. A common format is to use an underscore as a delimiter, like this: [%CUSTOMER_ID%]_[%CAMPAIGN_ID%].
Example Data Structure:
Here, user_campaignid = [%CUSTOMER_ID%]_[%CAMPAIGN_ID%].
Example JSON Data:
[
{
"user_campaignid": "12345_7890",
"promocode": "SUM20OFF",
"discount_condition": "Get 20% off all items",
"expiry_date": "2025-10-10"
},
{
"user_campaignid": "67890_7890",
"promocode": "BOGO50",
"discount_condition": "Buy 1 get 1 50% off",
"expiry_date": "2025-10-10"
}
]Step 2: Use the Composite Key in Formulas
In your template, use the merged user_campaignid key to retrieve the correct data. Since the formula builder does not support creating composite keys directly, you must type the key manually into the template after generating a base formula.
Demonstration:
Example Formulas:
Promo Code: [%DC_abc45678:[%CUSTOMER_ID%]_[%CAMPAIGN_ID%]::promocode:%]
Condition: [%DC_abc45678:[%CUSTOMER_ID%]_[%CAMPAIGN_ID%]::discount_condition:%]
Expiry Date: [%DC_abc45678:[%CUSTOMER_ID%]_[%CAMPAIGN_ID%]::expiry_date:%]abc45678 with your actual Data Connection UUID.Limitations
Composite keys are not supported in Preview or Test Send if any part of the key is a general tag (like [%CAMPAIGN_ID%]) or a content function.
Outcome
This approach allows for highly targeted, user-specific promotional content and provides a scalable integration between your promotion engine and Optimove without needing to clone templates for different segments.