Audience metadata management
Use audience metadata templates to programmatically create, update, or delete audiences in your destination. Adobe provides an extensible audience metadata template, which you can configure based on the specifications of your marketing API. After you define, test, and submit the configuration, it will be used by Adobe to structure the API calls to your destination.
You can configure the functionality described in this document by using the /authoring/audience-templates
API endpoint. Read create a metadata template for a complete list of operations you can perform on the endpoint.
When to use the audience metadata management endpoint when-to-use
Depending on your API configuration, you may or may not need to use the audience metadata management endpoint as you configure your destination in Experience Platform. Use the decision tree diagram below to understand when to use the audience metadata endpoint and how to configure an audience metadata template for your destination.
Use cases supported by audience metadata management use-cases
With audience metadata support in Destination SDK, when you configure your Experience Platform destination, you can give Platform users one of several options when they map and activate audiences to your destination. You can control the options available to the user via the parameters in the Audience metadata configuration section of the destination configuration.
Use case 1 - You have a 3rd party API and users don’t need to input mapping IDs
If you have an API endpoint to create/update/delete audiences or audiences, you can use audience metadata templates to configure Destination SDK to match the specs of your audience create/update/delete endpoint. Experience Platform can programmatically create/update/delete audiences and synchronize metadata back to Experience Platform.
When activating audiences to your destination in the Experience Platform user interface (UI), users don’t need to manually fill in an audience mapping ID field in the activation workflow.
Use case 2 - Users need to create an audience in your destination first and are required to manually input mapping ID
If audiences and other metadata need to be created by partners or users manually in your destination, then users must manually fill in the audience mapping ID field in the activation workflow to sync the audiencemetadata between your destination and Experience Platform.
Use case 3 - Your destination accepts the Experience Platform audience ID, users don’t need to manually input mapping ID
If your destination system accepts the Experience Platform audience ID, you can configure this in your audience metadata template. Users do not have to populate an audience mapping ID when activating a segment.
Generic and extensible audience template generic-and-extensible
To support the use cases listed above, Adobe provides you with a generic template that can be customized to adjust to your API specifications.
You can use the generic template to create a new audience template if your API supports:
- The HTTP methods: POST, GET, PUT, DELETE, PATCH
- The authentication types: OAuth 1, OAuth 2 with refresh token, OAuth 2 with bearer token
- The functions: create an audience, update an audience, get an audience, delete an audience, validate credentials
The Adobe engineering team can work with you to expand the generic template with custom fields if your use cases requires it.
Supported template events supported-events
The table below describes the events supported by audience metadata templates.
create
update
delete
validate
notify
createDestination
updateDestination
deleteDestination
Configuration examples configuration-examples
This section includes examples of generic audience metadata configurations, for your reference.
Notice how the URL, headers, and request bodies differ between the three example configurations. This is due to the different specifications of the three sample platforms’ marketing API.
Note that in some examples, macro fields like {{authData.accessToken}}
or {{segment.name}}
are used in the URL, and in other examples these are used in the headers or request body. Their usage depends on your marketing API specifications.
code language-json |
---|
|
code language-json |
---|
|
code language-json |
---|
|
code language-json |
---|
|
Find descriptions of all parameters in the template in the Create an audience template API reference.
Macros used in audience metadata templates macros
To pass information such as audience IDs, access tokens, error messages, and more between Experience Platform and your API, the audience templates include macros that you can use. Read below a description of the macros that are used in the three configuration examples on this page:
{{segment.alias}}
{{segment.name}}
{{segment.id}}
{{customerData.accountId}}
{{oauth2ServiceAccessToken}}
{{authData.accessToken}}
{{authData.accessToken}}
if Experience Platform should use non-expiring tokens to connect to your destination, otherwise use {{oauth2ServiceAccessToken}}
to generate an access token.{{body.segments[0].segment.id}}
externalAudienceId
.{{error.message}}
{{{segmentEnrichmentAttributes}}}
create
, update
, and delete
events. Enrichment attributes are available only for custom upload audiences. See the batch audience activation guide to see how enrichment attribute selection works.{{destination.name}}
{{destination.sandboxName}}
{{destination.id}}
{{destination.imsOrgId}}
{{destination.enrichmentAttributes}}
createDestination
, updateDestination
, and deleteDestination
events. Enrichment attributes are available only for custom upload audiences. See the batch audience activation guide to see how enrichment attribute selection works.{{destination.enrichmentAttributes.<namespace>.<segmentId>}}