Skip to main content

Exporting Talon.One data

You can export data from Talon.One to use it in other marketing tools, run reports or analyze it as part of your BI strategy in case your integration landscape includes an existing data warehouse.

Talon.One also offers reporting on the data it receives as statistics such as campaign performance and customer activity over a time period. You can export this data, depending its type, via one of more of the following options:

note

In the exported file, all timestamp values follow UTC+00:00.

In this tutorial, let's export the following types of data:

We can automate exports of customer sessions, customer profiles and triggered effects. Loyalty data can only be exported manually.

note

To export loyalty data, create a loyalty program, connect it to the Application and use it in one or more campaigns.

Automating data exports

Let's automate data exports for customer sessions, customer profiles and triggered effects.

important

Loyalty data can only be exported manually.

This is the recommended option if we want to keep an up-to-date copy of the Talon.One data in our data warehouse.

You can automate the data export using the Management API as follows:

  1. Initialize a lastSync variable. It represents the last time you exported data.

    If you already have received events from Talon.One: set this variable to the created timestamp of the latest event you received.

    If no events have been received, set the variable to the created timestamp of your Application. Get the timestamp with the List Applications endpoint.

  2. Create the following empty sets:

    • profilesToFetch
    • sessionsToFetch
  3. Request all events created after your last sync using the List Applications events endpoint. Set the createdAfter query parameter to the value of lastSync.

    The response contains an totalResultSize property and a data array containing events.

  4. For each event in response.data:

    1. Store a new talon_one_event record in your data warehouse.
    2. If event.sessionId is non-zero, add it to the sessionsToFetch set.
    3. If event.profileId is non-zero, add it to the profilesToFetch set.
    4. Set lastSync to event.created.
  5. If response.totalResultSize is equal to the number of items in response.data:

    1. For each ID in profilesToFetch:
      1. Fetch the profile using the List customer profiles matching the given attributes endpoint.
      2. Store a timestamped talon_one_profile_snapshot record in your data warehouse.
    2. For each ID in sessionsToFetch:
      1. Fetch the session using the List Application sessions endpoint.
      2. Store a timestamped talon_one_session_snapshot record in your data warehouse. . Sleep for 1-5 minutes.
  6. Repeat from step 3.

This process can be run continuously, and we can tune the sleep interval to balance between the number of API requests performed and the latency of updates to our data warehouse.

note

Depending on the sophistication of our existing BI tools, we might want to normalize the nested event/effect data at step 4.1.

To learn more on the structure of events and how to interpret the event.effects array, see API effects.

If we don't have a data warehouse or cannot automate data exports, let's read the next section to export data manually.

Manually exporting data

If automating exports or for seldom exports, we can manually export customer sessions, triggered effects and loyalty point transactions.

important

Customer profiles cannot be manually exported.

Exporting customer sessions

We can export our customer sessions as CSV and check specific information about our Application, such as what items were purchased in a certain session, or manually import the data into our data warehouse.

We can export the CSV as follows:

Exporting triggered effects

We can export triggered effects as CSV and check specific information, such as how many times a given coupon code was redeemed, or manually import the data into our data warehouse.

We can export the CSV as follows:

Exporting loyalty balances

We can export as CSV the point balances of all users of a loyalty program for a given date and time using the Campaign Manager. See:

Exporting loyalty transaction logs

We can export as CSV all loyalty point transactions made by a given customer using the Campaign Manager. See exporting transactions.