Developer Documentation
Audience Export Endpoints
Audience Exports enable you to export the set of customers that meet the criteria of a KLI® equation. The export is a CSV file with a single column, UCIC. Generating these exports may take several minutes depending on the size of the audience and the complexity of the equation; therefore,the following workflow applies:
- Initiate the generation of an export
- Await its completion by polling the status endpoint
- Once complete the export can be downloaded via the download endpoint
Audience Exports only include known members of the audience set (those with an associated UCIC). Unknown Visitors are never included in an Audience Export.
Initiating Generation of an Export
There are currently three choices for initiating generation of an export.
- Export the audience for a Saved Equation
- Export a Campaign Audience
- Export a Campaign Audience on an Exportable Channel.
Export a Saved Equation
Export an Audience from a Saved Equation
This requires an audience_id
Export a Campaign Audience
This requires a campaign_id
. The campaign must have a status
of ACTIVE
.
Export a Campaign Audience on an Exportable Channel
This requires a known campaign_id
and channel_id
. The campaign must have a status
of ACTIVE
and the channel must be an active export channel. This type of export will generate touchpoints for all members of the audience set. Touchpoints can cause Influences for this campaign and channel. If you are using the export for marketing purposes, this should be your preferred option.
Channels are defined at the partner level. Many campaigns will deliver on the same channel.
Status
When you initiate the generation of an export the response is a status response. The export_id
of the response is used to check its status. You should periodically poll the status endpoint until you receive a status of either DONE
or ERROR
. Exports are generally completed within a few minutes. Polling every second is not necessary. We recommend polling every thirty seconds to a minute.
Once you receive a status of DONE
, you can download the export.
Downloading
Once an export is complete, you may download it. A utility like curl
can be used to download the file. This will still require the Authorization
header. Once you use the Try feature below, a CURL tab will appear with the equivalent curl command.
Expiration
Audience Exports expire seven days after being generated. Once an export has expired, it can no longer be downloaded. If the export is expired, you will receive a response with a 400 status. If the export has expired you can generate a new one. This is to prevent using a stale export as audience membership can change day to day.
Locating Variables for API Calls
audience_id
- From the Segmint platform, use the KLI Search feature to create and save an audience equation.
- Within the KLI Equations module, identify the audience_id using the ID column for each audience saved.
- Utilize the audience_id for request.
campaign_id
- From the Segmint platform, click the Campaigns module
- Locate the Campaign you are exporting an audience for.
- The campaign_id is the numeric identifier in the ID column to the right of the Campaign Name.
partner_id
- If you’ve been assigned a CSR role within the Segmint platform, click on Settings.
- Click on the Partners feature.
- The partner_id is the numeric identifier in the ID column next to the partner name.
channel_id
- From the Segmint platform, click on Channels module.
- Locate the Channel you are exporting.
- The channel_id is the numeric identifier next to the "Channel ID" field.
export_id
- Is returned from the /export endpoints.