@adcp/client API Reference - v4.19.0
    Preparing search index...

    Interface CatalogFieldMapping

    Declares how a field in an external feed maps to the AdCP catalog item schema. Used in sync_catalogs feed_field_mappings to normalize non-AdCP feeds (Google Merchant Center, LinkedIn Jobs XML, hotel XML, etc.) to the standard catalog item schema without requiring the buyer to preprocess every feed. Multiple mappings can assemble a nested object via dot notation (e.g., separate mappings for price.amount and price.currency).

    interface CatalogFieldMapping {
        feed_field?: string;
        catalog_field?: string;
        asset_group_id?: string;
        value?: { [k: string]: unknown };
        transform?: "boolean" | "date" | "divide" | "split";
        format?: string;
        timezone?: string;
        by?: number;
        separator?: string;
        default?: { [k: string]: unknown };
        ext?: ExtensionObject;
    }
    Index

    Properties

    feed_field?: string

    Field name in the external feed record. Omit when injecting a static literal value (use the value property instead).

    catalog_field?: string

    Target field on the catalog item schema, using dot notation for nested fields (e.g., 'name', 'price.amount', 'location.city'). Mutually exclusive with asset_group_id.

    asset_group_id?: string

    Places the feed field value (a URL) into a typed asset pool on the catalog item's assets array. The value is wrapped as an image or video asset in a group with this ID. Use standard group IDs: 'images_landscape', 'images_vertical', 'images_square', 'logo', 'video'. Mutually exclusive with catalog_field.

    value?: { [k: string]: unknown }

    Static literal value to inject into catalog_field for every item, regardless of what the feed contains. Mutually exclusive with feed_field. Useful for fields the feed omits (e.g., currency when price is always USD, or a constant category value).

    transform?: "boolean" | "date" | "divide" | "split"

    Named transform to apply to the feed field value before writing to the catalog schema. See transform-specific parameters (format, timezone, by, separator).

    format?: string

    For transform 'date': the input date format string (e.g., 'YYYYMMDD', 'MM/DD/YYYY', 'DD-MM-YYYY'). Output is always ISO 8601 (e.g., '2025-03-01'). Uses Unicode date pattern tokens.

    timezone?: string

    For transform 'date': the timezone of the input value. IANA timezone identifier (e.g., 'UTC', 'America/New_York', 'Europe/Amsterdam'). Defaults to UTC when omitted.

    by?: number

    For transform 'divide': the divisor to apply (e.g., 100 to convert integer cents to decimal dollars).

    separator?: string

    For transform 'split': the separator character or string to split on. Defaults to ','.

    default?: { [k: string]: unknown }

    Fallback value to use when feed_field is absent, null, or empty. Applied after any transform would have been applied. Allows optional feed fields to have a guaranteed baseline value.

    ext?: ExtensionObject