Taking actions based on entitlement end events

118 views
Skip to first unread message

nand...@womply.com

unread,
May 20, 2016, 7:20:42 PM5/20/16
to Kill Bill users mailing-list
Hello all,

I'm making a plugin that will take an action when an entitlement ends but it doesn't look like entitlement end events are currently exposed on the external event bus.

I see this closed issue: https://github.com/killbill/killbill/issues/493 so it looks like what I need will be added in 0.17. Do you know approximately when 0.17 will be released? If that is still far off, is there another way to trigger actions when entitlements end?

Thanks,
Nate

stephane brossier

unread,
May 23, 2016, 3:19:51 PM5/23/16
to nand...@womply.com, Kill Bill users mailing-list
Nate,

You are correct with your assessment. This feature will only be available in 0.17.0 (we don't have a date yet).

Do you really need the entitlement events or could you just listen to the subscription events that mark the boundaries from the billing point of view (    SUBSCRIPTION_CREATION,  SUBSCRIPTION_PHASE, SUBSCRIPTION_CHANGE, SUBSCRIPTION_CANCEL, ..). What do you plan to do with these events?


If indeed you need the feature sooner, we could provide some guidelines on how to build 0.17 branches (Kill Bill code is fairly stable),, what is maybe less stable are the current plugins (as we did not test them yet on top of 0.17)

Stéphane





--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To post to this group, send email to killbill...@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/31e9f506-2155-4039-a05b-741475118756%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

nand...@womply.com

unread,
May 23, 2016, 4:12:21 PM5/23/16
to Kill Bill users mailing-list, nand...@womply.com
Stéphane,

I want to disable products that our customers have unsubscribed from when their entitlements end. Looking through the code for the email notification plugin I can see that they take different actions depending on the subscription state of the entitlement associated with a subscription cancel event (line 197 at https://github.com/killbill/killbill-email-notifications-plugin/blob/944abacb2502cdb1ebf5f886e991fbf4ed992319/src/main/java/org/killbill/billing/plugin/notification/setup/EmailNotificationListener.java). Will a new subscription cancelled event be generated when an entitlement ends? Or does that code only distinguish between an immediate cancellation with proration and a cancel at end of term?

Thanks for the help,
Nate

stephane brossier

unread,
May 23, 2016, 10:54:44 PM5/23/16
to nand...@womply.com, Kill Bill users mailing-list

Stéphane,

I want to disable products that our customers have unsubscribed from when their entitlements end. Looking through the code for the email notification plugin I can see that they take different actions depending on the subscription state of the entitlement associated with a subscription cancel event (line 197 at https://github.com/killbill/killbill-email-notifications-plugin/blob/944abacb2502cdb1ebf5f886e991fbf4ed992319/src/main/java/org/killbill/billing/plugin/notification/setup/EmailNotificationListener.java). Will a new subscription cancelled event be generated when an entitlement ends? Or does that code only distinguish between an immediate cancellation with proration and a cancel at end of term?



Whenever a subscription reaches its cancellation date (effective date), the system generates an event, whether this was an immediate cancellation, an end of term cancellation, or cancellation at a specific date. However in these different scenarios, the effective date of the cancellation would be different and so the event would be generated at a different date.


Now to make things a bit more interesting, the system will not generate 1 event but 2 events: One will be generated to mark the end of the entitlement (customer does not have access to the service), and one when the billing ends. Those could be the same date or could be different.

Example: A customer subscribed to a movie monthly plan on 1/1/16. He gets billed every first of the month. On 3/15 he decides to cancel his subscription immediately, and he loses access to his service on 3/15. His entitlement ends on 3/15. However the system (catalog) was configured to not generate any pro-ration credit, which means from a billing point of view his cancellation date would be 4/1/16. System will generate a SUBSCRIPTION_CANCEL on 4/1/16 (and in KB 0.17 it will also generate a new event ENTITLEMENT_CANCEL on 3/15).


Stéphane


 
Thanks for the help,
Nate

--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To post to this group, send email to killbill...@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
Reply all
Reply to author
Forward
0 new messages