Hello everyone,
As discussed previously in this
thread, we are going to come up with a custom function every week to address specific business scenarios. To start off, this week we will be looking into one of the most famous requirements -
30 Days Money Back Guarantee.
Business Scenario:
Most business organizations have cancellation policies and the most common one is the money back guarantee. It is a simple guarantee that if a customer is not satisfied with a product and cancels the subscription within the specified period, he/she will be provided with a refund.
Let's assume that we have to handle the above scenario in Zoho Subscriptions manually. We have to go to that particular subscription, and then check the activation date and the cancellation date to make sure the cancellation is done within 30 days. Then, we can initiate a refund.
This might seem pretty easy if you have to handle refunds for a couple of customers every now and then. However, as the business grows exponentially and quite a handful of customers starts requesting for refunds more frequently, the manual approach will cause a bottleneck. Also, refunding all these payments manually may cause a significant amount of time which can be put into developing your business.
Now, wouldn't it be easier if this entire process could be automated and you could stop worrying about it? This is where the custom functions save your day. With a one-time effort of setting up a custom function, you can completely automate the above scenario.
Logic Explanation:
You can refer the code through this
GitHub link. The code is written in Deluge script, which is easily understandable to non-programmers.
In this code, whenever a subscription is cancelled, we initially check if the cancellation date is within 30days from the activation date. If the subscription is cancelled within 30 days, we then retrieve the details of the last sent Invoice and check for the status of the invoice.
1) If the invoice is already fully paid, we check for the mode of payment. If the invoice is paid online, a credit note is raised for the paid amount and it is refunded. If the invoice is paid offline, we simply raise a credit note for the paid amount.
2) If the invoice is not yet paid and is still overdue, we simply mark that invoice as void.
If an error occurs in any of the API requests, an email will be sent to the admin email address with the request URL and the reason for the error.
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. For example: "Auto refund cancellation".
3. Choose the module as 'Subscriptions' and the Predefined event as 'Cancel Subscription'.
4. Copy the code which was given above.
5. Please paste your authtoken in the authtoken variable. (Refer this
documentation to know how to generate your authtoken)
6. Also, in the dayToConsider variable, replace your own value for the days (within which the amount can be refunded).
7. Save the Custom function and you are good to go.
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.
Recent Topics
RouteIQ for Zoho FSM
Beste, Zou wel top zijn dat we een RouteIQ hebben voor FSM aangezien we constant moeten zien wat de beste route is voor onze monteurs. Nu moeten we een speciale aparte programma hebben om de beste route te berrekenen voor onze monteurs aangezien de planning
Let us view and export the full price books data from CRM
I quote out of CRM, some of my clients have specialised pricing for specific products - therefore we use Price Books to manage these special prices. I can only see the breakdown of the products listed in the price book and the specialised pricing for
Changes to the send mail Deluge task in Zoho CRM
Hello everyone, At Zoho, we continuously enhance our security measures to ensure a safer experience for all users. As part of our ongoing security enhancements, we're making an important update on using the send mail Deluge task in Zoho CRM. What's changing?
How to Invoice Based on Timesheet Hours Logged on a Zoho FSM Work Order
Hi everyone, We’re working on optimizing our invoicing process in Zoho FSM, and we’ve run into a bit of a roadblock. Here’s our goal: We want to invoice based on the actual number of hours logged by our technicians on a job, specifically using the timesheets
Zoho Books | Product updates | January 2026
Hello users, We’ve rolled out new features and enhancements in Zoho Books. From e-filing Form 1099 directly with the IRS to corporation tax support, explore the updates designed to enhance your bookkeeping experience. E-File Form 1099 Directly With the
Inclusion is the new engagement
When in a very challenging situation, you may have peers or friends around you saying, “Everything will be okay.” They speak to you in a way that they are connected or in a language or tone that feels close. But your inner voice comes to you in a truly
DKIM verification for Squarespace website - Corrections to instructions
Zoho Campaigns DKIM TXT record instructions for Squarespace show that Host field should show: 22111._domainkey.[domain name, e.g. mywebsite.com] However, after 72hrs, I had to reach out to Squarespace tech support, and they confirmed that the domain name
Passing the image/file uploaded in form to openai api
I'm trying to use the OpenAI's new vision feature where we can send image through Api. What I want is the user to upload an image in the form and send this image to OpenAI. But I can't access this image properly in deluge script. There are also some constraints
My client requires me to have custom pdf file names to except payment for invoices, how can I customize this before emailing.
Hello! I love the program so far but there are a few things that are standing in the way. I hope you guys can code them in so I can keep the program for years to come. My client requires I customize the pdf file names I send in for billing. Can you please
Disable All
I want to disable all the fields on the form when it loads. I know there is a way to do this by listing all the fields as follows: disable Name; disable Address; disable City; ... I have over 50 fields on my form and i am wondering if there is a single command or way to just disable all fields on load. On load = disable All Thank you for any help.
Migrating my email from GMAIL to ZOHO MAIL..........
I am a long time GMAIL user and I really only understand how they operate, but after reviewing your tutorials and forums online, it is quite unbelievable how much more and how much more streamlined ZOHO mail is, not to mention ZOHO's wonderful, more advanced capabilities. I do have several questions about transitioning over to ZOHO. Primarily, where is the best place to start, what do I do first? And how hard is it actually to move all my business and personal accounts over here? When I sign up
iOS Zoho Mail App Crashesruni
Whenever I trying to search emails via the Zoho Mail app on my iPhone the app crashes, I am running the latest version of the app and the latest iOS version. I have all set reset the app and deleted the app and still have the same issue. Thank you in
Assessment Answered - Automation (Related List)
Hello everyone, We have linked a candidate assessment to our job posting. When someone applies, they are required to answer all the assessment questions. However, some candidates submit their applications without completing the questions. In such cases,
Rebrand your CRM with the all-new custom domain mapping setup
UPDATES TO THIS FEATURE! 19th Jan, 2024 — Custom domain mapping has been made available for portal users in Zoho One and CRM Plus. 23rd June, 2023 — Custom domain mapping has been made available for all users, in all DCs. Hello everyone! We are elated
Paid Support Plans with Automated Billing
We (like many others, I'm sure) are designing or have paid support plans. Our design involves a given number of support hours in each plan. Here are my questions: 1) Are there any plans to add time-based plans in the Zoho Desk Support Plans feature? The
How Does Knowledge Base Search and Article Recommendation Work?
Hello, I would like to understand how the Knowledge Base search engine works. Specifically, does it search based on: The article title only? The full article content? Both, the article and the content? Keywords? Tags? Also, how does the system determine
Can't change form's original name in URL
Hi all, I have been duplicating + editing forms for jobs regarding the same department to maintain formatting + styling. The issue I've not run into is because I've duplicated it from an existing form, the URL doesn't seem to want to update with the new
Calendar report with order options and more quick view templates
I think many of us regularly work with calendar-style reports. It would be great to be able to customize the quick view with new templates and have options to sort the entries for each day of the calendar by different criteria. I think this is an interesting
Shared Views
Hello, is there a way to prevent an agent from changing a shared table view? I have no issues with agents being able to create and customize their own view, but when I create a view and share it to my team -- the expectation is that they are viewing it
Using Zoho answer bot across departments (help center articles from another department)
Hi Zoho Community, I’ve run into a major issue and hope someone here has experience with this setup. We currently have a Help Center in the department A where all of our knowledge base articles are maintained. However, we would like to use a Zoho Answer
Zoho Desk Partners with Microsoft's M365 Copilot for seamless customer service experiences
Hello Zoho Desk users, We are happy to announce that Zoho Desk has partnered with Microsoft's M365 to empower customer service teams with enhanced capabilities and seamless experiences for agents. Microsoft announced their partnership during their keynote
how to avoid duplicate customer
How can i avoid to create a duplicate customer. I charged a same customer with two different plans and it showed up twice in my customer list and subsequently in Zoho books contacts. It creates confusion to have a same customer appears multiple times in customer or contact list. How can i avoid it.
The Social Wall: January 2026
Hello everyone, We’re back with the first edition of The Social Wall of 2026. There’s a lot planned for the year ahead, and we’re starting with a few useful features and improvements released in January to help you get started. Create a GBP in Social
API keys not showing in ZeptoMail dashboard
Hi there, I'm hoping someone can provide some assistance as support isn't replying. I am trying to configure my transactional emails, but the dashboard doesn't show any of my API details - the `div` is there but it's emtpy. Every time I click "Generate
Pipeline: Copying rulesets from one data source to another
When creating and editing data pipelines, it would be really helpful to be able to copy the ruleset from one data source and 'paste' it to another. This would save time and reduce manual mistakes.
Doubt about maximum email reach
Good morning, greetings. This is Bramdon García from EDULABS S.A.S ESP, located in Colombia. I'm writing to inquire about the possibility of sending an email to 35,000 people simultaneously. Our company has a Zoho account, but we'd like to know if there's
Zoho calendar not working in browser
Hello, I am new to Zoho. I have two accounts for two separate businesses. In one of them, calendar loads in a browser no problem. However, if I use this account (sairfeetmusic.co.uk) calendar does not load. I also cannot add it to my Thunderbird Lightening
Authentication Failure when adding POP3 accounts
Hi everyone, I am a new user currently migrating from Gmail to Zoho Mail. I decided to make the switch following Google's decision to discontinue POP3 fetching. I previously used Gmail as my primary mail hub, and Zoho seems like the perfect alternative
Trident Application Folder
Hi, How to choose installation folder for Trident, by default it gets installed in C drive. How to change drive?
Email disappeared to specific contact
Good afternoon, this morning I emailed somebody. This email isn’t showing up in my sent folder. They sent me a response which I clicked on and it disappeared immediately. Why could this be?
How Do Mutliple Sales People Prospect in the "LEADS" module without calling the same leads?
We have 4 sales reps and the Leads module does not have real time intuitive knowlodge to make the sales rteps dont call the same people at the same time. How can we crate a fluent prospecting sytem where the salres reps can go out bound without calling
Create an Eye-Catching Announcement Widget for Your Help Center
Hello Everyone! In this week’s edition, let’s explore how to keep your customers updated with exciting news in the Help Center. See how ZylkerMobile wowed their customers by bringing updates right to their portal. ZylkerMobile, the renowned brand for
Enable Free External Collaboration on Notecards in Zoho Notebook
Hi Zoho Notebook Team, I would like to suggest a feature enhancement regarding external collaboration in Zoho Notebook. Currently, we can share notes with external users, and they are able to view the content without any issue. However, when these external
Updating records through Zoho Sheets View doesn't update timeline or trigger workflow rules
I have noticed that when i update a series of record with the zoho sheets view (see here http://d.pr/i/ahnR) it doesn't update timeline history or trigger workflow rules. I am using it in the Deals module. Looking forward for some more info. Denis
How do I change the account bank charges are charged to?
I want bank charges charged to my Credit Card Fees account. Is there a way to do this?
Mail Search should allow grouping by conversation like Gmail.
Having switched from gmail I have found the search function hard to use. Mostly because mail is not grouped by conversation in search. If I search for a word when looking for a conversation had with someone then sometimes 10 emails will come up from the
Ability to CC on a mass email
Ability to CC someone on a mass email.
Updation of Old Browsers Versions for Zoho CRM
We have upgraded the default browser version for CRM to facilitate features like widgets and scripts that are often implemented aside from advanced functionalities for various business requirements. The latest version is aimed to provide better performance
Project-Based Inventory Consumption and Proforma Invoice in Zoho ERP
While working with customers across different industries, we have identified a few functional questions and gaps that commonly arise—especially for project-based and service-oriented businesses. Many organizations, such as those in shipping, construction,
Zoho Desk domain Mapping not Working Showing CNAME Error
I have created the subdomain and created the Cname as well as its instracted on the Zoho website but when i try add the domain on help desk its showing error msg : Make sure you've mapped the CNAME entry and linked it to desk.cs.zohohost.com.au on your
Next Page