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



                                                    • 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 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

                                                                                                    • Posibility to add Emoticons on the Email Subject of Templates

                                                                                                      Hi I´ve tried to add Emoticons on the Subject line of Email templates, the emoticon image does show up before saving the template or if I add the Emoticon while sending an Individual email and placing it manually on the subject line. Emoticons also show
                                                                                                    • Circuite fail because www.zohoapis.com:443 refuse conection

                                                                                                      Is anyone else experiencing this issue? A few weeks ago, I started having issues with circuits failing due to www.zohoapis.com:443 refusing the connection. The error message is quite clear and points to a problem on Zoho's API server, rather than with
                                                                                                    • Export PDF File Name

                                                                                                      Is it possible to change the default Zoho .pdf naming scheme for inventory items like quotations? Would like to use the the Subject as the default quote name. Is this possible?
                                                                                                    • Does Zoho campaign de-duplicate based on mobile for SMS campaigns?

                                                                                                      Hi - We recently sent our first SMS campaign using Zoho Campaign integrated into Burst SMS and got feedback that some of our customers received multiple messages. Upon inspection, this was due to multiple contacts in our list containing the same mobile
                                                                                                    • I can't auto-scheduling calls down - the code does not change anything

                                                                                                      Hi, I was trying to set a function that auto-schedules calls based on their call result; i.e "Requested more info". I had also included a reminder to send an email in the code. I logged a test call and nothing changed. Is there anything wrong with the
                                                                                                    • Download PDF from File Field with the name in another single line field

                                                                                                      Hi I am storing a PDF file in a File Field of a Form using Zapier automatically. now i need to download that file and set its file name as per the value stored in a single line field in that form. ANy turnout for that Thanks
                                                                                                    • Zoho Flow Custom Function to Register Sale in Zoho Thrive

                                                                                                      Hi Thrive team, I want to create a custom function which sends purchase information back into Thrive for Affiliate commission. I'm stuck on how to setup the connection, specifically creating an OAuth connection through https://api-console.zoho.eu/ Please
                                                                                                    • Feature Request - Insert URL Links in Folders

                                                                                                      I would love to see the ability to create simple URL links with titles in WorkDrive. or perhaps a WorkDrive extension to allow it. Example use case: A team is working on a project and there is project folder in WordDrive. The team uses LucidChart to create
                                                                                                    • Open Link in Lighbox

                                                                                                      I use Zoho Sites and Zoho forms. Is there a way to create a link in Zoho sites that opens up the Zoho Form in a Lightbox in such a way that the user doesn't have to change tabs/windows in order to complete the form? In addition, I would like to create Links to videos with a light box. I want the light box as well so the user doesn't have direct access to the link on Zoho forms. Any assistance would be appreaciated. 
                                                                                                    • How to add custom icons in Sites ?

                                                                                                      I've been trying to upload some of my own icons (specific to my business) to my zoho Site draft, and can't find a way to do it. I guess the workaround could be to insert images instead of icons and upload my icons as images, but I was wondering if its possible to customize the icon library.
                                                                                                    • Documents won't open

                                                                                                      I literally just downloaded the desktop app, and it won't open a document I'm trying to load. I don't have this issue with any other word processor. It's just stuck like this. I do not want to use the online platform at all, I just want to use the desktop
                                                                                                    • FSM

                                                                                                      Hello, I have a question regarding the FSM system. Currently our company has setup the FSM which has two major parts, Requests and Work Orders. The system is set for Requests and Workorders to communicate with each other. Currently Request has 45gb of
                                                                                                    • Free Webinar Alert! Building Your Brand: Solopreneur Tips to Use Zoho Mail

                                                                                                      Hello Zoho Mail Community! We’re excited to invite you to an exclusive session: "Building Your Brand: Solopreneur Tips to Use Zoho Mail." In this webinar, we’ll explore how Zoho Mail helps solopreneurs create a professional brand with custom email domains,
                                                                                                    • Hundreds of folders or tags (for each client): best practices?

                                                                                                      I'm preparing to switch from Gmail Workspace where each of my clients has their own label, assigned automatically after I manually set it up when someone becomes a customer. I know that those labels can be converted into folders in Zoho Mail, resulting
                                                                                                    • how to Add a TXT record in the DNS

                                                                                                      hi everyone, i am using https://pradairways.weebly.com domain for practice purpose, now a Domain Verification - pradairways.weebly.com is required ,how to add txt reocrd in dns and complete the process. thanks in advanced
                                                                                                    • Using Linkedin as 'Unique Identifier ' for Duplicate Management for Candidates and Contacts in Zoho Recruit

                                                                                                      Quick hats off to Zoho Recruit on the functionality of Unique Identifier ' for Duplicate Management for Candidates and Contacts in Zoho Recruit. I recently added the ability to manage duplicates based on Linkedin profile. Candidates' and Contacts' email
                                                                                                    • job opening status is locked and and I cannot change it

                                                                                                      Dear Support I am using standard plan. The job opening status is locked and and I cannot change it.
                                                                                                    • NOW Zoho Creator still cannot bulk download Image or File Upload Field

                                                                                                      The filedownloader has been deprecated for 5 years. Until now, we still cannot have a replacement tool. How can we bulk download the file that we uploaded to Zoho Creator. Previously, it was so simple to bulk download all those files. But now failed to
                                                                                                    • Unified View Desk Tasks

                                                                                                      In the unified view of the tasks, It is not possible to have the tasks of all the services in Zoho Desk. We have to choose a service to display but It's not really the purpose of the unified view
                                                                                                    • The ability to show fields from subforms when viewing from related list

                                                                                                      Hi there, Currently im only able to display default columns , however when im unable to add the columns/fields from the subform Ive created. below is a field called quantity from the subform. Im not able to search up this field from the manage column
                                                                                                    • How to find (total) profits per item in Zoho inventory or Zoho Books

                                                                                                      Hi, I would like to find out how to generate a report that has Item/ Cost Price/Sales Price (total)/Profit (total)/Margin The current sales reports has the total qty sold and the sales price but does not show the profits. Can i check how to do it? Similar
                                                                                                    • 3/26(水)開催|5名限定 課題解決型ワークショップイベント Zoho ワークアウト開催のお知らせ

                                                                                                      ユーザーの皆さま、こんにちは。Zoho ユーザーコミュニティチームの中野です。 3月開催のZoho ワークアウトについてお知らせします。 ※定員に達したため、受付を終了しました。 ━━━━━━━━━━━━━━━━━━━━━━━━ Zoho ワークアウトとは? Zoho ユーザー同士で交流しながら、サービスに関する疑問や不明点の解消を目的としたイベントです。 Zoho サービスで完了させたい設定やカスタマイズ、環境の整備など……各自で決めた目標達成に向け、 Zoho Champion や、他の参加者と同じ空間で作業を行うことが可能です。
                                                                                                    • Page - Gauge - Target Values

                                                                                                      Is there a way to make the Target and Maximum values say a formula or query?  For example, total sales for the month = 109 and I want to make my gauge today's percentage.
                                                                                                    • Continue after error for each loop on invoke url

                                                                                                      Hello. I'm trying to upload files to workdrive using invokeurl. It goes through a list of urls using for each. Sometimes the file is larger than 5mb. The whole workflow stops in that event. I'd love a work around to upload larger files, but I don't think
                                                                                                    • 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.
                                                                                                    • 【開催報告】東京 ユーザー交流会 2025/3/19 エキスパートユーザーがZoho サービス活用における基本から応用までのノウハウを伝授!(CRM / Marketing Automation)

                                                                                                      皆さま、こんにちは。コミュニティチームの藤澤です。 3/19(水)に東京ユーザー交流会を開催しました。当日は22名のユーザーの皆さまにご参加いただきました。本投稿ではその様子をお届けします! 当日の登壇資料などもこちらで共有しますので、参加できなかった皆さまもぜひご参照ください。 Zohoサービス活用事例セッション: Let's 活用!Zoho CRM レポート機能 2024年度のZoho Championである@松井 邦夫 さん(Zotion)にご登壇いただき、これまでのご経験をもとに「CRMのレポート機能」についてご解説いただきました。
                                                                                                    • setting owner of note when adding via deluge

                                                                                                      My organization has requested the ability to mass update the notes related list in the deals module. Since this can't be done with the mass update feature, I created an update "notes single" line field and created a workflow rule that triggers a function
                                                                                                    • Permission Update Failed

                                                                                                      Dear Sir, I have downgraded from the trial paid plan to Free Plan. I am logged in as CEO - Administrator and trying to change the profile permission but getting error - Permission Update Failed. Please see the screenshot. In most of the pages I am getting
                                                                                                    • Ability to re-order Workflow Rules

                                                                                                      We really need the ability to re-order workflow rules within departments.  Either the ability to drag/drop them into a different order or something.
                                                                                                    • Forwarding email into Desk - DMARC errors

                                                                                                      Hi, Our email domain is hosted through Exchange Online (Office 365). Customers email support@ourdomain.xyz which is delivered to Exchange. Exchange rewrites the TO email header to the email address associated with our Zoho Desk (support@ourdomain.zoho.xyz).
                                                                                                    • Auto-sync field of lookup value

                                                                                                      This feature has been requested many times in the discussion Field of Lookup Announcement and this post aims to track it separately. At the moment the value of a 'field of lookup' is a snapshot but once the parent lookup field is updated the values diverge.
                                                                                                    • Location functionality now deletes bundle information if changed

                                                                                                      With the introduction of Locations, we are experiencing several issues. 1. When bundling an item, the 'default' is to the organisation, not a location. This is not a significant issues, other than when you change the value, any batch tracking information
                                                                                                    • ZOHO DESK ヘルプセンターの言語選択メニューの表示方法

                                                                                                      ZOHO DESK のヘルプセンターを構築し、多言語化設定をしました。 顧客のヘルプセンター画面右上に言語選択メニューが表示されないため、弊社の契約先会社に問い合わせましたが、「通常は多言語化をオンにすると表示するためCSS を触り過ぎではないか」 という指摘のみでした。 試行中ですが表示できません。 何か要因となる情報をお持ちの方がいましたらご教授いただけますと幸いです。 ↓の赤枠を表示したいのですが、表示できません。
                                                                                                    • I live a webhook of zoho flow and I don't know how to respond with the following json {"fulfillmentText": "Text"}

                                                                                                      dialogflow sending me data to the webhook, I do searches in my zoho application and at the end of my flow I need to give this answer to dialogflow ... I don't know how to configure the webhook response! how is it done? This is the answer I need to send
                                                                                                    • Sales Returns - Repairand Return

                                                                                                      Hi Inventory Team, I'm working with a client on an Inventory implementation project and they have shared this use case with me. Some items may be returned by the customer, then returned to the vendor for repairs, received from the vendor and shipped back
                                                                                                    • Inserted Records not showing in Kanban view

                                                                                                      When insert a new record into a report from a workflow, it doesnt show in KANBAN view. When i view the report in a regular list view, the records are there. If i edit the record (while in list view) and then update it at all (even if i dont change anything,
                                                                                                    • Client scripts for Zoho Books ?

                                                                                                      Good day everyone, I am looking for a way to be able to interact with the Quotes and Invoices as they are being created. Think of it like Zoho client script in Zoho CRM. But for the life of me I dont see a way to do this. The issue with having function
                                                                                                    • Multiple Admin accounts

                                                                                                      We recently moved Admin access to our original recruiter (who left) and owner ship of the admin account is set to our CEO. I've asked to also be given admin access so he is not a limiting resource but he/we can't seem to find that out. He recently upgraded
                                                                                                    • Zoho Desk Invite

                                                                                                      I'm trying to send an invite via Zoho Desk to the email nwc.hd@telecare.com.sa using my account in Zoho desk rmsh7777.rs@gmail.com but the invitation or email is no received. I need your kindness to activate the account, please.
                                                                                                    • Cannot read properties of null (reading 'className')

                                                                                                      Hello, I'm attempting to integrate the Zoho desk chat widget. It loads visually on most pages, but at some point, it throws this error and it never appears: Cannot read properties of null (reading 'className') Here is the full trace: floatbutton1_hXdnKUp…f6FPihRNT_T47_.js:1
                                                                                                    • Next Page