#ben_api

1 messages · Page 1 of 1 (latest)

edgy foxBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1296798475698311189

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

faint parcel
#

How can we help

rain gyro
#

Hey Wolfy,

I am waiting to better understand the relationship between schedules + phases, and subscriptions. Specifically the prices refenced within a phase, and what they can / cant point to.

And then how the overarching subscription + SI works.

quaint arch
#

does a schedule wrap a subscription, or does a subscription reference a schedule?
It's a 1:1 relationship, with the schedule being the 'parent'. For example, if a subscription is controlled by a schedule it is (mostly) immutable and instead updates would be made via the schedule

Does a subscription still require an SI or does the subscription now point to the schedule? Or is it both?
The actual intent generation is still done at the subscription level

Does the schedule phase and associated price need to point to a price that is recurring? Or is the price type unrelated and instead recurrance is managed by the schedule phase?
Yes, only recurring prices (with intervals) are supported. The phase interval/dates are inferred from the Price interval

#

Not sure who @faint parcel is...

faint parcel
quaint arch
rain gyro
#

Thanks Ynnoj, I guess Wolfy was just here for the popcorn!

Ok, so a phase msut point at a price that is of type recurring!

The intervals are inferred, but the phase sets the duration of the phase only. Is this based on the interval cycle? E.g. interval month interval_count 1 (once a month), phase cycle = 3 would mean continue for 3 billing cycles of 1 month (3 months) then move to next phase or end behaviour?

quaint arch
#

Yes exactly!

rain gyro
#

OK. And when creating a subscription, what order should this occur in>?

E.g. does a sub + si get crated first which forms the basis, and then we create a schedule that wraps and takes presedence?

I assume then when the end behaviour is triggered, if the behaviour is rlease, the schedule 'releass' the sub and it fallsback to what ever is defined in the SI itself?

quaint arch
#

Generally the other way around, but you can also create a schedule from an existing subscription. Depends what it is you're trying to achieve really!

I assume then when the end behaviour is triggered, if the behaviour is rlease, the schedule 'releass' the sub and it fallsback to what ever is defined in the SI itself?
Yes when released the sub just continues to recur on the regular interval set by the item(s) until otherwise cancelled

rain gyro
#

We will likely be creating the schedules at hte moment the subs are created.

Our platform allows the user to define the type of service they want to sell, and how it is structured. It wouldn't be designed for changing what someone has bought.

So if they build a product that starts as £100 pm for 3 months, then changes to £50pm thereafter, we would create the schedule for this when the prodiuct is sold to the customer.

quaint arch
#

Cool, so you probably want to create the schedule first with the defined phases and let that handle the subscription creation

rain gyro
#

Ok interesting, so if you create a schedule and attach to a customer object, this automatically creates the subscription?

quaint arch
#

Yep it'll create the subscription according to the configured start date (or immediately)

edgy foxBOT
rain gyro
#

OK so what would we do if the fallback subscription after release is different from what is in the schedule? Or what does the fallback become if the schedule creates the underlying fallback? Does it use the first or last price in the phases?

peak thistle
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

#

What do you mean by the "fallback subscription" exactly?
When released the Subscription will remain in the last state of the Subscription Schedule.

rain gyro
#

OK, so when the schedule ends, the subscription does not change, but instead remains in the state (price) of the last phase / price in the schedule

peak thistle
#

Correct. The Schedule just dictates when the Subscription needs to be updated and how. When you release it, nothing modifies the Subscription anymore and it stays as-is.

rain gyro
#

ok cool, this makes perfect sense, thank you