Dynamic From: Header Populated from Event Attributes
Overview
This scenario creates an event-triggered campaign with a dynamic sender name and email address. When the Event Loader receives an event for this campaign, it creates an email with a From: address populated from the event attributes.
This scenario depends on two features:
Sender Names are defined using merge tags. In this scenario, a Sender Name is defined using an event attribute merge tag.
When you create an event attribute named FromEmailAddress, Connect automatically uses this attribute in the resulting email From: header.
This scenario makes the following assumptions:
XML
<?xml version="1.0" encoding="UTF-8"?><kanaRoot> <EventRequest Id="" CompanyName="default"> </Customer> <Event CampaignName="ETC3"> <EventAttribute Name="Referrer">Bob Hope</EventAttribute> <EventAttribute Name="FromEmailAddress">bhope@kana.com</EventAttribute> <ExternalXML> <catalog> <cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd> <cd> <title>Greatest Hits</title> <artist>Dolly Parton</artist> <country>USA</country> <company>RCA</company> <price>9.90</price> <year>1982</year> </cd> </catalog> </ExternalXML> </Event> </EventRequest> </kanaRoot>Define Sender Name and Campaign
Before you create the campaign, review the Lists section in the User Guide to create one or more sender names to use in the campaign if you have not already created sender names. After creating sender names, if necessary, create a campaign. Stage the message using the following XML.
<ExternalXML> <catalog> <cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd> <cd> <title>Greatest Hits</title> <artist>Dolly Parton</artist> <country>USA</country> <company>RCA</company> <price>9.90</price> <year>1982</year> </cd> </catalog> </ExternalXML>Continue with the campaign by doing the following:
Schedule the campaign.
Approve the content and launch.
Launch the campaign.
Result
An email is sent to [email protected]. In the From email field, the name and email address displayed is Bob Hope and [email protected].
Note: If event merge tags are used in your message content in any way (such as the sender name, subject, and so on), the corresponding <EventAttribute> must be specified in the incoming KCXML. If not, processing the incoming event fails and the outgoing email is not sent. In this case, contact the Connect administrator to get a copy of the error report.
Optional Subscriptions
Incoming events can pass a subscribeAlways attribute to indicate whether to subscribe the customer to the corresponding conversation when the event is handled by Connect.
If the value passed is false and the customer is currently not subscribed to the conversation, the email corresponding to the event is not sent. However, the customer and attributes existing in the incoming event are updated. Use this as a safety mechanism to avoid targeting unsubscribed customers using event driven campaigns.
An example of this is shown in the code fragment below:
<?xml version="1.0" encoding="UTF-8"?><kanaRoot><EventRequest Id="" CompanyName="Default"> SubscribeAlways="false"> </Customer> <Event ConversationName="conv1" CampaignName="EventDrivenCampaign"> </Event> </EventRequest></kanaRoot> The subscribeAlways attribute applies to pre-existing customers only. Customers loaded using Event Listener and not existing previously in Connect are added to the database, subscribed to the corresponding conversation, and sent the resulting email.
The system parameter, Loadevents ignores subscription status, (Mail Sender | Advanced) indicates whether email for event driven campaigns is sent if the customer’s subscription to the corresponding conversation is not active when the event is processed by the Conversation Manager. If this system parameter is set to true and the subscribeAlways value is set to false in an incoming event, the customer is not subscribed to the conversation, but the event results in an outgoing email.
This change does not apply to customers loaded using the ETL Bulk Loader since subscriptions are loaded using a separate ETL table.