Insert or update customer attributes

Overview

In this scenario, we show how to insert or update a customer’s attributes without sending an email to the customer.

XML

<?xml version="1.0" encoding="UTF-8"?>
<kanaRoot>
<EventRequest Id="" CompanyName="default" CampaignName="camp1">
<Customer EmailAddress="[email protected]" SendEmail="false" Subscription="ignore">
<CustomerAttribute name="Favorite Color">red</CustomerAttribute>
<CustomerAttribute name="Occupation">chef</CustomerAttribute>
</Customer>
</EventRequest>
</kanaRoot>


Result

If the customer with the email address, [email protected], does not have these attributes, they are added to the CUST_ATTRIBUTES table. If the records exist in CUST_ATTRIBUTES, then they are updated with the corresponding customer data. The CUST_SUBSCRIPTION table is left alone.
Note: If the attributes have not been defined, the Event Listener will reject the XML message.

A new row is inserted into the EVENT_QUEUE table with status_code = 3 (handled) for each <Customer>.

No email is sent.