Skip to content

Spec: Add property_targeting_allowed flag to Product #123

@bokelley

Description

@bokelley

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

  1. Infer from selection_type - If publisher_properties uses selection_type: "all", maybe that implies no sub-targeting? But this conflates two different concepts.

  2. Separate product types - Have different product categories, but this seems overly complex.

  3. Capabilities flag - Add to get_adcp_capabilities response, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions