Concept

Events are the connectors to your source system. Using events, you define which data in which data type Inxmail Commerce expects from the source system. All data the editor needs for personalising the mailings belonging to this event must be defined in the event configuration.

Example: data transfer for an event

Event configuration:

Copy
<?xmlversion="1.0" encoding="UTF-8" standalone="no"?>
<event >
    <eventtype>
        <id>example_event_id</id>
    </eventtype>
    <customermapping/>
    <customeremail>Customer.Email</customeremail>
    <phgroup>
        <id>Customer</id>
        <placeholder>
            <id>Email</id>
            <datatype-string/>
        </placeholder>
    </phgroup>
</event>

Data that is transferred for the event via REST API:

Copy
curl -X POST -u 'keyid:secret' -H 'Content-Type: application/json' -d '{ "event": "example_event_id","payload": {"Customer": { "Email": "email@invalid.invalid" }}' 'http://{spaceid}.api.inxmail-commerce.com/api-service/v1/events'

Note: You can create the JSON structure corresponding to the event configuration using the button Generate JSON.

Structure of an event

Copy
<eventtype>
    <id>example_event_id</id>
</eventtype>

The <id> of the <eventtype> is the key of the event and defines the mapping of incoming data to an event.

Note: This <id> cannot be changed once the event has been created.

Copy
<customermapping/>

(Optional) An email address is not necessarily always uniquely assigned to one customer. If you need a precise assignment for subsequent analysis of response data, you can provide a unique ID for the customer (e.g. customer number). The placeholder containing this value is to be referenced with the tag <customermapping>.

Copy
<customeremail>
Customer.Email
</customeremail>

The <customeremail> tag defines which data field contains the email address to which the sending of the mail is to be triggered when the data is received.

Copy
<phgroup>
    <id>Customer</id>
    <placeholder>
        <id>Email</id>
        <datatype-string/>
    </placeholder>
</phgroup> 

<placeholder>s represent the data value of incoming data. Here the <id> also serves as a key for mapping the incoming data value. For every <placeholder> you need to define its <datatype>. <placeholder>s need to be nested in placeholder groups<phgroup>. The purpose of this is improve the clarity for the editor when using placeholders in creating mailings.

Conventions

<id>s of <placeholder>,<phgroup> or <phlist> must start with a capital letter. The individual elements can be nested to any depth.

Available data types

For later calculations or localisations in the mailing, it may be necessary for certain incoming data not to be interpreted as a string. In this case, the following data types are available:

Data type

Description

<datatype-string/>

Use for incoming data of the type String.

<datatype-integer/>

Use for incoming numerical data up to 32-bit.

<datatype-long/>

Use for incoming numerical data up to 64-bit.

<datatype-double/>

Use for incoming numerical data with decimal separator up to 64-bit.

<datatype-boolean/>

Use for incoming binary data.

<datatype-datetime/>

Use for incoming data values.

Using lists

Copy
<phlist>
    <id>OrderItems</id>
    <placeholder>
        <id>Sku</id>
        <datatype-string/>
    </placeholder>
</phlist>

If you would like to provide an array of data for one individual placeholder within an event, these placeholders must be embedded within placeholder lists <phlist>.

Assigning interface names (optional)

Copy
<placeholder>
    <id>ID</id>
        <translation language="en">CustomerId</translation>
        <translation language="de">KundenId</translation>
</placeholder>

If no translations are specified for the GUI, the <id>s for the selection in the GUI are used for the individual placeholders and groups.

You can use <translation language="en/de"> to purposefully store clearly understandable translations for the editor.

Setting up permission-based tracking (optional)

Copy
<customertracking>Customer.Tracking</customertracking>

The <customertracking> tag defines which data field contains the information on consent to person-based tracking.

Copy
<placeholder>
    <id>Tracking</id>
        <translation language="en">Tracking</translation>
        <translation language="de">Tracking</translation>
        <datatype-boolean/>
</placeholder>

The data value is correctly transferred via a <placeholder> tag.

The placeholder must be of the Boolean data type.

Further information

For more information on event configuration, please see the section Events in the online help.