Tip #2 - Cancellation of Offline Subscriptions based on the Expected Payment Date

Tip #2 - Cancellation of Offline Subscriptions based on the Expected Payment Date

Hello everyone,

As you all know, we are coming up with a custom function workflow every week to address specific business scenarios. In continuation of this previous blog, this week we will be seeing about Cancellation of Offline Subscriptions based on the Expected Payment Date.

Business Scenario:


In general, for any business, the customers make payments via online as well as offline. In case of subscription where the automatic collection of charge is enabled (aka online subscription), the customer's card on file will be automatically charged on the renewal date on a regular basis. If for some reason the collection of charge fails on renewal, the Retry Settings (Dunning Settings) will handle the payment collection and sending notification reminders on specified intervals. Upon failure of all the retry attempts, the system will automatically cancel that subscription.

Whereas in the subscription for which the payment is made via cash (or) check, the business (sales) person collects the payment and record it manually into the billing system. There can be situations where even after multiple reminders and personal follow-ups by the salesperson, the customer might not have still paid for the invoice. In such cases, to avoid churn and to keep the cash flow coming, there can be a negotiation between the salesperson and the customer to collect the payment before a final date. This final date can be marked as the Expected Payment Date in that particular invoice.

In most of these scenarios, the customers will usually pay within the expected payment date which was previously agreed upon. However, if the customer fails to do so, the salesperson might have to cancel their subscription manually as there is no business value associated with it. 

Now, let's see how we can automate this process without any manual work. By doing this, you could save a significant amount of time which can be put into developing your business.

Logic Explanation:

As you would have guessed by now, we would be using our Custom Function Workflow to achieve this. Since this scenario involves date based actions, we will be using Date based Workflow. The Date based workflow is something that can be configured to run after a particular date and at a particular time depending on our requirement.

Now, if you were wondering how to configure the custom function to automate our process, please find the answers to your questions below.

What type of Workflow is to be followed?
Date Based Workflow

When is the date of execution?
1 day(s) after the Expected Payment Date.


Are there any additional filters required?

Yes. Execute this workflow only for unpaid invoices.

So to summarize, this custom function should be set to run exactly one day after the expected payment date for the unpaid invoices. After configuring this custom function, you would have to code (the functionality) in such a way that the subscription associated with the invoice is cancelled immediately.

Please be informed that this custom function workflow will work only on the invoices which are created after configuring this custom function.


Code Explanation:

You can refer the code through this GitHub link. The code is written in Deluge script, which is easily understandable to non-programmers. 

1) This snippet of code will be executed only for invoices which are unpaid even after the expected payment date. Kindly replace the "authtoken variable" with your generated authtoken.

2) Initially, we will retrieve the Subscription that is associated with that particular invoice.

3) After retrieving the associated subscription, we will be cancelling it by using the Cancel Subscription API.


Getting started with the Custom Functions: 

1. Go to Settings -> Automation -> Custom Functions.


2. Create a new Custom function. Provide a name for the function. 


3. Choose the module as 'Invoice' and click on 'Create Custom Events'. 


4. Choose Date Based workflow type and Date of Execution as 1 day(s) after Expected Payment DateYou can also set a different Execution Time based on your requirement.

5. In order to run the function for unpaid invoices, Apply Advanced Filter as When Status isn't Paid

6. Copy the code which was given above.

7. Save the Custom function and you are good to go.


Further Enhancements:

1)  While using this custom function, there might be a scenario where you would like to exclude a few of your prime customers' subscription from being cancelled automatically without your consent. In order to do this, you can add a Custom Field of type CheckBox to the Subscription. 

While creating a subscription, you can leave this CheckBox marked (or) unmarked in order to differentiate your prime customers from others. Later, you can add this custom field in the Addition Criteria of your workflow, such that the workflow is executed only for your non-prime customers.

Please refer the below image for your reference, where the CheckBox custom field is named as "Cancel subscription automatically?".

2) When the subscription is cancelled, the last renewed invoice will still be in open status. If you would like to void that invoice before cancelling the subscription, you can modify the workflow to address that need. 

Found this useful? Try it out and let us know how it works! If you have questions, do not hesitate to ask!

Cheers,
Sasidaran K,
Zoho Subscriptions.

    Access your files securely from anywhere


              Zoho Developer Community




                                      • Desk Community Learning Series


                                      • Digest


                                      • Functions


                                      • Meetups


                                      • Kbase


                                      • Resources


                                      • Glossary


                                      • Desk Marketplace


                                      • MVP Corner


                                      • Word of the Day


                                      • Ask the Experts



                                          Zoho Marketing Automation
                                                  • Sticky Posts

                                                  • Tip #4 : Refer and Earn Workflow system for your Subscription Business

                                                    Hello everyone, We've been coming up with a tip every week to address specific business scenarios which can be implemented for your business. In continuation to the previous post, this week we will be seeing about how you can implement the Refer and Earn Workflow system to acquire more customers. Why are Referrals important? Customer Acquisition is crucial for any business to sustain itself in a constantly evolving market. It involves persuading new consumers to purchase your products. Customers
                                                  • Tip #2 - Cancellation of Offline Subscriptions based on the Expected Payment Date

                                                    Hello everyone, As you all know, we are coming up with a custom function workflow every week to address specific business scenarios. In continuation of this previous blog, this week we will be seeing about Cancellation of Offline Subscriptions based on the Expected Payment Date. Business Scenario: In general, for any business, the customers make payments via online as well as offline. In case of subscription where the automatic collection of charge is enabled (aka online subscription), the customer's
                                                  • Tip #3 : Send SMS Reminders for your Subscription Business

                                                    Hello everyone, As you all know, we are coming up with a tip every week to address specific business scenarios. In continuation to the previous blog, this week we will be seeing how you can use SMS reminders for your Subscription Business. Using SMS messages for your Subscription Business: While managing your subscription business, more often than not, you need to keep your customers informed about upcoming renewals, payment reminders and cancellations. By keeping them informed in advance, you can
                                                  • Tips And Tricks - Announcement

                                                    Hello everyone, Every business is unique and each of them follows a specific workflow. While managing your customers' subscriptions with Zoho, you might have some needs unique to your business. Custom Functions helps you address such needs. This is a start to a series of posts, where we will be coming up with a custom function workflow every week that addresses specific business scenarios. Watch this space for further updates! Also, if you have any specific business scenario which needs to be addressed,
                                                  • Tip #6 : Accessing external URLs from Zoho Subscriptions

                                                    Hello everyone, We have been sharing a tip every week to address specific business scenarios which you can implement for your subscription business. Last week, we shared a tip about implementing the Approval Workflow system. This week, let's look at how you can access external URLs with the help of Custom Link. Business Scenario: Every business functions differently and has its unique requirements. At times, businesses might want to access other websites or applications by appending specific information


                                                  Manage your brands on social media



                                                        Zoho TeamInbox Resources

                                                          Zoho DataPrep Resources



                                                            Zoho CRM Plus Resources

                                                              Zoho Books Resources


                                                                Zoho Subscriptions Resources

                                                                  Zoho Projects Resources


                                                                    Zoho Sprints Resources


                                                                      Qntrl Resources


                                                                        Zoho Creator Resources



                                                                            Zoho CRM Resources

                                                                            • CRM Community Learning Series

                                                                              CRM Community Learning Series


                                                                            • Kaizen

                                                                              Kaizen

                                                                            • Functions

                                                                              Functions

                                                                            • Meetups

                                                                              Meetups

                                                                            • Kbase

                                                                              Kbase

                                                                            • Resources

                                                                              Resources

                                                                            • Digest

                                                                              Digest

                                                                            • CRM Marketplace

                                                                              CRM Marketplace

                                                                            • MVP Corner

                                                                              MVP Corner





                                                                                Design. Discuss. Deliver.

                                                                                Create visually engaging stories with Zoho Show.

                                                                                Get Started Now


                                                                                  Zoho Show Resources


                                                                                    Zoho Writer Writer

                                                                                    Get Started. Write Away!

                                                                                    Writer is a powerful online word processor, designed for collaborative work.

                                                                                      Zoho CRM コンテンツ








                                                                                        Nederlandse Hulpbronnen


                                                                                            ご検討中の方




                                                                                                  • Recent Topics

                                                                                                  • Can't create task programmatically using deluge

                                                                                                    I have a Date/Time field like this when it is edited, I want to create a task using deluge function. I use the code below to create a task. but unfortunately, the task is never created even I run it using 'execute' button on function editor. what went
                                                                                                  • Open word documents directly within zoho writer without converting

                                                                                                    There was an article in the help page that said that there would be a feature where zoho writer can directly open MS Word files without the need to convert those files to zoho format. It was said that it would be available by Q1 2023. Here is the article
                                                                                                  • Not receiving email at Outlook

                                                                                                    Hi, I've set up the account and can do everything except receiving email at Outlook. Please find print screen below parameters configured and advise what could went wrong. I can send email from both Webmail and Outlook. I could, however, receive email
                                                                                                  • Office 365 and Zoho CRM

                                                                                                    Does anyone have this synching properly. I configured it and the Zoho Calendar shows up in 365 but nothing comes from 365 into zoho crm. I have enabled the two way. No errors are being generated. If anyone has some insights I would really appreciate
                                                                                                  • To unblock , ensure atleast 5% free space of your total mailbox size exists after email deletion.

                                                                                                    Bom dia, Já deletei todos os e-mails , mas ainda não consigo desbloquear o e-mail comercial@hidrotecnicauberlandia.com.br. Já faz dias que deletei, mas ainda não desbloqueia quando sigo os passos de UNLOCKED ME. Por favor me ajudem.
                                                                                                  • Kiosk Page Refresh

                                                                                                    We have a Kiosk running from a button in contacts to update values and also add related lists, which works great, but when the kiosk is finished the page does not refresh to show the changes. Is there a way to force the contact to refresh/update when
                                                                                                  • Zoho does not send invitation email if meeting is created in calendar

                                                                                                    Problem: I create a meeting in calendar and add attendees. After "Save" button it asks me if I want to send email to all ettendees, I click Send. But none emails are sent. I did try that over outlook (connected thru active sync) or in zoho web mail. Nothing
                                                                                                  • Change Background in PDF Template

                                                                                                    Background PDF Hi, I want to ask a question. I want to create a background template with my own image. Above is an example that I made, why does the result not fit the A4 format? Like cut off. I used an A4 Portrait image, is there a size error? can you
                                                                                                  • Spotlight #7 - Automatic Transitions in Blueprint

                                                                                                    Previously, records could not be moved from one state to another without user intervention. With automatic transitions, move records from one state to another automatically, when it elapses its pre-defined time. This Spotlight discusses how automatic
                                                                                                  • Accepted meeting invites not showing on calendar

                                                                                                    I can receive a calendar invite to a meeting, I confirm I can attend and hit accept. I then check my calendar and it doesn't show. 30 seconds later, it does show up but it is delayed leaving the feeling something didn't work correctly. Can this be improved,
                                                                                                  • Cross module filtering is now supported in CRM

                                                                                                    Editions: All DCs: All Release plan: This enhancement is being released in phases. It is now available in AU, JP, and CN DCs. Help resource: Advanced filters The Cross-module filtering enhancement is now available to all CRM accounts in the following
                                                                                                  • Optimizing Zoho CRM & Xero Workflow – Advice Neede

                                                                                                    Hi everyone, We’ve been using Zoho for all CRM functions and Xero for all accounting, but the workflow between the two has become difficult to manage. The business does not want to move from Xero, as it's the accountants’ preferred system, but we need
                                                                                                  • No fue posible enviar el mensaje;Motivo:553 Relaying disallowed. Invalid Domain - admin@laboratoriosantarosa.org

                                                                                                    Hola Renovamos después del tiempo el dominio, y luego de eso se cayó el servicio de correo. Seguimos las indicaciones que se indican en este articulo, sin embargo, hasta el momento solo podemos recibir correos pero no enviar. Hemos actualizado los registros
                                                                                                  • Zoho Error: This Operation has been restricted. Please contact support-as@zohocorp.com for further details

                                                                                                    Hello There, l tried to verify my domain (florindagoreti.com.br) and its shows this error: This Operation has been restricted. Please contact support-as@zohocorp.com for further details. Screenshot Given Below -  please check what went wrong. Thanks
                                                                                                  • Error AS101 when adding new email alias

                                                                                                    Hi, I am trying to add apple@(mydomain).com The error AS101 is shown while I try to add the alias.
                                                                                                  • My IMAP mail suddenly stopped working

                                                                                                    On my iPhone and iPad, IMAP stopped working for my Zoho account with the error "User name or password incorrect" and "Invalid credentials failure" however I was able to access via web with the same credentials. Also stopped working on Apple Mail client.
                                                                                                  • When choosing custom view, load a particular Kanban view by defualt

                                                                                                    I have two custom views defined (say viewA, viewB) in the Leads module. I also have a Kanban views (say K1 and K2) defined in the Leads module. What I would like is that if I select viewA, it automatically loads Kanban via K1. If I select viewB, it automatically
                                                                                                  • Use result of one formula field for another formula field

                                                                                                    Can I pull data from one formula field as one of the values for another formula field? I tried doing it and it's returning an "invalid formula" error so I'm not sure if I made the formula incorrectly or if it's just really not possible to do that. Also,
                                                                                                  • Windows Desktop App - request to add minimization/startup options

                                                                                                    Support Team, Can you submit the following request to your development team? Here is what would be optimal in my opinion from UX perspective: 1) In the "Application Menu", add a menu item to Exit the app, as well as an alt-key shortcut for these menus
                                                                                                  • Export all Zoho desk tickets for past 3 months

                                                                                                    Hi I need to export ticket data from Zoho Desk. Specifically, I'm looking to: Export the last 3 months of tickets⁠ include ticket categories, timestamps, resolutions, agent responses (basically as much data as possible) the ticket content being the most
                                                                                                  • Zoho Calendar (Refresh Rate)

                                                                                                    Why don't the calendars refresh more than every 12 hours? That is crazy. I cannot be the only user who wants to see this change? I see and understand that I can MANUALLY update them, but need them to auto refresh either (1) whenever there is a change
                                                                                                  • Unattended Sessions - Groups and Access

                                                                                                    I would like to see Groups to organize Unattended Computers (what is currently labeled "My Computers") and a way to restrict access to individual users to specific groups.
                                                                                                  • No Hope for Zoho Meeting

                                                                                                    Zoho Meeting is just the poorest meeting app I've come across in a long time. The support sucks too. I called to see if there was anything that could be done on the backend and while I was on a test meeting with support the video was lagging and freezing
                                                                                                  • Add clients without needing a client company

                                                                                                    I, like many people, deal directly with individual clients rather than companies. It's really obnoxious to have to add a client company and treat my client, who is an individual person, as a company. Zoho - can you please build in a way to bypass the need for the client to be part of a company? This is a problem in cliq as well - I want to invite my clients to channels in Cliq but needing to create a company is confusing for them and makes them feel as if they don't belong on the app. But that's
                                                                                                  • Client reminders

                                                                                                    Hi Is there anyway to send automatic client reminders when we are pending a response from them? For instance, in a blueprint, say you have a transition that asks them for some additional information... They may take a while to reply, so is there a way
                                                                                                  • Add Image Upload Field to Zoho Bookings Registration Form

                                                                                                    Hi, We would like to request the addition of an image upload field to the Zoho Bookings registration form. Currently, Zoho Bookings only supports text-based fields (e.g., Single Line, Multi-Line, Email, Checkbox, Dropdown, Radio Button, and Date), but
                                                                                                  • Current Year Merge Tag

                                                                                                    I am looking for a way to add the current year dynamically to email campaigns. For example "Copyright 2024", so that templates are always up to date and this would also really help with automations. Another example could be a Happy New Year email which
                                                                                                  • Blueprints: Create Global Transitions

                                                                                                    Dear Zoho Team, it would be nice we could create global transitions for blueprints. The use case would be the following: We have 4 different processes with the same transitions in different orders. We could create 4 different blueprints, but whenever
                                                                                                  • Check-in and check-out time calculation discrepancy as shown in a screen recording

                                                                                                    Please see linked screen recording for my question: https://workdrive.zohoexternal.com/external/94dd0267dc877b3f827cc09b294625105627680700cec50e71d36c08e94cb257
                                                                                                  • Zoho marketing hub integration with WordPress WooCommerce

                                                                                                    Hello All,  I am a Zoho One User and we are using Zoho Marketing Hub we also have a website on Wordpress and we use Woo Commerce as our store.  im looking to find out if Zoho Marketing Hub Integrates with WooCommerce   ideally we would like to create Journeys or campaigns series based on customer behavior such as buying or already have purchased specific products. or if they go to the store but don't buy (abandon cart follow)  i saw that there is a wordpress plugin for Zoho Campaigns https://wordpress.org/plugins/zoho-campaigns/ but
                                                                                                  • Need help in search with formula culums in reports

                                                                                                    Hello, I do not know where to start with this one : I have a customer report with all that was bought and paid by my customers. It can be many records for one specific customer. Ex. Customer A has 1 record for a purchase of 1000 $, and 2 records of payments
                                                                                                  • how to send recurring estimates instead of recurring invoices

                                                                                                    Hello, Is it possible to use the recurring invoice functionality to send recurring estimate to our customers ? We first need to send them an invoice in order to receive their purchase order and then send them the invoice with their purchase order number
                                                                                                  • AS101

                                                                                                    I'm having issue while adding email alies to an email. Please help.
                                                                                                  • Tracking UTM Campaign information in CRM

                                                                                                    Hi All, We have had this questions asked a few times lately so thought it would be a great idea to post it here for others benefit.  Many have asked this: How can I track campaign information in CRM from my online campaigns and report on UTM tracking details?  Below is what we have set up for other businesses who are using UTM Codes for all their campaigns. Follow the 4 steps below to set this up for your CRM: 1. Create Fields in CRM Leads Module Add a field  in the Leads module called 'Referrer
                                                                                                  • Adding fields to campaign members

                                                                                                    Is it possible to add fields to campaign members? I want to be able to insert a date that certain actions happened as we progress a client, but can't see where or how I might be able to do that
                                                                                                  • Amazon Integration

                                                                                                    Hi, I am seller on Amazon , & I would like to sign up for Zoho books. However my question is can we automate/integrate invoicing, charges and returns in amazon with Zoho using API? Do you have a developer for this? I did take a look at zapier however it just has a create Invoice function nothing else.
                                                                                                  • Remove Zoho contract upsell at customer sign completion page

                                                                                                    Hello, I am going through testing for a zoho contract for my organization and I noticed that after the customer signs the contract they are forwarded to a completion page that tries to sell them on using zoho contracts. I find that very unprofessional
                                                                                                  • Retain Jira Ticket When Merging Tickets in Zoho Desk

                                                                                                    Hi, We would like to request a feature enhancement for Zoho Desk's ticket merging process regarding Jira ticket retention. Current Behavior: When merging two tickets (manually via the interface or through the API), we can select the "master" ticket into
                                                                                                  • Workdrive comment links stopped working.

                                                                                                    I have marked a PDF file with 95 comments, they have worked for a while. When i clicked on them they brought me to the correct page and showed me the outline that i had drew on the plans. The comments included the page number of the outline, but now it
                                                                                                  • Generate a Zoho Sign link

                                                                                                    From time to time I get a response "I never received your you e-document for electronic signature" is there a way to generate a Zoho Sign link to share.
                                                                                                  • Next Page