Hey Klaviyo community! π
I'm currently building a custom segmentation engine for Shopify-based e-commerce customers β something similar to what Klaviyo offers with its rule-based dynamic segments. Iβve gone through the Segment API GuideΒ and understood how flexible and powerful Klaviyoβs segmentation is.
Right now, I'm trying to design a backend structure that can support conditions across multiple models (like customers, orders, products, etc.) with operators like within_last_days, contains, gte, and more.
Before I go too deep into implementation, Iβd love to know from you:
πΉ How does Klaviyo optimize segment recalculations for large datasets?
πΉ Any recommendations on caching strategies or batch evaluations vs real-time evaluations?
πΉ If youβve built something similar, how did you manage parsing user-created conditions into efficient queries?
Would love to hear your thoughts or any best practices. Thanks in advance!