-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Summary
When implementing property list filtering in get_products, we discovered that Product lacks a flag to indicate whether property-level targeting is allowed. This distinction is necessary for correct filtering behavior.
Problem
Some products are "all or nothing" (run of network) - the buyer must accept all properties. Other products allow the buyer to filter down to a subset of properties.
Without a flag, the sales agent cannot determine which products can be filtered.
Example
Product 1: properties [a, b, c], property_targeting_allowed=false
Product 2: properties [a, b, c], property_targeting_allowed=true
Product 3: properties [d, e, f], property_targeting_allowed=true
Buyer calls: get_products(property_list=reference_to_[a, b, g])
Expected filtering:
- Product 1: EXCLUDED (has c, but can't drop it - all or nothing)
- Product 2: INCLUDED (intersection [a, b] is non-empty, can subset)
- Product 3: EXCLUDED (no intersection with [a, b, g])
Result: Only Product 2 returned
Proposed Solution
Add a field to Product:
class Product:
# ... existing fields ...
property_targeting_allowed: bool = Field(
default=True,
description="Whether buyers can filter this product to a subset of its publisher_properties. "
"When false, the product is 'all or nothing' - buyers must accept all properties."
)Alternative Approaches
-
Infer from selection_type - If
publisher_propertiesusesselection_type: "all", maybe that implies no sub-targeting? But this conflates two different concepts. -
Separate product types - Have different product categories, but this seems overly complex.
-
Capabilities flag - Add to
get_adcp_capabilitiesresponse, but this is product-level, not agent-level.
Context
Discovered while implementing property list filtering per AdCP v3 spec in the reference sales agent implementation (prebid/salesagent).
The PropertyListReference in GetProductsRequest allows buyers to pass a list of allowed properties, but without knowing which products support sub-targeting, the filtering logic is ambiguous.