Tracking Promotions by Points Version 4 V4 Tutorial

Hi,
I was following the above tutorial in V5 ,I followed upto earning points and tested but cannot see any points earning.

But cannot see points earning.
I have done all default mapping but still no.
Please help

Everywhere you used (brackets) you should be using {curly braces} …

For example, these:

(ITEM TAG:Points)
(ENTITY NAME:Customer)
(QUANTITY)

… should be like this - these are Printer Tags:

{ITEM TAG:Points}
{ENTITY NAME:Customer}
{QUANTITY}

Many thanks. Its sorted.
I am trying to give 10% points from the total ticket value.How should I change the {QUANTITY} to do that.
Thanks

It wouldn’t be ticket total if your calculating points on order state updated it would need to be order total.
You would have something like {TOTAL PRICE}/10 would give 10% of the order value.
You will probably want to format/round the number to whole numbers as just doing /10 or 10% will potentially give decimal place number.

Many Thanks
Yes it doesn’t take decimals, how do I round it Please.

Will be on the forum somewhere. maybe a [=F ] type function…

okay thanks I will find it. many thanks for your prompt reply.

Round to nearest integer:

[=Math.round(TN('{TOTAL PRICE}')/10)]

Format to 2 decimal places:

[=F(TN('{TOTAL PRICE}')/10)]

Round to nearest integer, but show .00 as the decimals:

[=F(Math.round(TN('{TOTAL PRICE}')/10))]

If you don’t want to Round (up), but rather just get truncated Integer …

[=parseInt('10.98')]   // returns  10
[=parseInt('10.01')]   // returns  10
[=parseInt('-10.98')]  // returns -10
[=parseInt('-10.01')]  // returns -10

… or the floor method is slightly different, but similar …

[=Math.floor(10.98)]   // returns  10
[=Math.floor(10.01)]   // returns  10
[=Math.floor(-10.98)]  // returns -11
[=Math.floor(-10.01)]  // returns -11

Hi Thanks I did try all three of above inplace of {QUANTITY} but it is not adding the points.If I just put “1” instead of {QUANTITY} it does add the points.But if put 1.2 it doesn’t add points. ? Even I put just {TOTAL PRICE} it doesn’t add points.

Guessing order total is not an available tag on state update action.
You can test this by using an ask question or show message action with that tag in the question/message.

I would personally do it a different way and use a report expression on the update points action in the ticket closing action where the states are updated (in similar way to kitchen print job works.
If it goes just above the update points state it would count up the total of the orders with points state.

{TICKET ORDER TOTAL EXP:(OS.Promotion=Points)}

That’s the way I would have recommended if you hadn’t already setup as above,

Try this:

[=Math.round((TN('{PRICE}') * TN('{QUANTITY}')) / 10)]

My concern with that would be gift and void…
Gift still has a price doesnt it but calculate price in ticket is false, similar for void… just saying would want to check…

Thanks,
I tried both below but it doesn’t add any points ?

[=Math.round(TN(’{TOTAL PRICE}’)/10)]

[=Math.round((TN(’{PRICE}’) * TN(’{QUANTITY}’)) / 10)]