Configurable products
Some products have configurations associated with them. For example, customers can add a variety of things to sandwiches, such as lettuce, tomatoes, and onions. To define these configurations, use the configurable_products column.
| Column | Data type | Description | Example |
|---|---|---|---|
| configurable_products | JSON | The configurations available for the product. | See Example. |
JSON data
| Field definitions | Required | Type | Description | Example |
|---|---|---|---|---|
| config_id | Yes | string | A unique product configuration ID provided for this specific configuration. | ”1234” |
| lead_time | No | integer | Lead time for this configuration in minutes. | 1440 (24 hours) |
| config_type | No | string | Defines which type of product configuration this is. Possible values: - prep_style: Use for scenarios such as a deli meat or cheese.- builder: Use for scenarios such as a sandwich, pizza, or burger with various selectable toppings. | ”builder” |
| status | Yes | boolean | Indicates whether to enable this configuration. | TRUE FALSE |
| options | Yes | array | An array with all the configuration options. | |
| options[] .config_option_id | Yes | string | Unique product configuration option ID. | ”8234” |
| options[] .name | Yes | string | Option name displayed to the customer. | ”Bread” |
| options[] .types | Yes | string | The type of option. Possible values: - base_selection: A mandatory option with additional options.- add_on: Additional options that can be purchased.- multiple_selection: Multiple items can be selected.- text: Single-line text field.Note: The Shopper App doesn’t support the text and text_field types. Any selection requiring text input is not visible to shoppers. | ”single_selection” |
| options[] .status | Yes | boolean | Indicates whether to enable this option. | TRUE FALSE |
| options[] .mandatory | Yes | boolean | Indicates whether this option is mandatory for a customer to select. | TRUE FALSE |
| options[] .default_text | No | string | Default text in a text or text_field type.Note: The Shopper App doesn’t support the text and text_field types. Any selection requiring text input is not visible to shoppers. | ”Happy Birthday” |
| options[] .price | No | string | Price of this option. | ”5.00” |
| options[] .items | No | array | Array of product configuration option items. | |
| options[] .items[] .max_length | No | integer | Maximum length of text or text_field types. | 50 |
| options[] .items[] .maximum_selection | No | integer | Maximum number of items for a multiple_selection number of items that can be selected for this option. | 8 |
| options[] .incompatibility_configuration_options | No | array | Array consisting of child arrays of incompatible option item IDs. | [“config_option_12P”, “config_option_45G”] [“config_option_43D”] |
| options[] .incompatibility_configuration_options[] | No | array | Array of incompatible option item IDs. Used to hide this option when another option is enabled. | [“config_option_32E”] |
| options[] .required_configuration_options | No | array | Array consisting of child arrays of required option item IDs. | [“config_option_12P”, “config_option_45G”] [“config_option_32E”] |
| options[] .required_configuration_options[] | No | array | Array of required option item IDs. Used to hide this option unless another option is enabled. | [“config_option_32E”] |
| options[] .items[] .config_option_item_id | Yes | string | Unique option item ID. This is unique within the entire object. | ”8234T” |
| options[] .items[] .name | No | string | The name of the option item displayed to the customer. | ”Whole wheat” |
| options[] .items[] .default | No | boolean | Indicates whether the item is selected by default. | TRUE FALSE |
| options[] .items[] .price | No | string | Price of the option. | ”1.00” |
| options[] .items[] .status | Yes | boolean | Indicates whether to enable this item in the option. | TRUE FALSE |
| options[] .items[] .lead_time_change | No | integer | How much extra time (minutes) this option adds to the lead_time. | 50 (minutes) |
| options[] .items[] .storage_temp_over_ride | No | string | Override the base storage temperature setting with additional holding or freezer options. | ”heated” |
| options[] .items[] .items[] | No | array | Array consisting of child arrays of incompatible option item IDs. | [ “config_option_12P”, “config_option_45G”] [“config_option_32E”] |
| options[] .items[] .incompatibility_configuration_options[] | No | array | Array of incompatible option item IDs. Used to hide this option when another option is enabled. | [“config_option_32E”] |
| options[] .items[] .required_configuration_options | No | array | Array consisting of child arrays of required option item IDs. | [“config_option_12P”, “config_option_45G”] [“config_option_32E”] |
| options[] .items[] .nutrition | No | object | Nutrition information. | |
| options[] .items[] .alerts_safe_selection_per_serving | No | integer | Calories added by this option. | 500 |
| options[] .items[] .selection_options[] | No | array | Array of additional options. For example, after a customer selects a pizza size (small, medium, large), a “Crust” sauce, then “Toppings” will be available. | |
| options[] .items[] .selection_options[] .selection_id | Yes | string | Unique selection_option_id for each parent selection_option. | ”982” |
| options[] .items[] .selection_options[] .default_option_id | No | string | Default for the additional option. | ”982-2” |
| options[] .items[] .selection_options[] .name | Yes | string | Name displayed to customer. | ”What size?“ |
| options[] .items[] .selection_options[] .option[] | Yes | string | Unique option ID. | ”982-2” |
| options[] .items[] .selection_options[] .option[].name | Yes | string | Name displayed to customer. | ”Sweet potato fries” |
Example
"{
""config_id"": ""sandwich-120"",
""lead_time"": 1440,
""config_type"": ""builder"",
""options"": [
{
""config_option_id"": ""10"",
""name"": ""Bread"",
""type"": ""single_selection"",
""mandatory"": true,
""price"": null,
""items"": [
{
""config_option_item_id"": ""10-1"",
""name"": ""Whole Wheat"",
""nutri_info"": {
""calories_per_serving"": 120
},
""default"": true,
""price"": null
},
{
""config_option_item_id"": ""10-2"",
""name"": ""White"",
""nutri_info"": {
""calories_per_serving"": 80
},
""default"": false,
""price"": null
}
]
},
{
""config_option_id"": ""11"",
""name"": ""Premium Addons"",
""type"": ""multiple_selection"",
""mandatory"": true,
""price"": null,
""items"": [
{
""config_option_item_id"": ""11-1"",
""name"": ""Avocado"",
""nutri_info"": {
/* Avocado adds 60 calories to the total calorie count */
""calories_per_serving"": 60
},
/* Avocado adds 60 cents to the base price of the item */
""price"": 0.60
},
{
""config_option_item_id"": ""11-2"",
""name"": ""Bacon"",
""nutri_info"": {
/* Bacon adds 200 calories to the total calorie count */
""calories_per_serving"": 200
},
/* Bacon adds KES100.50 to the base price of the item */
""price"": 1.50
}
]
}
]
}"Last updated on