Using Order Tags as portion modifier (affecting price and inventory)


I wonder if it is possible to use order tag (involving actions and rules) to decrease inventory.

I have many types of coffee beans and many types of coffee beverages. I could go straightforward and create every kind of beverage for every kind of beans, but this is not optimal and hard to maintain.
So I’m trying to organize this in many-to-many manner. As you can see on screenshot I already have order tag “beverage type” with values “cappuccino”, “latte” etc. It was easy to put it down to order tags because it’s easy to split receipts:

recipe of espresso on Ethiopia + latte recipe
recipe of espresso on Ethiopia + cappuccino recipe

There are no problem tags except “doppio”.

There was two problems actually:

  • how to increase the price (solved using this: Discount using Order Tag)
  • how to double decrease inventory (obviously I can’t add a product to the tag, because tag is applicable to many products). What I wan’t here is just to double selected product.

So as far as I understand

  1. I should have two rules
  2. From the rule I should access what is the current product (or recipe)
  3. Double the amount of inventory item (X coffee beans) that should be taken.
  4. Second rule should revert this process if doppio was unselected.

The only problem is that I don’t know if it’s ever possible and what variables should be used to achieve this.

We handle double, triple cases by using tag quantities. I mean instead of using Doppio tag you’ll double click Espresso button and it becomes 2 x Expresso. Check Quantity Modifiers section of this tutorial.

Thank you for advice!

As far as I understand Quantity Modifier increase number of product that is linked to order tag, but not “parent product”.

Lets say I have

Products. All with individual recipes (recipe is 10gr of beans):
Java beans
Ethiopia beans
Jamaica beans

Order Tags (for all types of beans):
Espresso Macchiato

So doubling espresso wont work from the box, because product that I need to increase is not in the tag, but in the parent product (2*10gr of beans). And recipe for each products refers to different types beans.

Other way related to your answer is to make menu products not type of beans but type of beverages (espresso, cappuccino etc.) and and create order tag for each type of beans (Java, Ethiopia) so we revert the structure. It could work but the question is following:

Lets say we have Order Tags:
Java beans
Ethiopia beans
Jamaica beans
Hawaii beans

is there any way to set max quantity to “2” but allow to select only one tag value. Because
having 1xJava + 1xEthiopia for single coffee is not valid configuration.

You’ve also configured Doppio portion. What does Doppio portion will mean in this case?

For the last case if we setup beans as order tags doppio does not make sense, right. Sorry for confusing.

OK. I think your first configuration was nice. As you’ll be able to configure separate recipes for portions (Java.Doppio, Jamaica.Doppio, etc…) you can control inventory fine. I think you tried it first but you found it hard to manage. Did you wanted to configure Doppio as a tag for this reason?

I assume Doppio means “double” as google translate says so.

Right - doppio is for double.
Correct - portions could solve inventory control but I must double all receipts and also configuring order became a bit illogical - doppio is portion and other type of beverages is order tags - I don’t like this :slight_smile:

I want to configure Order Tag value Doppio which will double any kind of coffee: inventory and price(price is solved)

@valentino_net I think I couldn’t fully understand how you want to handle coffee product. Order tags (modifiers) used to configure optional features for a product. For example extra hot milk, less creme, two shots caramel etc… For changing whole content of the product like short, tall, etc… we use portions. So recipes are connected to portions. We don’t have a modifier feature that works as a shortcut to double whole product’s recipe content.

Ok, so let me try to explain.

There are set of coffee beverages:
Espresso Macchiato

I want to treat all of them as “type of beverage” (so, speaking C#: all of them are items of the same enum)

Technically, Espresso, Lungo, Ristretto and Americano has the same recipe (from inventory consumption perspective). The difference is in the process of making coffee. So when I select order tag Lungo or Ristretto, it just a way to say to staff how to make a coffee. Inventory is affected in the same way in both cases.

All that Espresso Macchiato, Late, Capuchino - is just an espresso + milk (a bit, more and even more). So it’s also easy to provide corresponding tag values for that with linked product and recipe.

My initial configuration:

Category: Beverages

  • Java Coffee (Product: Java, recipe: 10rg of Java beans)
  • Ethiopia Coffee (Product: Ethiopia , Recipe: 10rg of Ethiopia beans)
  • Hawaii Coffee (Product: Hawaii, Recipe: 10rg of Hawaii beans)

Order Tags for Beverages

Table appointments:

  • On site
  • To Go

Types of beverage:

  • Espresso (no additional recipe, parent recipe is enough)
  • Lungo (no additional recipe, parent recipe is enough)
  • Espresso Macchiato (Product: Espresso Macchiato, Recipe: a bit of milk)
  • Cappuccino (Product: Cappuccino, Recipe: more milk)
  • Late (Product: Latte, Recipe: a lot of milk)
  • Doppio (ah…)

So I see here that domain model abstraction is not totally compatible with abstraction of Order Tags. If I (somehow) make “doppio” order tag to double the portion I brake your abstraction and if I configure doppio as portion and everything else as tag, I’ll brake mine.

I understand it. Thank you very much for the detailed information. There is no order tag feature that doubles the inventory transactions. So what you need to do is.

  1. Create Java Coffee, Ethiopia Coffe, Hawaii Coffee products for menu.
  2. Create two portions for each product (Normal, Double)
  3. Create 6 recipes for both normal and double portions of these products.
  4. Create Espresso,Lungo, Ristretto, Americano, Macchiato, Cappucino,Latte tags.
  5. Create Macchiato,Cappucino,Latte products, Create 2 portions (Normal, Double) for these products. Don’t add them to menu.
  6. Create 6 more recipes for both normal and double portions of these products.
  7. Map these 3 product to related order tags.

That’s all. That won’t take more than 15 minutes.

1 Like

@emre thank you, I’ll follow this way with some changes. Seems like it will work.