Hello community
I need to realocate offer amount in proportion of GMS order weight on checkout GMS total weight (i.e. 1 checkout contains X orders). Below you have for example Order 1303589 representing 44% of checkout 351970. Then, i need to relocate 44% of my amount offer to this order.
I take the amount offer in a transaction list “LT_Offer”:
See below the “TL_Offer”. I want a metric which returns in column the checkout ID, the order ID and reallocated offer amount (which is the offer amount * allocation_order_on_checkout metric)
Condition: I only want computing allocated amount offer when the Id_order in TL_Offer is empty (in fact, if there is an id_order, the amount have been already assgined to the order).
Here in the same example, i need to reallocate 59€ at 44% to the first order and 56% to the 2nd order.
Knowing that I have a mapping between order_id and checkout_id in the order_id dimension:
I want this final metric working:
Thanks a lot !!