Event Create with KCXML
Create Event KCXML
Create Event KCXML allows the API to send KCXML to Connect to process. This is the same as submitting an KCXML to the Event Listener. Check Event Listener Scenarios on examples of how the Event Listener works.
Usage: POST /data/event/kcxml
Returns: KCXML Response
Example POST Data
<?xml version="1.0" encoding="UTF-8"?><kanaRoot> <EventRequest Id="" CompanyName="default"> </Customer> <Event CampaignName="ETCamp1"> <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>
POST data should be text KCXML. At minimum the KCXML should contain customer and event xml element and/or event parameters if these are required by the event-triggered campaign definition.
Example XML Response Data
<EventResponse><EventStatus EventQueueId="304"><StatusCode>1</StatusCode><Description>New</Description><CustomerKey Name="EmailAddress">customer@email.com</CustomerKey></EventStatus>Create Event KCXML, return JSON
This is a variant of the KCXML entry entry point that returns the result in JSON format instead of XML.
Usage: POST /data/event/kcxmlToEvent
Returns: JSON Response
Example POST Data
<?xml version="1.0" encoding="UTF-8"?><kanaRoot> <EventRequest Id="" CompanyName="default"> </Customer> <Event CampaignName="ETCamp1"> <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>
POST data should be text KCXML. At minimum the KCXML should contain customer and event xml element and/or event parameters if these are required by the event-triggered campaign definition.
Example JSON Response Data
{ "id":304, "eventName":"Generic Event", "eventId":1120, "status":1, "effectiveDate":1379686260000, "customerId":38508, "xml":"<catalog>...</catalog>", "externalId":0,}