Skip to main content

Modifier

Modifiers are secondary option choices for the Item Family that belong to a specific Modifier Group. I.E Coke / Pepsi

Properties

NameTypeDescription
_idstringUsed for associating entities together, does not map to a specific system
namestringName of the Item to Display
price_amountintegerPrice for Item in lowest denomination (cents)
price_currencystringCurrency of the value in price_amount
modifier_group_idsstring[]List of Modifier Group IDs attached to this Modifier

Associations

Modifier to Modifier Groups (Nested Modifiers)

A modifier can have a reference to one or more modifier groups, and each modifier group can, in turn, contain its own set of modifiers. This creates a recursive relationship where modifiers can be nested within other modifiers, forming a tree-like structure.

The modifier_group_ids property refers to an array of _ids of modifier group objects. Each modifier group represents a collection of related modifiers.

Nested Modifier Example

Item Family

{
"_id": "item_family_1",
"name": "Turkey Sandwich",
"images": [],
"item_ids": ["item_1"],
"modifier_group_ids": ["modifier_group_1"]
}

Modifier Group

{
"_id": "modifier_group_1",
"name": "Choose a Side",
"default_modifier_quantities": {},
"min_unique": 1,
"max_unique": 1,
"max_free": 1,
"modifier_ids": ["modifier_1", "modifier_2"]
}

Modifiers

{
"_id": "modifier_1",
"name": "Soup",
"price_amount": 0,
"price_currency": "usd",
"modifier_group_ids": ["nest_modifier_group_1"]
}
{
"_id": "modifier_1",
"name": "Salad",
"price_amount": 0,
"price_currency": "usd",
"modifier_group_ids": []
}

Nested Modifier Group

{
"_id": "nest_modifier_group_1",
"name": "Soup Selection",
"default_modifier_quantities": {},
"min_unique": 1,
"max_unique": 1,
"max_free": 1,
"modifier_ids": ["nested_modifier_1", "nested_modifier_2"]
}

Nested Modifiers

{
"_id": "nested_modifier_1",
"name": "Clam Chowder",
"price_amount": 0,
"price_currency": "usd",
"modifier_group_ids": []
}
{
"_id": "nested_modifier_2",
"name": "Tomato Bisque",
"price_amount": 0,
"price_currency": "usd",
"modifier_group_ids": []
}