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