I need to understand how to create actions and what kind of data can be passed.
If creating a new Entity via action, how to add custom data, how to get that data dynamically from an even in the first place. And many other things.
Does anyone have any documented explanations here?
Ive got a Pizza Delivery Setup, i need to generate coupons, promotions and vouchers. Setup everything in my particular way. I found the coffee shop(V3) example but thats not doing exactly what i need. Plus it doesnt seem to work properly on V5.
I need to trigger coupon creations when i update certain entities in the tickets, and store the Ticket ID and customer ID in the coupon Entity for backtracking. There are a few other important features that need to be built, but im quite lost here without any documentation.
Basically im trying to setup coupons. The idea was to generate a new coupon if the total amount is more than 1000 lets say.
Since its delivery only, i would like to generate the coupon when i assign a deliverer to a ticket. I would like to save the Customerās ID and Ticket number into the coupon. So i made a Create Entity action. Now how do i pass the Ticket # and customer info to this action, and then how do i assign these values in the āCustom Dataā field.
Iām trying to trigger it with āHandle Deliverer Commandā which is an automation command executed rule. This command adds my deliverer entity to the ticket.
Thanks a lot JRTech! Really appreciate you taking the time to help me out.
Take your timeā¦ if i manage to solve it on my own, will post my solution here.
I would wadger a solution for what your trying to do could be very similar to the native hotel account setup I did which used a automation command flow to create and update a seccond entity.
Your random coupon number would be the command value of an execute automation command going in to a coupon generation command rule.
Using the command value it would make the coupon entity, and then update entity data actions would update the required entity data again using the command value for the entity name.
There is allot more to the example that you will need but take a look and you might get the insparation to sort yourself before I get home;
seems almost there, but then again he has gone on to use a Product in the menu to generate the Couponsā¦ So im trying to really just get something in the middleā¦ Create coupons and discount vouchers with unique IDs and and auto generate them based on customer purchase history or total amount on current ticket.
JRTech has provided some massive content to look at and refer to, so will be studying that.
I use the voucher system i linked to produce vouchers and I have also got it inserting a ticket tag into the voucher with a random number and also the date and expiry dateā¦ My system currently looks at the value of the ticket and then prints the voucher but if you want to link it to total spend of the customer over a certain period then you may be better off using Sambacard or similar system.
I am not a fan of the creating product method, seems unesercery to me but this is why a samba manual is imposible as there is no set way to do anything.
What type of coupons are these going to be?
They are not vouchers in a sense of having a credit balance?
If you can explain the use of cupons and how you plan to redeem them would help.
Coupons: Will be issued (example) if the customer bought 5 pizzas, it should generate a free pizza coupon. So i think following the coffee shop example almost gets me there. Will also have a few buttons in case of late delivery and all for free pizza or bread or something.
Vouchers: Will be issued for x amount like ā500 worth voucherā. Vouchers will be generated when the customer spends more than a certain amount in a single order.
I think i can implement almost everything from the Coffee shop and the Voucher examples. My only issue is triggering and creating these coupons and vouchers with the ticket ID so that iām able to print these out when iām printing a receipt for the delivery guy to take to customer.
Do the coupons need to be tracked? If you print of a coupon would it say something like āOrder 2 Pizza and get 1Freeā?. personally i wouldnt want to track that as my coupon/voucher is printed on thermal 80mm paper and customers usually dont have something like that so wont be able to copy it. And if they did, at least they are coming back to your store for the pizzas
Im not sure you would use Entities to do this but JTRTech can advise better
I think maybe we can discuss better my sugestion idea when I get home.
Just to keep things clear can we clarify some terminology so we are all on the same page.
An ORDER is a product/item line on a TICKET.
When you say customer spends so much on an ORDER I am presuming you mean TICKET.
I dont mean to be penicity but its better if we are all talking in the same way and that is the way things are called within samba so really the best way for us to refer to them.
A customers whole order is the TICKET, the things be has ordered are the ORDERS.
I too would personally like to track like you sugest.
This would also allow you to make a report to show the amount of unclaimed coupons. How much value to would place on a report like that is up to you but its a good thing to know I think.
Vouchers would obviously be tracked through their account. If your not using accounts I would recomend it that way myself.
Ok, So i tried to read through the links properly and re-evaluated what im trying to accomplish.
So my current simplified conclusion to what i am trying to do is:
Coupons:
ā¢ An Entity object with Unique ID, Redemption status, expiry date and Text Description.
ā¢ On the Ticket screen, there will be an automation command (Button) āIssue Couponā. OnClick generates a popup that will ask for Description. This description will be saved into the New Coupon generated. So technically submission of the message triggers āCreate Couponā action which should be able to take the message as input. The created Couponās code has to be returned and added to the Ticket so that it can be printed along with the Bill for the customer(When Deliverer is assigned).
Vouchers:
ā¢ An Entity object with Unique ID, Redemption status, expiry date and Amount in numbers.
ā¢ Vouchers will be auto-generated depending on the total amount in the ticket. This generation will have to be done as soon as i assign the Deliverer to the ticket. Again, voucher code will be printed along with the customer Bill.
Redeeming Coupons and Vouchers
ā¢ Both Coupons and Vouchers will be redeemed by providing the code in the numberpad. If available, the coupon or voucher is assigned to the ticket.
ā¢ For Coupon the Description will need to be displayed in the ticket header so the sales employee is able to read that and mark relative products free/gift and flag it with the coupon.
ā¢ For Vouchers the amount has to be subtracted from the ticket as discount with the voucher code as the flag.
So i currently need to figure out how to:
ā¢ Create a popup text input, and submit this to a Create Entity Action.
ā¢ set the date on the Create Entity Action.
ā¢ Add discounts to the Ticket with some explanation text (Voucher ID)