Skip to main content
Solved

Winback flow with dynamic custom property instead of segments

  • August 28, 2025
  • 1 reply
  • 49 views

Forum|alt.badge.img

Hi all, 

I am new here and I've been struggling with our Winback flow for a while now.

We’d like to build a winback flow that isn’t based on static segments, but on a custom property at profile level. The idea: for each profile, calculate the average time between orders, multiply that by 2.1, and use that property as a personalized trigger for winback campaigns.

What we’ve tried so far

  • Used a separate API key to pull order data from Magento.

  • Wrote a Python script that takes order timestamps and calculates the average interval per customer.

  • Tried to write that value back into a custom property for each profile.

The issue we’re facing

Right now, every profile ends up with the same value in the custom property.
Our suspicion is that the timestamps coming from Magento are identical across profiles (maybe due to how the data is structured or retrieved). As a result, the calculation doesn’t differentiate between customers, and everyone gets the same interval.

What we’d love input on

Has anyone here dealt with:

  1. Dynamically writing calculated values (based on order history) into a custom property at profile level?

  2. Fixing the issue of identical timestamp data across profiles when pulling from Magento?

  3. Alternative approaches to reliably calculate this per profile so that the winback flow truly becomes personalized?

Any insights or examples would be super helpful 🙌

Thanks!!
David

Best answer by whereisjad

@LRVandD could you please share the Python script?

1 reply

whereisjad
Expert Problem Solver IV
Forum|alt.badge.img+16
  • Expert Problem Solver IV
  • Answer
  • August 28, 2025

@LRVandD could you please share the Python script?