Map categories
map_categoriesPropose a googleProductCategory mapping for a feed: groups the latest run's delivered items by distinct productType, matches each onto Google's taxonomy (exact-path and unique-leaf matches first, then candidate-constrained AI when available and useAi is not false), and returns the mapping table WITH a ready-to-save rule definition (one lookup keyed on productType). NOTHING is saved: show the human the mapping, resolve unmatched product types with search_taxonomy and edit the rule's table, then save with create_rule — which runs the standard preview and returns the impact report. Options: onlyMissing=true scopes the rule to items with no category yet; defaultCategory (a valid taxonomy path) is applied to items whose productType is not in the table.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| useAi | No | Use AI for product types with no deterministic taxonomy match (default true). AI mapping is rate-limited. When it is not available, call again with useAi=false for deterministic matches. | |
| feedId | Yes | Feed id from list_feeds. | |
| onlyMissing | No | Scope the suggested rule to items with an empty googleProductCategory (default false: the reviewed mapping also fixes wrong existing values). | |
| defaultCategory | No | Optional valid taxonomy path applied when an item's productType is not in the table. |