Skip to main content

Export promotions as XML

Engage can export assigned/redeemed/deleted promotions as XML files. Engage listens for changes to promotions assigned to contacts and exports these changes on a configurable schedule to the Engage internal FTP-server. The XML files created can be fetched from there and consumed by third-party systems.

Be aware that new and redeemed promotions are exported in separate files even though they are exported in the same run.

Caution

Main promotions are not included in these XML exports, only the assigned promotions for individual contacts that were based on them. If a main promotion is terminated early, it will not be included in the XML export and its assigned promotions will not be automatically cancelled.

Field descriptions

Below are Engage's default export fields. Note that these field names can be changed with a XSLT-transformation created by a product specialist.

Field

Example value

Description

contactId

7b89b95e-6347-4d66-8b02-a10a9c830119

Engage's internal contact GUID

contactKey

4398423

The value of the set key for clients environment

contactType

Member

The contact type of the contact

couponId

32e0f814-eb7b-4857-8c05-a8e900c43e44

The unique id for the contact and promotion combined. Used for redeeming.

description

Spring chainmail promotion

A description of the promotion

promotionId

44a0f722-1f28-4965-a648-a8e8010c86d5

The promotion template id

externalPromotionId

12345

The promotion's ID in another system.

validFromDate

2018-05-26T00:00:00+01:00

When the promotion becomes valid

expireDateTime

2019-05-26T00:00:00+01:00

The expiry date of the promotion

redemptionChannels

Tells you in which channels the promotion can be used.

type

POS or e-com

Value under redemptionChannels. Tells you if that redemption channel is POS or e-com

valuetype

MONEY, PERCENT or EXTERNALOFFER

Value under redemptionChannels. Shows if the promotion is monetary, a percentage or an external promotion

value

20.00

Value under redemptionChannels. The amount to be applied to the receipt as a discount. Can be a percentage (20.00), an amount (100.00) or an external code defined for type EXTERNALOFFER (10OFFSHOES).

instruction

10 % discount

Value under redemptionChannels. A message you can write in Engage which will be presented in the POS for the staff to read.

currency

SEK

The currency is of the monetary discount

storeId

1005

In what store/e-com the promotion was used

storeType

RETAIL/ECOM

If the store was a physical store or an e-com

redeemedDateTime

2020-09-29T08:14:50.0168149+01:00

What date and time the promotion was redeemed

deletedDateTime

2020-09-29T08:14:50.0168149+01:00

What date and time the promotion was deleted in Engage.

Engage's default XML-format

Below you can see the default format of an XML-export (broken into three parts). As mentioned above, the format, if desired, can be transformed and changed into another format more suited for the third party system.

Assigned:

<promotions country="SE">
  <assigned>
    <couponId>c9618bab-ad41-4eae-978e-4836305a9aa8</couponId>
    <promotionId>2eca7904-5b05-4796-bf68-a322e3e4a589</promotionId>
    <contactId>dda2e506-41da-44ae-9950-c12d3e661657</contactId>
    <contactKey>789</contactKey>
    <contactType>Member</contactType>
    <assignedDateTime>2020-09-29T09:27:22.345926+02:00</assignedDateTime>
    <validFromDateTime>2020-09-29T09:27:22.345926+02:00</validFromDateTime>
    <expireDateTime>2020-10-29T09:27:22.345926+01:00</expireDateTime>
    <externalPromotionId>123456</externalPromotionId>
    <description>Description from presentation</description>
    <redemptionChannels>
      <channel>
        <type>POS</type>
        <valueType>EXTERNALOFFER</valueType>
        <instruction>Instruction</instruction>
        <value>POSDISCOUNT20</value>
        <currency>SEK</currency>
      </channel>
      <channel>
        <type>ECOM</type>
        <valueType>EXTERNALOFFER</valueType>
        <value>ECOMDISCOUNT20</value>
      </channel>
    </redemptionChannels>
  </assigned>
...

Redeemed:

...
<redeemed>
    <couponId>d1f4b5c8-4e0b-4f90-9e0c-7c1268ca7119</couponId>
    <promotionId>ab3ac06e-f528-4aef-92d8-f425b26d17d3</promotionId>
    <contactId>113297af-58b8-493b-ada3-f737d6f9d7a5</contactId>
    <contactKey>789</contactKey>
    <contactType>Member</contactType>
    <redeemedDateTime>2020-09-29T09:27:22.345926+02:00</redeemedDateTime>
    <storeId>123</storeId>
    <storeType>RETAIL</storeType>
  </redeemed>
...

Deleted:

...
<deleted>
    <couponId>96e5da31-ec8d-4fb8-a0e4-099dfa8c0e60</couponId>
    <promotionId>d68c6f69-cfcf-433e-8303-3dde2f8db152</promotionId>
    <contactId>df29a1da-821d-4ec6-a1e0-dd2abcc47502</contactId>
    <contactKey>789</contactKey>
    <contactType>Member</contactType>
    <deletedDateTime>2020-09-29T09:27:22.345926+02:00</deletedDateTime>
  </deleted>
</promotions>