Different hero for active subscribers vs churned ones on a subscription storefront
Beverage DTC on Hydrogen with a subscription program. We want three states on the home hero:
- Active subscribers: refill reminders and tier-upgrade content
- Churned subscribers: a win-back offer
- Everyone else: the acquisition hero
Subscription status lives in our subscription app's API, not in Shopify itself. Where should that status live on the Croct side so audiences can use it, and do we have to call identify manually for logged in customers?
1 answer
There is no manual identify call to make: logged-in customers with Shopify customer accounts are identified on every request by the Hydrogen SDK.
For the subscription status, use a custom attribute. On login, once your storefront has the status from your subscription app's API, set it:
croct.user.edit() .set('custom.subscriptionStatus', 'active') .save();Then your audiences query it without the custom. prefix:
user's subscriptionStatus is "active"and is "churned" for the win-back audience. The acquisition hero stays as the default slot content, so anyone matching neither audience gets it automatically.
One more thing that matters for a subscription business: identity resolution keeps the journey linked when a subscriber logs in on a new device. The profile, including the subscription status, follows them, so the refill hero shows up on their phone even if they set the status from a desktop session.