# Add point workflow from purchase history

**URL:** <https://forum.mautic.org/t/add-point-workflow-from-purchase-history/20259>\
**Category:** General Discussion\
**Tags:** community, discussion\
**Created:** [July 24, 2021, 12:49pm UTC](https://forum.mautic.org/t/add-point-workflow-from-purchase-history/20259 "2021-07-24T12:49:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zayaz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/zayaz/32/587_2.png) [@zayaz](https://forum.mautic.org/u/zayaz)\
**Post date:** [July 24, 2021, 12:49pm UTC](https://forum.mautic.org/t/add-point-workflow-from-purchase-history/20259/1 "2021-07-24T12:49:00Z")

</div>

Hi ,I have a use case in Mautic for ecommerce transaction.

eg. I need to add 5 points to customer for every $10 in “LTV” field of the customer.

so

customer A , LTV $100, so his point total will be 50, if he buy again $40, his point will become 70.

How to best do this in mautic? or if custom solution whats the best approach?

Thanks.

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [July 26, 2021, 6:53am UTC](https://forum.mautic.org/t/add-point-workflow-from-purchase-history/20259/2 "2021-07-26T06:53:22Z")

</div>

Interesting.

I assume the LTV field is a mautic custom field? How are you increasing the LTV field value with each purchase? I assume the field value is increasing form $100 to $140 with each purchase? Are u manually updating the field or is the field overwritten with the latest sale value?

---

<div class="post-metadata">

**Author:** ![zayaz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/zayaz/32/587_2.png) [@zayaz](https://forum.mautic.org/u/zayaz)\
**Post date:** [July 27, 2021, 4:44pm UTC](https://forum.mautic.org/t/add-point-workflow-from-purchase-history/20259/3 "2021-07-27T16:44:10Z")

</div>

Hi @robm ,

Currently we are having a separate app that is updating the custom field (LTV) adding the new amount to it through Mautic API. so we are not building the logic/calculation on Mautic to be honest. its like a separate app that job is to transform the raw transaction/purchase data to a customer data (fields) that will be ready to push to mautic.

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [July 28, 2021, 6:51am UTC](https://forum.mautic.org/t/add-point-workflow-from-purchase-history/20259/4 "2021-07-28T06:51:09Z")

</div>

The LTV field is essentially a scoring field. Set up triggers for threshold LTV amounts. If is LTV = 10, do this. If LTV = 50 do this other thing and so on.

I am not sure Mautic can do formula driven calculations to calculate points.

I had some success integrating Mautic and a google sheet with Integromat. Maybe you could claculate the correct poit score based of the LTV in a google sheet and then use integromat to sync that result back to Mautic?
