Ask a modifier on a category
hub_link_modifier_to_categoryStart asking a modifier on every product in a category — THIS is what puts it on the till. The rules are per category, so the same modifier can be required here and optional elsewhere. required means the cashier cannot finish the line until they answer. min/max count distinct choices, or UNITS when the modifier uses quantities. Refused when the category already inherits this modifier from a parent category (link it to the parent or the child, not both), when it is already linked, and when the rules could not be satisfied — for example asking for at least 3 when only 2 choices are sold at every outlet. Linking a modifier to a PARENT category detaches it from any subcategories that already had it, since they now inherit it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | No | Most that may be chosen. Omit for no cap | |
| min | No | Fewest that must be chosen. Setting this makes it required | |
| required | No | The cashier must answer before ringing up. Default false | |
| sortOrder | No | Position among this category’s modifiers. Omit to append | |
| categoryId | Yes | Category id from get_categories | |
| modifierId | Yes | Modifier id from get_modifiers |