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:

You 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 to keep an up-to-date copy of the Talon.One data in your 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, do the following:

    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, do the following:
      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, do the following:
      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 you can tune the sleep interval to balance between the number of API requests performed and the latency of updates to your data warehouse.

note

Depending on the sophistication of your existing BI tools, you can normalize the nested event/effect data in step 4.1.

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

If you don't have a data warehouse or cannot automate data exports, read the next section about exporting data manually.

Manually exporting data

If you're automating exports, or for one-time exports, you can manually export customer sessions, triggered effects, and loyalty point transactions.

important

Customer profiles cannot be manually exported.

Exporting customer sessions

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

You can export the CSV file in the following ways:

Exporting triggered effects

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

You can export the CSV file in the following ways:

Exporting loyalty balances

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

Exporting loyalty transaction logs

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