Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Introduction to Sitecore CDP
Data availability
Managing your account
Managing system settings
Managing guests
Batch segmentation
Data browser
Audience export
Dashboards
Developer center
AI in CDP
Glossary
  • Sitecore CDP
  • Audience export
  • Manage audience exports

Manage audience exports

If your instance of Sitecore CDP has a Scheduled or Live segment with at least one segment member, you can start exporting audiences for use outside Sitecore CDP.

Create an export

To create an audience export:

  1. On the navigation menu, click Audience export > Create export.

  2. Determine whether to export full datasets or deltas. To export a full audience, click Full export. Alternatively, to export deltas, click Delta export.

  3. Enter a unique and intuitive name for the export and click Create. The Build screen displays.

After creating an export, you must select an audience and choose an output format for it before you can run it.

Select an audience for an export

Every audience export must have an audience.

To select an audience for the export:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. If you are working with a scheduled export, click Pause so you can access the Build screen.

  3. On the Build screen, in the Audience section, click Add segment to select the segment for this export. Alternatively, if a segment is already specified, click Edit to select a different segment for this export.

  4. Optionally for a full export, to export only a subgroup of the segment, click Filter.

    • Click the condition you want to use to filter the audience.

    • Complete the fields for the condition.

    • Click Save.

Choose and configure the output format

Every audience export must have an output format, which defines the file extension and the structure of the exported data. How you configure an output format depends whether you are in Basic or Advanced mode.

Basic mode

To configure the output format for an audience export:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. If you are working with a scheduled export, click Pause so you can access the Build screen.

  3. On the Build screen, click Output format > Define output. Alternatively, if the output format is already specified, click Edit.

  4. To select Basic mode, at the top of the Define output screen, click Basic.

  5. In File format, choose whether to export the audience as a CSV or a JSON output. You can further customize the CSV output.

  6. On the Output structure tab, click Add column, and in the Header field, enter a unique text for the header.

  7. In the Attribute value field of a string field, you can include various types of data. For example, hardcoded texts such as "20EuroOff" or references to dynamic data in the guest profile such as ${guest.email}.

    Alternatively, in the Attribute value field of a number field, you can include numeric versions of hardcoded or computed integers or floats. For example, 10, 9.99, or ${jsResult.age}. You can also specify the maximum number of digits.

  8. Click Save.

Create JavaScript for an audience export with the Code Assistant

Note

Code Assistant is only available if Sitecore Stream is enabled for your organization.

You can use the Code Assistant to quickly create JavaScript to enrich the audience data that you export from CDP. Whether you’re a developer who wants to save time or a marketer without JavaScript experience, the Code Assistant helps you generate code by simply describing what you need in natural language.

To create JavaScript for an audience export with the Code Assistant:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. If you are working with a scheduled export, click Pause so you can access the Build screen.

  3. On the Build screen, click Output format > Define output. Alternatively, if the output format is already specified, click Edit The edit icon.

  4. Click JavaScript > Code Assistant to open the left-hand pane.

  5. In the left-hand pane, do one of the following:

    • Enter a prompt describing the logic you want to create. Be specific about the criteria, such as guest attributes (gender, city, country), time frames, and the expected return value. See Prompting the Code Assistant for best practices.

    • Select one of the suggested prompts.

    The Code Assistant generates the code. This might take a few minutes.

    Note

    The Code Assistant generates code based on your current prompt and any code that's present in the code editor. It does not consider your prompt history or previous codes in the editor.

    AI responses can vary. Running the same prompt more than once might produce different results.

    After the code is generated, it is labeled with a version number, such as Code Output 1.

  6. To preview the generated code, click View.

    The AI-generated code is labeled with a version number in the left-hand pane.
  7. In the Code Output dialog:

    • To insert the generated code into the editor and replace any existing code, click Replace code.

    • To copy the generated code to your clipboard, click Copy code.

    Important

    AI-generated code might not always be accurate. Always review and test the code before using it.

  8. Optionally, after inserting the code, you can do the following in the code editor:

    • Make manual changes to the code if needed.

    • Click Format JS Format JS icon to format your code changes automatically.

    • Click Undo to revert changes.

  9. Click Save.

After saving, make sure to include the computed data in the output and test the audience export.

Connect a recipe to an audience export

You can connect an audience export in CDP to an active recipe created in Sitecore Connect. By connecting a recipe directly within CDP, you can skip manual steps like copying webhook URLs or switching between Sitecore Connect and CDP. This simplifies the workflow, reduces setup time, and helps you activate campaigns faster.

To connect a recipe to an audience export:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. If the export is not scheduled, on the Build screen, click Sitecore Connect.

    If the export is scheduled, pause the export first, then click Sitecore Connect.

  3. Click Add recipe.

  4. On the Sitecore Connect screen:

    • In the Environment drop-down menu, select the Connect tenant where the recipe was created.

    • Choose the recipe you want to connect. Only recipes with Active status and a Sitecore CDP action are shown.

Once selected, the recipe appears in the Sitecore Connect tile. The audience export is now connected to the Sitecore Connect recipe. Each time the audience export runs, the webhook triggers the connected recipe and performs the defined action.

Set up email notifications

You can get notified by email when the export finishes running. The email contains instructions for downloading the output.

To set up email notifications for the audience export:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. If the export is not scheduled, on the Build screen, click Notifications.

    If the export is scheduled, click the Notifications tab.

  3. To get notified by email, click Notify me. To send additional email notifications to other addresses, click Add recipients. In the Add recipients field, enter an email address, then press Enter.

Add an external connection to an export

You can send the exported data out of Sitecore CDP to third-party systems, such as social media platforms, digital advertising platforms, email marketing apps, and business intelligence (BI) tools, using an external webhook. You can do this by adding an existing connection to an external API to your audience export.

To add an external connection to an audience export:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. If the export is not scheduled, on the Build screen, click Notifications > Add connection, then select the connection for this export.

    If the export is scheduled, click the Notifications tab > Add connection, then select the external connection for this export.

Your audience export is now connected to an external service. The service will receive a webhook notification every time the audience export finishes running.

Test an export

We recommend that you test an export before running it to make sure that the output of the export will contain the data you included in the output following the output structure you configured.

To test an audience export:

  1. Navigate to the Test window depending on where in the application you currently are:

    • If you are on the Define Output screen of an audience export, click Test.

    • If you are elsewhere in the application:

      • On the navigation menu, click Audience export > Audience export, then the export you want to work with.

      • On the audience export page, click Test.

        Note

        If you are working with a scheduled export, click Pause so you can access the Test button.

  2. In the Test window, click Test scenario.

  3. Select a guest for the test:

    • To use a random guest for the test, click the search field, and then in Quick select, click Visitor or Customer.

    • To use a guest from the specific segment used in the audience export, on the Build screen, in the Audience section, click the segment name to open it. View the segment's usage and details, and from the Usage section, copy a guest reference. Then, paste the copied reference into the search field.

  4. Click Test. The test runs for the guest.

  5. Click Response. If the test is successful, the output of the export for this guest displays in Output.

    If the test is unsuccessful, an error displays in Output. Additional JavaScript logs display in Logs. See common errors and how to fix them.

Run a full export instantly

After you select an audience for a full export and choose the output format, you can run the export.

To run a full audience export instantly:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. If you are working with a scheduled export, click Pause so you can access the Run now button.

  3. Click Run now. The export starts running.

    After the audience export finishes running, you can download the output on the same page in Activity > Finished exports, by clicking Download output.

    If you have set up email notifications or added a connection to the export, a notification will be sent.

Schedule a full export

After you select an audience for a full export and choose the output format, you can run the export.

To run a full audience export on schedule at repeated intervals:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. Click Schedule.

  3. On the Schedule audience export screen, specify the following settings:

    • The Start date - choose when the export will run for the first time.

    • The End date - choose when the export will run for the last time. When you select a custom end date, it defaults to one year from today. Use the date picker to choose a different date.

    • The Repeat interval - choose how often the export will run.

    • The Run time - choose at what time of day the export will run.

  4. On the Summary pane, review the schedule details.

  5. Click Schedule. The export will run based on the schedule settings.

    After the audience export finishes running for the first time, you can download the output on the same page in Activity > Finished exports, by clicking Download output.

    If you have set up email notifications or added a connection to the export, a notification will be sent.

Schedule a delta export

After you select an audience for a delta export and choose the output format, you can run the export by scheduling it to run once a day.

To schedule a delta audience export on a daily schedule:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. Click Schedule.

  3. On the Schedule audience export screen, specify the following settings:

    • The Start date - choose when the export will run for the first time.

    • The End date - choose when the export will run for the last time. When you select a custom end date, it defaults to one year from today. Use the date picker to choose a different date.

    • The Run time - choose at what time of day the export will run.

  4. On the Summary pane, review the schedule details.

  5. Click Schedule. The export will run based on the schedule settings.

    After the audience export finishes running for the first time, you can download the output on the same page in Activity > Finished exports, by clicking Download output.

    If you have set up email notifications or added a connection to the export, a notification will be sent.

Enable and disable downloading the output

Team members with an Admin role in Sitecore Cloud Portal can enable and disable the ability to download the output of an audience export directly from Sitecore CDP. This applies to all users in the tenant.

To enable or disable downloading the output directly from Sitecore CDP:

  1. On the navigation menu, click > Manage features.

  2. Next to Audience export files download, turn the switch on to enable, or turn it off to disable downloading the output.

  3. Click Save.

Download the output

Note

Your Sitecore CDP administrator controls whether you can download the output.

After the audience export finishes running, one way you can access the exported data is by downloading the output directly from Sitecore CDP.

To download the output of an audience export:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. Click Activity > Finished exports > Download output.

Pause an export

If you want to edit a scheduled export, for example, reschedule, test, delete, or change the output structure of a scheduled export, or run a scheduled full export instantly, you first have to pause it.

You can run a full export instantly even when it's paused.

To pause an audience export:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. Click Pause > Pause. You can now access the Build screen and edit the export.

Resume an export

You can resume a paused export so it will run on schedule again.

You can run a full export instantly even when it's paused.

To resume a paused audience export:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. Click Schedule, then schedule the export.

Copy an export

You can create a copy of an export, when, for example, you want a duplicate of an existing export with small differences.

To create a copy of an audience export:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. Click ellipsis > Duplicate.

  3. Enter a unique and intuitive name for the new export and click Create. The Build screen of the new export displays.

Delete an export

You can delete an export when you know for certain that no one in your organization needs to use the export.

To delete an audience export:

  1. On the navigation menu, click Audience export, then the export you want to work with.

  2. If you are working with a scheduled export, click Pause so you can access the Delete button.

  3. Click ellipsis > Delete > Delete.

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore