Create predictive audience
Learn how to create a predictive custom audience using the create audience endpoint.
Overview
Predictive audiences use Walmart machine learning models to identify customers who are likely to take a future action based on shopping behavior, browsing activity, and audience similarity signals.
Unlike rule-based audiences, predictive audiences use modeled behavior rather than historical qualification rules.
Predictive audiences are commonly used for:
- Customer acquisition
- Product launches
- Incremental reach
- Seasonal campaigns
- Growth-focused media strategies
Availability
Supported for Onsite Display only.
How predictive audiences work
Predictive audiences are created by submitting audience criteria that Walmart uses to train and validate machine learning models.
Predictive audience lifecycle
Create
Submit predictive audience criteria.
Model Training
Machine learning models evaluate customer signals.
Validation
Audience quality and eligibility are verified.
Available
Audience becomes eligible for targeting.
Activate
Apply audience to ad group targeting.
ImportantA successful audience creation request does not mean the audience is immediately targetable.
Always confirm the audience status is
AVAILABLEbefore applying it to an ad group.
Choosing a predictive audience type
Use the table below to determine which predictive audience strategy best matches your objective.
| Goal | Recommended audience type |
|---|---|
| Acquire competitor customers | Brand Affinity |
| Reach likely future buyers | Brand Affinity |
| Promote specific products | Item Propensity |
| Launch new products | Item Propensity |
| Promote seasonal products | Item Propensity |
| Scale successful audiences | Lookalike |
| Expand reach efficiently | Lookalike |
Common campaign patterns
Customer Acquisition
Use Brand Affinity audiences to reach competitor customers and likely future buyers.
Product Growth
Use Item Propensity audiences to promote products to high-intent shoppers.
Scale & Expansion
Use Lookalike audiences to expand successful audience strategies.
Before you begin
-
Valid
advertiserId -
Supporting assets validated based on audience type:
- Targeting Item sets in
BUILTstatus - Seed audience IDs
- Valid taxonomy hierarchy
- Targeting Item sets in
Endpoint
POST /api/v1/audiences
POST /api/v1/audiencesRequest details
How this request is used
Creates a predictive custom audience for use in Onsite Display targeting.
Key fields and behaviors
-
attribute
Predictive audience type:BRAND_AFFINITYITEM_PROPENSITYLOOKALIKE
Audience definition behavior
All predictive audiences use the same high-level structure.
The contents of audienceCriteria vary depending on the predictive audience type.
{ "audienceDefinition": { "audienceCriteria": { "predictiveCriteria": { "predictiveSpecificFields": {} } } }, "audienceType": "CUSTOM"
}Predictive audience types
What it is
Brand Affinity audiences identify customers likely to engage with a specific brand based on shopping behavior and category relationships.
Best used for
- Competitive conquesting
- Customer acquisition
- New-to-brand growth
- Loyalty expansion
How Brand Affinity works
Models evaluate:
- Brand purchase behavior
- Category relationships
- Loyalty signals
- Switching behavior
Supported strategies
| Strategy | Description |
|---|---|
BRAND_LOYALISTS | Customers highly loyal to your brand |
BRAND_SWITCHERS | Customers who frequently switch brands |
BRAND_PROSPECTS | Customers likely to purchase your brand |
What it is
Item Propensity audiences predict which customers are likely to purchase a product, category, or item set.
Best used for
- Product launches
- Seasonal promotions
- Conversion campaigns
- ROAS optimization
How Item Propensity works
Models evaluate:
- Purchase behavior
- Seasonal trends
- Similar shopper behavior
- Product relationships
Supported strategies
| Strategy | Best for |
|---|---|
PROMOTE_SEASONAL_PRODUCTS | Seasonal demand |
PROMOTE_BRAND_NEW_PRODUCTS | Product launches |
IMPROVE_ROAS | Conversion optimization |
What it is
Lookalike audiences identify customers with behavior similar to an existing audience.
Best used for
- Scaling successful campaigns
- Expanding audience reach
- Acquisition initiatives
- Prospecting
How Lookalike works
Models evaluate:
- Shopping behavior
- Engagement patterns
- Purchase activity
- Category affinity
Supported seed audiences
- Rule-Based Audiences
- Brand affinity audiences
- Item Set-Based Item Propensity Audiences (category-based item sets are not supported)
Taxonomy hierarchy and category
Both Brand Affinity and Item Propensity custom audiences defintitions require an understanding of Walmart's retail taxonomy and how these categories are used in requests.
Taxonomy hierarchy
Category objects define where products exist within Walmart's retail taxonomy.
Audience definition
Brand Affinity audiences use the brandAffinityCriteria object within audienceDefinition.audienceCriteria to define the targeting logic.
The object contains three required parameters:
brands
List of brands to target. Customers matching any listed brand are included using OR logic.brandAffinityType
Determines whetther the audience targetsBRAND_SWITCHERS,BRAND_LOYALISTS, orBRAND_PROSPECTScategories
Category hierarchy requirements
Each Brand Affinity audience request must include the full three-level category hierarchy.
| Level | Description |
|---|---|
1 | Department |
2 | Category, including its parent department |
3 | Subcategory, including its parent category and department |
Each categories entry contains a category object with name and level values representing the hierarchy.
Important rules:
- All three hierarchy levels (
1,2, and3) are required. - At least one complete category hierarchy must be provided.
- Each specified category must be valid for at least one brand in the
brandsarray. - Requests containing categories that are not associated with any selected brand are invalid.
Category hierarchy validationBrand Affinity requests must include the complete department, category, and subcategory hierarchy. All specified categories must be associated with at least one selected brand.
Department, category, and subcategory names are case-sensitive. Use the exact names returned by the corresponding discovery APIs.
For the shared Create Audience request fields and endpoint behavior, see Create Custom Audience.
Sample request
Brand affinity audience
curl -X POST \ 'https://developer.api.us.stg.walmart.com/api-proxy/service/display/api/v1/api/v1/audiences' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>' \ --header 'WM_SEC.AUTH_SIGNATURE: **************' \ --header 'WM_SEC.KEY_VERSION: 1' \ --header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \ --header 'WM_CONSUMER.intimestamp: 1565309779' \ --data '{ "name": "Test brand affinity audience", "description": "example description", "advertiserId": 190000, "audienceType": "CUSTOM", "audienceObjective": ["REACH"], "attribute": "BRAND_AFFINITY", "audienceDefinition": { "audienceCriteria": { "brandAffinityCriteria": { "brands": ["brand1", "brand2"], "brandAffinityType": "BRAND_SWITCHERS", "categories": [ { "category": [ { "level": 1, "name": "Books, Music & Movies" }, { "level": 2, "name": "Books" }, { "level": 3, "name": "Example Books Category" } ] } ] } } } }' Item Propensity Audience Configuration
The rules below apply only when attribute=ITEM_PROPENSITY .
Build methods
Audience definition
Item Propensity audiences use the propensityCriteria object within audienceDefinition.audienceCriteria to define the targeting logic.
The object contains the following parameters:
strategy
Defines the optimization strategy for the audience (PROMOTE_SEASONAL_PRODUCTS,PROMOTE_BRAND_NEW_PRODUCTS,IMPROVE_ROAS)itemsetIds
Array of item set IDs used to identify products or categories for audience creationcategories
Array of category objects defining the product taxonomy used to build the audience
You must provide either itemsetIds or categories, but not both. Requests that include both parameters or omit both will result in an error.
Using item sets
Use itemsetIds when you want to build an Item Propensity audience from existing item sets.
Supported item sets must meet the following requirements:
- Item set type must be
itemorcategory(hybridis not supported) - Item set status must be
BUILT. - Item set must be a targeting item set
- Item sets containing brand inclusions are not supported.
Multiple item set IDs can be included in a single request.
Using categories
Use categories when you want to define the audience using Walmart's product taxonomy instead of existing item sets.
Important rules:
- At least one
categoryobject is required when usingcategories. - Department-level targeting requires level
1. - Category-level targeting requires levels
1and2. - Subcategory-level targeting requires levels
1,2, and3. - Each hierarchy must contain valid department, category, and subcategory names as applicable.
Item set and category requirementsItem Propensity audiences must use either
itemsetIdsorcategories—not both.When using item sets, only supported item set types in
BUILTstatus are eligible, and brand inclusions are not supported.When using categories, include the complete hierarchy through the selected level. Department, category, and subcategory names are case-sensitive and must match the values returned by the corresponding discovery APIs.
For shared Create Audience request fields and endpoint behavior, see Create Custom Audience.
Sample requests
Item Propensity using item set IDs
curl -X POST \
'https://developer.api.us.walmart.com/api-proxy/service/display/api/v1/api/v1/audiences' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>' \
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779' \
--data '{ "name": "sadadsads", "description": "dcsdfc", "advertiserId": 16273800, "audienceType": "CUSTOM", "audienceObjective": [ "REACH" ], "attribute": "ITEM_PROPENSITY", "audienceObjectiveText": "", "audienceDefinition": { "audienceCriteria": { "propensityCriteria": { "strategy": "PROMOTE_SEASONAL_PRODUCTS", "itemsetIds": [ 12345789, 23456789 ] } } } }'Item propensity request using categories
curl -X POST \
'https://developer.api.us.walmart.com/api-proxy/service/display/api/v1/api/v1/audiences' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>' \
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779' \
--data '{ "name": "sadadsads", "description": "dcsdfc", "advertiserId": 10000000, "audienceType": "CUSTOM", "audienceObjective": [ "REACH" ], "attribute": "ITEM_PROPENSITY", "audienceObjectiveText": "", "audienceDefinition": { "audienceCriteria": { "propensityCriteria": { "strategy": "PROMOTE_SEASONAL_PRODUCTS", "categories": [ { "category": [ { "name": "Wheelchair Accessories", "level": 3 }, { "name": "Mobility Equipment Accessories", "level": 2 }, { "name": "Health", "level": 1 } ] }, { "category": [ { "name": "Novel", "level": 3 }, { "name": "Fiction", "level": 2 }, { "name": "Books", "level": 1 } ] } } } }' Lookalike Audience Configuration
The rules below apply only when attribute=LOOKALIKE .
Choosing a seed audience
Lookalike audiences are built using an existing audience as the seed. The seed audience determines the shopper characteristics used to identify similar customers.
Only the following audience types are supported as seeds:
| Seed audience type | Description |
|---|---|
| Rule-based | Audiences built using historical shopping or browsing behavior. |
| Item Propensity | Audiences created using itemsetIds. Category-based Item Propensity audiences are not supported. |
| Brand Affinity | Audiences built using brand affinity targeting criteria. |
Audience definition
Lookalike audiences use the lookAlikeCriteria object within audienceDefinition.audienceCriteria to define the targeting logic.
The object contains one required parameter:
| Parameter | Description | Required |
|---|---|---|
seedAudienceId | ID of an existing, eligible audience used to generate the Lookalike audience. | Yes |
Seed audience eligibility
The selected seed audience must meet the following requirements:
| Requirement | Rule |
|---|---|
| Audience type | Must be Rule-based, Item Propensity created using itemsetIds, or Brand Affinity. |
| Audience size | Must contain more than 50,000 shoppers. |
| Audience recency | Must have been built within the last 30 days, or be used in an active campaign. |
Calculating the 30-day eligibility windowThe 30-day eligibility window is calculated using the audience's build date:
Current date - Audience build date ≤ 30 daysAn audience built more than 30 days ago may still qualify if it is being used in an active campaign.
Seed audience requirementsLookalike audiences require an eligible seed audience containing more than 50,000 shoppers.
The seed audience must also have been built within the last 30 days or be used in an active campaign. Item Propensity audiences created using categories instead of
itemsetIdscannot be used as seeds.
For shared Create Audience request fields and endpoint behavior, see Create Custom Audience.
Sample request
Lookalike audiences
curl -X POST \
'https://developer.api.us.walmart.com/api-proxy/service/display/api/v1/api/v1/audiences' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <auth_token>' \
--header 'WM_SEC.AUTH_SIGNATURE: **************' \
--header 'WM_SEC.KEY_VERSION: 1' \
--header 'WM_CONSUMER.ID: adfwe-v23-faasd2r-afs-asdfqeff' \
--header 'WM_CONSUMER.intimestamp: 1565309779' \
--data '{ "name": "placeholder name", "description": "example description", "advertiserId": 123, "audienceType": "CUSTOM", "audienceObjective": ["REACH"], "attribute": "LOOKALIKE", "audienceObjectiveText": "", "audienceDefinition": { "audienceCriteria": { "lookAlikeCriteria": { "seedAudienceId": 1234 } } } }' Response details
What this response returns
A successful response confirms the predictive audience request was created.
Key fields to use
audienceIdnamedetailscodemessageerrors
Sample response
Request submission successful
{ "code": "success", "audienceId": 12345678, "name": "abc", "details": [" AUDIENCE_CREATE_REQUEST_SUCCESS"] }Sample Response - failure
[ { "code": "failure", "details": [ "string" ], "message": "string",
"errors": [ { "field": "string", "errorType": "string", "description": "string" } ] }
]Error Handling
If the request or an individual item fails, the response includes error information to help identify the issue and determine the corrective action. Use errorType for the error condition, field for the affected request field when applicable, and description for an explanation of the error and, when available, guidance on how to resolve it.
For the complete error response schema and endpoint-specific response definitions, see the API Reference. For guidance on HTTP status codes and how clients should handle them, see API status codes and error handling.
Common issues
The following issues may occur when creating predictive audiences.
| Issue | Potential cause | Recommended action |
|---|---|---|
| Invalid Brand Affinity categories | Category hierarchy is incomplete, or categories are not associated with any specified brand. | Include all three hierarchy levels (department, category, subcategory) and verify brand-category associations. |
| Invalid Item Propensity inputs | Both itemsetIds and categories were provided, or neither was included. | Provide exactly one: itemsetIds or categories. |
| Ineligible item set | Item set is not in BUILT status, has an unsupported type, or contains brand inclusions. | Use a BUILT item set of type item, category, or eligible hybrid without brand inclusions. |
| Invalid category hierarchy | Required parent levels are missing or category names do not match. | Include the complete hierarchy through the selected level and use exact, case-sensitive names. |
| Invalid Lookalike seed audience | Seed audience has an unsupported type, contains 50,000 shoppers or fewer, or does not meet recency requirements. | Use an eligible seed audience with more than 50,000 shoppers that was built within 30 days or is used in an active campaign. |
| Audience not available for targeting | Audience processing has not completed. | Use the List Custom Audiences API to confirm the audience status is AVAILABLE before activation. |
What happens next
After audience creation:
1. Audience processing begins
2. Models are trained and validated
3. Audience status progresses through lifecycle states
4. Audience becomes AVAILABLE
5. Audience can be applied to Behavioral Targeting
6. Audience is activated at the ad group level
Related pages
- Audience Overview
- Rule-Based Audiences
- Advanced Targeting Audiences
- Audience Status Overview
- Audience Size API
- Audience Intelligence API
- List Taxonomies
- List Item Sets
Updated 5 days ago
