Tip #11 : Calculate sales commission in Zoho Creator using Webhook
Hello everyone,
We've been sharing a tip every week to share specific business scenarios which can be implemented for your subscription business. Last week, we shared a tip about
the way to customize your checkout page for your billing needs. This week we will be looking at
how you can calculate sales commissions in Zoho Creator using Webhooks.
Business Scenario:
Majority of subscription businesses will have a dedicated sales team that works with the customers to find their needs, create solutions and thereby ensuring a smooth sales process. The main purpose of the sales representatives is to find new leads using business directories, client referrals, etc. Sometimes, sales representatives will work on following up with existing clients about payments, bringing back the clients who have left the business, etc. Hence, sales representatives have an important role in business which is to bring in new customers all while retaining the existing ones.
The sales representatives usually work for a commission based salary. To put it simpler, the more income they bring into business, the more commission they get. So, businesses might have to record, calculate and maintain the record of the sales per representative to calculate the commission and the bonus.
Let's consider the following scenario to understand this better. Zylker Comics is a subscription business that sells comic books on a renewal basis. They have a dedicated sales team to help them bring in new customers and to also follow up on the existing one regarding the payment. The sales representative gets 3.5% of the total subscription amount as a commission. The Head of the Sales Department at Zylker Comics wants to record the details of the customer, salesperson and the sales commission in a form as soon as an invoice has been raised for the subscription. Maintaining the sales done per representative help them to analyze and understand the data easily.
Now, let us see how we can maintain a separate record for sales person and commissions by integrating Zoho Subscriptions with Zoho Creator.
Pre-requisites:
- An account in Zoho Creator.
- Permissions to access Zoho Creator API.
Procedure:
- Create a Sales commission app in Zoho Creator. (Refer Zoho Creator tutorial on Creating Apps).
- Configure Webhooks in Zoho Subscriptions. (Refer the help documentation to know about webhooks).
- Test your Webhook integration.
Step 1 : Create Sales Commission app in Zoho Creator
In Zoho Creator, create a Sales Commission application with the following fields
- Sales Person
- Contact Name
- Invoice Date
- Invoice Amount
Note: Enter "(0.035 * Invoice_Amount)" as the syntax for the formula to calculate the sales commission.
Step 2 : Configure Webhook
Configure the Webhook in Zoho Subscriptions by navigation to Settings > Automation > Webhooks. While setting up a webhook, specify the following details;
- Module and Event:
Module - Invoice
Predefined Event - Invoice Created - URL To notify:
https://creator.zoho.com/api/<owner_name>/json/<application_name>/form/<form_name>/record/add
where;
<owner_name> - You can view the owner name in the URL bar of your browser. For example, <https://creator.zoho.com/<owner_name>/<application_name>/...> to obtain it.
<application_name> and <form_name> - These are link names for your application form and you can find it here. - Method: POST
- Parameters:
i) authtoken - Specify authtoken from your creator account. Refer this documentation for more details.
ii) scope - creatorapi
iii) All the Field Link Name in Zoho Creator App should be mapped to the corresponding placeholders. Please refer the below image for better understanding.

Also ensure that the date format is the same in Zoho Creator and Zoho Subscriptions. Save the Webhook.
Step 3 : Test the Webhook Integration:
Test your workflow by creating a new Invoice. Make sure that the Sales Person, Contact Name, Invoice Date and Invoice Amount fields are filled with correct information.
Therefore, whenever an invoice is created, a workflow will be triggered which will calculate the sales commission and have it saved in a form in Zoho Creator.
Found this useful? Try it out for your subscription business and let us know. If you have any queries, please feel free to comment them below. We are here to answer them.
Regards,
Sasidaran K,
The Zoho Subscriptions Team.