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.


      • 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

        • Recent Topics

        • Multi-select Lookup does not have Advanced filter options in CRM

          With much fanfare Zoho announced the advanced filter options for CRM lookup fields which was a nice addition. This feature is not available for Multi-Select lookup fields. Will it be rolled out in the next 3-6 months, considering the standard lookup filter
        • Kaizen #8 - Handling Recurrence and Participants in the Events Module via API

          Hello everyone! We are back this week with an exciting post—Handling recurrence and participants in the Events module through API. First things first—What is the Events module? "Events" is a part of the Activities module in Zoho CRM.  An event is an activity that happens at a given place and time. You can find Events on the user's Zoho CRM's home page, Activities home page, Calendar, and in other related records. What are the types of Events? Events are of two types—Recurring and non-recurring events.
        • Split functionality - Admins need ability to do this

          Admins should be able to split an expense at any point of the process prior to approval. The split is very helpful for our account coding, but to have to go back to a user and ask them to split an invoice that they simply want paid is a bit of an in
        • Delegates - Access to approved reports

          We realized that delegates do not have access to reports after they are approved. Many users ask questions of their delegates about past expense reports and the delegates can't see this information. Please allow delegates see all expense report activity,
        • How to include total km for multiple trips in expense report.

          Whenever I create a mileage report it only shows the total dollar amount to be reimbursed. The mileage for each individual trip is included but I also need to see the total distance for all trips in a report? How do I do this?
        • Zoho Desk Limit for Comma Separated Queries

          Hi, I have just discovered a limit that I believed is not mentioned in any of Zoho's documentations. My search query looks like so: "query: {"accountId":"786050000091629966,786050000163589273,786050000163589427,786050000162753705,786050000162112971,786050000161987643,786050000160752868,786050000167089504,786050000167089378,786050000167089024,786050000167070005,786050000166295256,786050000128153693,786050000110560021,786050000046594575,786050000039106461,786050000002225356,786050000076889093,786050000047895103,786050000043365354,786050000044765191,786050000041790249,786050000040359116,786050000037945198,786050000024605077,786050000000525015,786050000155333895,786050000157741437,786050000000718125,786050000011574353,","departmentId":"786050000042648070","status":"Finished","sortBy":"createdTime","customField2":"cf_completion_date:2025-01-28T03:00:00.000Z,2025-10-28T03:00:00.000Z","customField3":"cf_billed:false"}"
        • Get logged in user ID in Deluge script

          Hello all, How do I get the id of the logged-in user in a deluge script? the "zoho.loginuserid" function actually returns the users email address or whatever the user id they use to login to zoho with and not the id of the user record, and given that
        • Item Details Field - New Barcode / Document option?

          Is this a new feature??? its in both books and inventory.
        • Module Name doesn't exist

          I am trying to create a module named Activity, with plural Activities, but I have an error that module name already exists. This module is doesn't exist, and I don't have a single field called Activity or Activities.
        • Super Admin Logging in as another User

          How can a Super Admin login as another user. For example, I have a sales rep that is having issues with their Accounts and I want to view their Zoho Account with out having to do a GTM and sharing screens. Moderation Update (8th Aug 2025): We are working
        • Shared Mailbox - Mark as read for all users

          Hi all, Maybe someone can help me out. At the moment we have a shared mailbox without streams. When a users reads an mail or marks it as read other users will not see this. How can we resolve this? We now archive the mails when read and followed up. However
        • Is it possible to embed Youtube shorts?

          Hi Zoho desk support, This is Ryan from Accuver America. While I'm trying to create a knowledge base article with embed video, I ran into this issue. "www.youtube.com refuse to connect" A little bit background is that because this video is recorded on
        • How do I increase the email attachment size in Zoho CRM ?

          It looks like I'm limited to 10MB when sending an attachment using the email widget on a record in Zoho CRM. Is there a way to increase the size? Or can I use some other tool? From what I'm reading online, I'm maxed out at 10MB. Any insight would be greatly
        • Prevent new Record Association

          Hello all, We have a small sales organization therefore, it's helpful for everyone on the sales team to be able to view the full list of accounts to assist in preventing duplicate accounts from being created. However we want to prevent people from creating
        • Add the same FROM email to multiple department

          Hi, We have several agents who work with multiple departments and we'd like to be able to select their names on the FROM field (sender), but apparently it's not possible to add a FROM address to multiple departments. Is there any way around this? Thanks. Jordanne
        • Unified customer portal login

          As I'm a Zoho One subscriber I can provide my customers with portal access to many of the Zoho apps. However, the customer must have a separate login for each app, which may be difficult for them to manage and frustrating as all they understand is that
        • Can I export to PDF in Zoho Learn

          I have seen help pages where export to pdf options are available but I do not see that option available from the application. I see that exprt is available in my free trial version but that is only to html pages. I need to be able to export my manuals
        • Zoho Analytics & SQL Server - Live connect

          Below are the steps I did Created a fresh database and table in my own virtual server Created a new data source connection with live connect I was able to select the tables and created the data source successfully I am getting the error when I try to
        • Zoho Sites "pages" management page

          I have 80 plus pages on zoho sites. When I go to the "pages" link to view and edit pages, They are not in any kind of order, so I spend lots of time searching for pages when I need to edit or create new. How can I change the view order of all my pages
        • Staff rules

          Hi! Do you people know what are the default staff rules when a new booking is created? We have two staff members in my team (me as the admin, and my employee). As we share the same services, I'm wondering how Zoho will pick the staff for new apointments.
        • 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
        • New Field in CRM Product Module Not Visible in Zoho Creator for Mapping

          I created a new single-line field in the Products module in Zoho CRM. Zoho CRM and Zoho Creator are integrated, but the newly created field in CRM is not visible in Zoho Creator when I try to map fields.
        • Merge Tags Output Incorrect Placeholder Text After CRM Sync

          Hi everyone, I’m experiencing an issue with merge tags in Zoho Campaigns after last sync of contacts and leads from Zoho CRM (days before everything worked perfectly). Here’s the situation (seems like a default configuration in Campaigns) : My leads have
        • UI Improvement - Ability to Collapse Flow

          The UI for Flow is generally pretty good. However, when multiple decision trees are used, the layout can get pretty convoluted and hard-to-follow (see one of my Flows below): In these cases, even the auto-arrange fails to make this something that a normal
        • Windows agent 2025_M02 release notes

          Agent Version: 111.0.3.300 Release date: 24 February, 2025 Various Major enhancements to improve overall performance and optimize the user experience. Squashed a few bugs to improve overall product quality.
        • Windows agent 2025_M01 release notes

          Agent Version: 111.0.3.299 Release date: 05 February, 2025 Major Enhancement: Live Monitor feature compatibility released. Major Enhancement: Updated Scaling for multi technician cases with Android and Web based viewers. Various other bug fixes and performance
        • Disable Buttons for Users with Profiles without permission

          Hey, I've noticed that users without permission of setting up things in the marketplace, can still see the icon: On a click, you see this: It would be way better, if they couldn't see this menu icon at all. (Aside from the fact that it completely misplaced
        • how to record deferred revenue?

          Dear Zoho Team, We issue invoices relating to 12-month web hosting service. When we issue the invoice, we should record the entire amount of the invoice as DEFERRED REVENUE (ie. $10 x 12 mths = $120, balance sheet item). After the particular month of the hosting service, $10 of revenue has been earned and deferred revenue amount will be $110. We must keep adjusting the balance sheet and income statement over the course of the service until the company has fulfilled its obligation of services and
        • Narrative 13: Importing your data

          Behind the scenes of a successful ticketing system: BTS Series Narrative 13: Importing your data When importing data into an application, it is crucial to prevent data loss or duplication. These types of errors can hinder the development of a clean and
        • Blueprint Not Triggering When Lead Status Is Updated by Workflow (IndiaMART Integration)

          I have set up a blueprint that triggers when a lead’s status is “New Lead.” Our CRM is integrated with IndiaMART, and when leads are created from IndiaMART, their Lead Status is initially set to None. To handle this, I created a workflow that automatically
        • Update Subform in specific field(Status) without affecting other fields in Zoho CRM using Deluge?

          Scenario: PRODUCT Module(change name Plot) in any product status change From Available to Booked then on PROJECT Custom Module have Subform So, Subform name is Property Details now in that Subform 1 field is STATUS that update according to  product status
        • Experience effortless record management in CRM For Everyone with the all-new Grid View!

          Hello Everyone, Hope you are well! As part of our ongoing series of feature announcements for Zoho CRM For Everyone, we’re excited to bring you another type of module view : Grid View. In addition to Kanban view, List view, Canvas view, Chart view and
        • YouTube Live #2: Agreement Intelligence with Zoho Sign's eSign AI assistant

          Hi there, We're back again with our YouTube live series and this time, we'll take you through our holistic agreement intelligence powered signature workflows. Struggling to draft an agreement? Need help double-checking clauses and going through complicated
        • Can I Build a POS using ZOHO creator and integrate it with ZOHO Books?

          Hello,  I have a Zoho Books account and I was wondering if I can have a POS system that integrates with it. Primarily with Inventory, Customers and Payment and ofcourse Create invoices and credit notes.   So, would Zoho creator provide me with this solution?  Thank you, 
        • An important update for Zoho Cliq desktop users

          The latest version of the Zoho Cliq desktop app (v1.8.0) will no longer be supported on macOS 10.15 Catalina and earlier versions. This is because the framework we use (Electron) no longer supports some older macOS versions. If you’re using macOS 10.15
        • Zoho Projects - Visual improvement to parent and sub-task relationship

          Hi Projects Team, My feature request is to improve sub-task visibility. Please see screenshot below. I really think parent child relationships could be visually improved. Even if the first letter of the parent task was inline with other same level tasks
        • Exported Slide Image Lacks Portion of the Background Image

          This does not always happen, but when I export (or "download") the rendered image of a slide, it sometimes lacks a portion of the background image. I created a sample slide deck to demonstrate it and shared it with the admins. It is also publicly available
        • Items Below Reorder Point Report?

          Is there a way to run a report of Items that are below the Reorder Point? I don't see this as a specific report, nor can I figure out how to customize any of the other stock reports to give me this information. Please tell me I'm missing something s
        • New Toolbar in Zoho Sheet

          We have revamped our toolbar design in this new version of Zoho Sheet. Below are some screenshots to help you get accustomed to this new interface. Click on the picture below to view the animated image in its original size. Scroll down this post to learn about the changes. Highlight of Changes: The previous format tab is now split into 2 tabs - Home and Format. The Home tab contains the commonly used functions and the Format tab holds formatting related options. Under the Home tab towards the far
        • Zoho Projects - Task Owner filter at Project level

          Hi Projects Team, The feature requests I would like to raise is the ability to create a custom view at the project level for projects with tasks owned by a user or users. For example "Ashley's Projects" custom view might contain a list of project in which
        • Next Page