Product Set Operations¶
This article describes how to create DPA product sets.
Overview¶
You can create DPA Product Sets by using any of the fields provided in the feed, either those that are required or optional, if the feed has a value for that field.
A maximum of 5 product filters and operators can be part of one product set. At least one product set must be created and attached to an ad group, using the productSetId
field in Adgroup.
Important
A Product Set is similar to a shared object. Advertisers can group the product they want and test bids by attaching them to different ad groups. Yahoo provides a one-to-many relationship from a product set to an adgroup. So one product set can be part of many adgroups, but one adgroup will have only one product set.
Supported Operators¶
Operators supported in Product Sets are shown in the table below:
Operators |
Description |
---|---|
|
Contains substring (case sensitive). |
|
Does not contain substring (case sensitive). |
|
Equal to (case sensitive). |
|
Not equal to (case sensitive). |
|
Less than or equal to (numeric fields only). |
|
Greater than or equal to (numeric fields only). |
In addition to the above operators, and
and or
can also be used in combination with different filters.
{"and": [{"custom_label_0": {"eq": "type1"}},{"custom_label_1": {"eq": "type2"}}]}
{"or": [{"custom_label_0": {"eq": "Bags > Backpacks"}},{"custom_label_1": {"contains": "water bottles"}}]}
Important
Support is for only one set of either and
/ or
operators. JSON with multiple and
/ or
will be rejected.
Product sets support POST and GET calls, in addition to batch create and update, filters, counts and paginations.
Fields¶
Product Sets contain the following fields:
Name |
Description |
---|---|
|
The name of the product set, which is a required field. |
|
The Product set id issued by Yahoo. |
|
The Yahoo advertiser id. |
|
Status of the product set. When creating the product set, set status to |
|
The product set criteria. The criteria is described with the following JSON: {<feed field>: {<operator>: <value>}}. For example: {category: {eq: Luggage & Bags > Backpacks}}. |
Endpoint¶
Resource URI
/traffic/productsets
Operations¶
Create a product set
Method: To create a product set, make a POST call.
Example: POST call to create a product set.
POST /traffic/productsets
{
"accountId": 1612534,
"name": "Test Set 1",
"type": "RETAIL",
"productSetFilter": {
"price": {
"gte": "100"
}
},
"status": "ACTIVE"
}
Response: The product set associated with the advertiser.
Read specific product set data by ID
Method: To retrieve data for a specific product set, make a GET call with the ID parameter.
Example: GET call to retrieve product set data by ID.
GET /traffic/productsets/{productSetId}?accountId={accountId}
Response:
{
"response": {
"id": 1008176019,
"accountId": 35220,
"name": "My Product Set 3rzs6q4h",
"type": "PRODUCT",
"productSetFilter": "{\"custom_label_4\": {\"in_list\": \"114232\"}}",
"count": 0,
"status": "ACTIVE",
"createdAt": "2021-07-12T07:52:53.653-07:00"
}
}
Response: The product set associated with the given ID.
Read specific product set advertiser data by account
Method: To retrieve advertiser data for a specific product set by account, make a GET call.
Example: GET call to retrieve product set advertiser data.
GET /traffic/productsets?accountId={accountId}&dir={asc|desc}&limit={limit}&page={page}&sort={sortParam}
Response:
{
"response": [
{
"id": 1002830000,
"accountId": 35220,
"name": "All Products",
"productSetFilter": null,
"count": 0,
"status": "ACTIVE",
"isAllProducts": true,
"createdAt": "2020-06-19T10:24:47.756-07:00"
},
...
}
Response: The product set advertiser info by account.