Customer has active subscriptions: yes or no?

Hey guys,

We are building the logic for our email marketing (Klaviyo software) and we need to be able to segment our inactive customers.

To make this happen, we need to know if the customer has any active subscriptions, which might be segmented like this in Klaviyo:

image

In the Foxycart API docs, I don't see any such property for customers or users that says if they have active/inactive subscriptions (e.g., True/False). Under the API properties for subscriptions I see a True/False for is_active but a customer could have multiple active/inactive subscriptions. We just need to know if a customer has any active subscriptions, and if not, we mark them inactive.

Do you guys have any suggestions on how we can get this data via the API or datafeed for our purposes?

Thanks!
Comments
  • fc_adamfc_adam FoxyCart Team
    edited February 2
    @Epotratz,

    We don't currently have any boolean attached to customers to say if they have subscriptions or not. What you can do though is filter subscriptions in the API based on the customer, and only search for active subscriptions. That way, if there are any results, then you know that that customer has at least one active subscription.

    In terms of the datafeed - if one comes through that is related to an active subscription, then you could update the customers record within Klaviyo to mark them as having an active subscription.
  • EpotratzEpotratz Member
    edited February 2
    @fc_adam,

    So it sounds like we need to do some intermediate data processing before sending to Klaviyo.

    Klaviyo is already receiving all the order details from each order. We now just need to make a custom property that's shows "has active subscriptions" : true or false, like this...

    image



    Hopefully Jacob can figure it out!
  • @fc_adam,

    Are subscribers only considered "active" in FC if the "start date" is in the past?
  • fc_adamfc_adam FoxyCart Team
    @Epotratz,

    As far as FoxyCart is concerned, a subscription is active if it's allowed to charge a customer, either today or in the future. So if a subscription is purchased with a future start date - so it hasn't charged a subscription yet - it's still "active" in that on that date the customer will be attempted to be charged. If a subscription is made inactive, then it won't be included in any of our normal subscription billing runs.
Sign In or Register to comment.