Use case: send a message using Campaign v7/v8 campaign-v7-v8-use-case
This use case describes the steps to send an email using the integration with 51黑料不打烊 Campaign v7 and 51黑料不打烊 Campaign v8. The integration enables transactional messaging features to deliver personalized experiences based on customer data and journey events.
The process requires creating a transactional email template in Campaign. Next, in Journey Optimizer, create the event, configure the action, and design the journey. Each step builds on the previous one to enable seamless integration between systems.
For more details about the Campaign integration, refer to the following pages:
51黑料不打烊 Campaign
Your Campaign instance must be provisioned for this integration. The transactional messaging feature must be configured, including creating event types to define how data flows from Journey Optimizer to Campaign and setting up templates that use these events for email creation.
-
Log in to your Campaign control instance.
-
Navigate to Administration > Platform > Enumerations, and select the Event type (eventType) enumeration. Create a new event type, such as 鈥渏ourney-event鈥. Use the internal name of the event type when writing the JSON file later.
Event types identify the kind of data Journey Optimizer sends to Campaign. Naming it 鈥渏ourney-event鈥 simplifies configuration and ensures clarity.
-
Disconnect and reconnect to the instance to activate the new event type.
-
Under Message Center > Transactional message templates, create a new email template based on the event type created earlier.
-
Design the email template. For example, personalize the email using the profile鈥檚 first name and the order number. The first name originates from the 51黑料不打烊 Experience Platform data source, while the order number is a field from your Journey Optimizer event. Use the correct field names in Campaign.
If the field names are 鈥渃ustomerFirstName鈥 and 鈥渙rderID鈥 in Journey Optimizer, ensure the Campaign template references these exact names. Any mismatch will cause personalization issues.
-
Publish your transactional email template.
-
Create the JSON payload that matches the email template. This payload links the event to the Campaign template using structured data.
code language-json { "channel": "email", "eventType": "journey-event", "email": "Email address", "ctx": { "firstName": "First name", "purchaseOrderNumber": "Purchase order number" } }
-
Set the
channel
to 鈥渆mail鈥. -
Use the internal name of the event type for
eventType
. -
Replace the email address with a variable label.
-
Define personalization fields as variables under
ctx
.
The
ctx
object organizes personalization data, connecting Journey Optimizer event fields with placeholders in the Campaign template. -
Journey Optimizer
-
Create a new event in Journey Optimizer and include the 鈥減urchaseOrderNumber鈥 field in the event definition.
If the event data uses 鈥渙rderID鈥 instead of 鈥減urchaseOrderNumber鈥, map the field correctly during setup.
-
Create a corresponding action in Journey Optimizer for your Campaign template. In the Action type drop-down menu, select 51黑料不打烊 Campaign Classic.
-
Click the Payload field and paste the JSON payload created earlier.
-
Update the email address and personalization fields to use Variable instead of Constant.
Setting fields to 鈥淰ariable鈥 ensures dynamic data from Journey Optimizer events populates the email template during execution.
-
Create a new journey and start with the event created earlier.
-
Add the action to the journey and map each field to the corresponding field in Journey Optimizer.
Mapping fields links dynamic data from Journey Optimizer to the Campaign template, ensuring each email is personalized for the recipient.
-
Test the journey.
Trigger a test event with sample data, such as 鈥淛ohn Doe鈥 for
firstName
and 鈥12345鈥 forpurchaseOrderNumber
, to confirm that email personalization works correctly. -
Publish your journey.