## Zoho Billing - Product, solutions, integrations, support, and resources Index Access the complete documentation index at: https://www.zoho.com/ae/billing/llms.txt Use this file to discover all available documentation pages before proceeding. # Automation Automation allows you to create a set of rules for modules of Zoho Billing based on which appropriate actions would be performed. A good example would be the case where a congratulatory e-mail is sent automatically to the team members when a quote for goods worth over $1000 gets accepted by a client. In the next few steps, you will be learning about: * Creating and describing a Workflow. * Deciding on when to execute a workflow. * Setting the conditions for executing a workflow. * Associating actions such as email alerts, and webhooks with a workflow. * Connecting to an external web service provider using Webhooks. ## Workflow Scenarios Workflows can come in handy if you wish to get things done automatically in Zoho Billing. Following are some of the scenarios where workflows come into play. **Note:** Workflow actions including email alerts, webhooks and custom functions, that are configured based on customer creation events will not be triggered for new customers who sign up via the hosted payment pages, or customers created along with subscriptions via API. * [Scenarios for Email Alerts](/ae/billing/help/settings/automation.html#email-alerts) * [Scenarios for Webhooks](/ae/billing/help/settings/automation.html#web-hooks) * [Scenarios for Custom Functions](/ae/billing/help/settings/automation.html#custom-functions) * [Scenarios for In-App Notifications](/ae/billing/help/settings/automation.html#in-app-notifications) ### Scenarios for Email Alerts **Scenario 1** Dillion Inc. is a garment export company. The VP of sales wants to receive email alerts when an employee raises a quote for an amount greater than $10,000 for one of their top customers. This will help them offer their best services. In that case, a workflow can be designed to automatically trigger email alerts when the following conditions are met. **Execute When**: Created **Rule Criteria**: Total amount due is greater than $10,000. **Immediate Action**: Email alert to the VP of the Sales/ Finance team. **Time Based Action**: —- * * * **Scenario 2** Whenever a new lead fills out an inquiry form regarding home or office security solutions, Greg wants to ensure they receive a warm welcome email instantly. **Execute When**: Created **Rule Criteria**: When Contact Type is Lead **Immediate Action**: Send an Email Alert containing a welcome message, company introduction, and links to book a consultation. **Time-Based Action**: ——– * * * **Scenario 3** Joseph, the CTO of Bookworm.com, an online bookstore wants to implement a system wherein an alert message should be triggered to the packing section, upon raising an invoice for an order placed by the customer. The Email Alerts feature allows him to accomplish this by creating a workflow rule with the following parameters. **Execute When**: Created or Edited **Rule Criteria**: Contact Name is XYZ **Immediate Action**: —– **Time Based Action**: Email alert to the packing section upon raising an invoice. * * * * * * ### Scenarios for Webhooks **Scenario 1**: Greg is the Public Relations manager for a Home & Office Security company. A first time customer had asked for a quotation for setting up security systems for his office in Boston. Greg wants to make a good impression by promptly sending a ‘Thank You’ SMS as soon as he accepts the quote. The webhooks feature in automation can do that by setting the following parameters and connecting to a SMS gateway. **Execute When**: Created or Edited **Rule Criteria**: When Contact Name is “XYZ” and Contact Type is “Customer”. **Immediate Action**: SMS alert using a webhook with SMS gateway. **Time Based Action**: — * * * **Scenario 2**: Frank is the financial controller of a Stock Brokerage firm. Most of the company’s revenue is credited into the company’s official Stripe account. He wants to be notified of any high value deposits or withdrawals towards invoices or expenses from that account via Email or SMS, on a weekly basis. He can achieve that by setting up a webhook using the following parameters. **Execute When**: Created or Edited **Rule Criteria**: When Total Amount>=$10,000 **Immediate Action**: — **Time Based Action**: Trigger Email Alert 7 days after Rule Trigger Date * * * ### Scenarios for Custom Functions **Scenario 1**: **Applying a 10% discount if your invoice total exceeds $2500** Sarah runs a supermarket and she wishes to provide discounts to celebrate her store’s 10th Anniversary. She decides to give a 10% discount for anybody who makes a purchase for $2500 or more. It would be a painful task to include discount everytime she creates an invoice. With the help of custom functions, she can write a small piece of code to execute this action. Sarah can set a condition where if the total of the invoice exceeds $2500, the function will be executed and a 10% discount will be applied. Now, let’s look at how the custom function would look for this scenario. **Custom function name:** Discount **Description:** Apply a 10% discount when the invoice total exceeds $2500 **Module:** Invoice **Script:** ``` //create a variable and get invoice total total = invoice.get("total").toDecimal(); orgID = organization.get("organization_id").toString(); invoiceID = invoice.get("invoice_id").toLong(); //set a condition: when invoice amount is >= 2500 if ( total >= 2500.00 ) { adjustment = invoice.get("adjustment").toDecimal(); adjustment = adjustment - total * 0.10; jsonMap = Map(); jsonMap.put("adjustment", adjustment); jsonMap.put("reason", "discount"); // To update the current record result = zoho.invoice.update("invoices", orgID, invoiceID, jsonMap); info result.toMap().get("message") ; } ``` She then creates a workflow rule with the following parameters. **Workflow Rule Name:** Anniversary discount **Module:** Invoice **Workflow type:** Event based **When an invoice is:** Created **Triggers:** When total >= 2500 **Actions:** Custom functions - Discount Now, when the invoice total is greater than or equal to $2500, the workflow will be triggered and the custom function will be executed. * * * **Scenario 2**: **Adding a 5% latefee when an invoice becomes overdue** Dennis runs a self-storage facility in Manhattan where customers can store anything in a box, small enough to safely store documents and, big enough to store an expensive car. He charges his customers the option to pay on a daily, weekly, monthly or even a yearly basis. He offers them a 10-day grace period from the invoice date to make the payment after which, he charges an additional 5% of the invoiced amount as late fees. Using Zoho Billing, he writes a small code using Custom Functions to automatically calculate the late fees and add it as adjustments in the invoices when the invoices become Overdue. Now, let’s look at how the custom function would look for this scenario. **Custom function name:** Latefee **Description:** Apply a 5% late fees on the invoice amount **Module:** Invoice **Script:** ``` //create a variable to get invoice total and add a 5% discount latefee = invoice.get("total").toDecimal() * 0.05; orgID = organization.get("organization_id").toString(); invoiceID = invoice.get("invoice_id").toLong(); //display the value stored in the latefee variable info latefee; //add late fee and adjustment and store the total amount in the variable 'adjustment' adjustment = invoice.get("adjustment").toDecimal() + latefee; jsonMap = Map(); jsonMap.put("adjustment",adjustment); jsonMap.put("reason","Late fee"); // To update the current record result = zoho.invoice.update("invoices",orgID,invoiceID,jsonMap); info result.toMap().get("message"); ``` He then creates a workflow rule with the following parameters. **Workflow Rule Name:** Late fee **Module:** Invoice **Workflow type:** Date based **Date of Execution:** 0 day(s) after Due Date **Execution time:** Enter the time of execution **Execution cycle:** Once **Triggers:** When > Status > isn’t > Paid > AND > Status > isn’t > Partially Paid **Actions:** Custom functions - Latefee Now, when the invoice due date exceeds the set date (in the workflow rule), the workflow will be triggered and the custom function will be executed. * * * **Scenario 3**: **Provide discount if payment for the invoice is made before the due date** Donna runs a design firm that creates promotional materials for websites on a monthly basis. This involves designing brochures, banner ads, and other promotional materials. Donna sends invoices at the end of each month and often receives payment only after the credit period, which is 30 days. To receive funds immediately, she decides to offer a discount if the invoice amount was paid before the invoice due date. In order to implement this, she adds a discount of 5% to her invoices and in the customer notes section she mentions that the discount would be applicable only if the payment is made before the due date. To make this work, Donna writes the following custom function. ``` //if payment for the invoice is received after the invoice due date then discount won't be applied orgID = organization.get("organization_id").toString(); invoiceID = invoice.get("invoice_id").toLong(); jsonMap = Map(); jsonMap.put("discount", 0); jsonMap.put("reason", "reached due date."); result = zoho.invoice.update("invoices", orgID, invoiceID, jsonMap); info result.toMap().get("message") ; ``` Once done, she creates a workflow to execute ths custom function. The parameters of the workflow rule is mentioned below: **Workflow rule name:** Discount for early payment **Module:** Invoice **Workflow type:** Date based **Date of Execution:** 0 day(s) after **Due Date** **Execution time:** Enter the time of execution **Execution cycle:** Once **Trigger:** When > Status > isn’t > Paid **Actions** **Type:** Custom function and **Name:** Name of your custom function So, if an invoice reaches the due date, the workflow will be triggered and the custom function will add 0% discount instead of the actual 5% * * * **Scenario 4**: **Automatically set due date for an invoice as 30 days before the event date (that is entered via a custom field)** Tom is a creative wedding photographer. His client book for his services 2-3 months prior to the wedding date (event date.) And, Tom would confirm the date only if the client pays the full amount 30 days before the wedding date. In order to streamline this process, Jake, one of the members of Tom’s studio writes a small custom function. To start with, Jake creates a custom field named “Wedding Date” with the **date** datatype and writes the following custom function ``` orgID = organization.get("organization_id").toString(); invoiceID = invoice.get("invoice_id").toLong(); customFieldList = invoice.get("custom_fields").toList(); cfDate = null; for each customField in customFieldList { customFieldMap = customField.toMap(); if(customFieldMap.get("label") == "Date") { cfDate = customFieldMap.get("value"); break; } } duedate = cfDate.toTime().subMonth(1); info duedate; duedate = duedate.year() + "-" + text(duedate.month(),"00") + "-" + text(duedate.day(),"00"); jsonMap = Map(); jsonMap.put("due_date", duedate); jsonMap.put("reason", "Auto due date."); result = zoho.invoice.update("invoices", orgID, invoiceID, jsonMap); info result.toMap().get("message"); ``` After creating the custom function, Jake creates a workflow rule to trigger it. The parameters of the workflow rule are as follows: **Workflow name:** Payment 30 days before the wedding **Module:** Invoice **Workflow type:** Event based **When invoice is:** Created **Actions** **Type:** Custom function and **Name:** Name of your custom function While creating an invoice, if Tom mentions the wedding date in the custom field, the workflow will be triggered and the custom function will set the due date of the invoice to 30 days before the wedding date. * * * **Scenario 5**: **Automatically cancel an quote if its not accepted within 10 days from the date of creation.** Katherine owns a company that supplies automotive spare parts to several automobile service stations. Several customers ask her for a quote, but a portion of them fail to communicate their decision by neither accepting nor rejecting the quote. To avoid this, Katherine decides to decline the quote if she doesn’t hear back from the client within 10 days from the receipt of the quote. To implement this, she writes a custom function ``` //get quote and organization ID quoteid = quote.get("quote_id"); orgid = organization.get("organization_id"); //convert the status of the quote to 'declined' result = invokeUrl [ url: "https://billing.zoho.com/api/v3/quotes/" + quoteid + "/status/declined?organization_id=" + orgid type: POST connection: "billing_api_connection" ]; ``` Now, to trigger the execution of this custom function, she creates a workflow rule with the following parameters. **Workflow Name:** Decline quote after 10 days of receipt **Module:** Quote **Workflow type:** Date Based **Date of Execution:** 10 day(s) after **Created Time** **Execution time:** Enter the time of execution **Execution cycle:** Once **Criteria:** When > Quote Status > is > Sent > AND > Quote Status > is > not approved **Actions** **Type:** Custom function and **Name:** Name of your custom function Now, when the quote exceeds 10 days from its created time, the workflow will be triggered and the custom function will be executed to change the status of the quote to declined. * * * **Scenario 6**: **Extend due date by 7 days if the customer pays 50% of the invoice amount on or before the initial due date** Diane owns a store that supplies printing paper and office stationery for offices in her area. She wants to extend the due date of the invoice by a week if customers pay 50% of the invoice amount on or before the initial due date. In order to do that, she writes the following custom function: ``` //Getting invoice total, balance after the partial payment, and due date inv_total = invoice.get("total").toDecimal(); inv_balance = invoice.get("balance").toDecimal(); inv_duedate = invoice.get("due_date").toDate(); orgid = organization.get("organization_id").toString(); invid = invoice.get("invoice_id").toLong(); //Condition to check if the amount paid is 50% of the invoice amount if(inv_balance == inv_total / 2) { inv_duedate = inv_duedate.addDay(7); inv_duedate = inv_duedate.year() + "-" + text(inv_duedate.month(),"00") + "-" + text(inv_duedate.day(),"00"); //Update the due date by 7 days jsonMap = Map(); jsonMap.put("due_date", inv_duedate); jsonMap.put("reason", "Increased due date"); result = zoho.invoice.update("invoices", orgid, invid, jsonMap); info result.toMap().get("message") ; } ``` Once done, Diane creates a workflow rule to execute the custom function. **Workflow name:** Extend due date **Module:** Invoice **Workflow type:** Event based **When invoice is:** Edited **Execute the workflow** When any field is updated **Just once or Everytime?** Just once **Triggers** When > Status > is > Partially paid **Type:** Custom function and **Name:** Name of your custom function Now, when a customer pays 50% of the invoice amount by the initial due date, a grace period of 7 days will be given for him to pay the balance amount. * * * ### Scenarios for In-App Notifications **Scenario 1**: KYZ shoe company decides to offer freebies to all the customers who purchase from them. The finance team should be notified each time an invoice is paid, so that they can send out the freebies. They created a workflow that would internally notify the finance team whenever an invoice moves to the paid status. * **Execute When:** Created or Edited * **Rule Criteria:** Status changes to Paid * **Immediate Action:** In-app notification to the Finance team. * **Time Based Action:** — **Scenario 2**: Peter is the head of ABC organization. Whenever a credit note is raised, Peter would like to notify the head of the production department. This will help the production team to work on their shortcomings and improve their service. For this, they will need to create a workflow to notify the production department. * **Execute When**: Created * **Rule Criteria**: —- * **Immediate Action**: Notification to the Production Team’s Head. * **Time Based Action**: — * * * ## Setting Up a New Workflow Rule A workflow rule consists of actions that comprises of emails alerts, , and Webhooks that play an essential role in executing a task. A workflow rule may employ one or more actions to accomplish the task. To set up a workflow rule in Zoho Billing, navigate to _Settings_ > _Automation_ > _Workflow Rules_. * [Name Your Workflow](/ae/billing/help/settings/automation.html#name-your-workflow) * [Choose When To Trigger a Workflow](/ae/billing/help/settings/automation.html#choose-when-to-trigger-a-workflow) * [Workflow Types](/ae/billing/help/settings/automation.html#workflow-type) * [Filter the Triggers](/ae/billing/help/settings/automation.html#filter-the-triggers) * [Actions](/ae/billing/help/settings/automation.html#actions) * [Other Actions](/ae/billing/help/settings/automation.html#other-actions) * [Email Alerts](/ae/billing/help/settings/automation.html#email) ### Name Your Workflow **Field** **Description** **Workflow Rule Name** Give a unique name for the workflow rule. **Module** Select the module for which you wish to create a workflow. **Description** Give a small description for your workflow rule. ### Choose When To Trigger a Workflow You can choose when to trigger the workflow based on the parameters you select in the following fields. ### Workflow Type There are two types of workflows: * Event Based * Date Based **Event Based:** If the workflow is **Event Based**, then the workflow is triggered when a module is: * Created * Edited * Created or Edited * Deleted When a module is **Edited** or **Created or Edited**, additional fields appear. **Field** **Description** **Execute the workflow when** There are 3 options to choose from \-When any field is updated. \-When any selected field is updated. \-When all selected field are updated. If you select **When any selected field is updated** or **When all selected fields are updated** in the drop-down, an additional box will appear where you can select any 3 fields of the module. **Just Once or Overtime?** **Just Once-** The workflow would be executed when the criteria is met for the first time. **Everytime-** The workflow would be executed everytime the criteria is met. **Date Based:** If the workflow is **Date Based**, the following fields appear. **Field** **Description** **Date of Execution** Select the workflow to be triggered on any number of days before or after **Module Date**, **Expiry Date** or **Created Time** from the drop down. **Execution Time** You may choose the exact time of execution by selecting the corresponding **hh** or **mm** of your organisation’s time zone. **Execution Cycle** You may choose the frequency of triggering a workflow by choosing **Once**, **Monthly** or **Yearly** from the drop down. ### Filter the Triggers **Filter the Triggers** section allows you to set one or more conditions based on which the action will be executed. **Field** **Description** **Condition** The filter will be triggered based on the criteria you set. You can also add multiple criteria by clicking on **\+ Add Criteria** based on which the workflow rule will be executed. The condition for the next criteria may be **AND** or **OR** depending on whether you wish to include both or either one of the criteria. Also, you can change the criteria pattern as you want by selecting **Change Criteria**. **Field Attributes** The field is used to select an attribute from the list that broadly covers the terms that are related to the module. **Rules** Select the rules based on which the system should filter the trigger. **Value Field** Enter the value of the attribute for which the filter must be applied. **Editing Criteria Pattern:** You can edit the criteria pattern to suit your requirements by selecting **Change Criteria**. The editor allows you to define a pattern of your choice using simple AND/OR logic. For example, if you wish to trigger the workflow rule **When Quote Number is 1 AND either Quote Status isn’t Invoiced OR Total is equal to 500**, The pattern is **(((1)AND 2) OR 3)**. If you feel the criteria pattern does not match your requirement, you can edit it to be **(1AND (2 OR 3))**. Click **Save** to continue. **Note:** You can have a maximum of 10 criteria for each Workflow Rule. ### Actions Once the rules have been set, the actions to be taken upon encountering the conditions has to be decided. You can customize the actions to suit your business needs and program it to act immediately or at a particular time. **Immediate Actions:** **Field** **Description** **Type** Select one of the three types of actions, \-Email Alerts \-Webhooks You can also add multiple actions by clicking on **+Add New Actions**. **Name** The field should contain the name of the Email Alert, or Webhooks. For example, in the case of an email alert, you can either pick the ones from the list you have already created or you can add a new one by selecting **\+ Add New Email Alert**. Follow the same steps for and Webhooks. **Details** The details of the action is displayed here. **Time Based Actions:** If you wish to schedule actions for a particular time, select the check box next to **Would you like to add time based actions?**. This will display additional fields to enter the desired time. **Field** **Description** **Execution Time** Enter the desired number of days before or after, \-Rule Trigger Date \-Module Date \-Expiry Date \-Created Time \-Modified Time Next, select the type of action that you wish to take. It can be an Email Alert, Field Update or a Webhook. You can also add multiple time based actions by selecting **+Add New Time Based Action**. **Note:** You can add a maximum of 5 time-based actions. Also, each time-based action can have a maximum of 5 actions. Finally, click **Save** to create the workflow rule to implement it for the modules in Zoho Billing. ### Other Actions You can also mark your workflow rules as **Active** or **Inactive**. To do so, hover the cursor and select **Mark as Active** or **Mark as Inactive**. To delete the workflow rule, click the Trash icon. **Edit a workflow rule:** You can edit a workflow rule by simply clicking on one of the workflow rules from the list or by hovering over a workflow rule and select **edit**. **Filter workflow rules:** To filter the workflow rules list, follow these steps: * Navigate to _Settings_ > _Automation_ > _Workflow Rules_. * Under _Module_, select one from the drop down to filter the workflows based on the module for which the workflow has been created. You can also filter workflow rules based on whether they are active or inactive. Based on your selection, the corresponding workflow rules will be displayed as a list. **Note:** You can create a maximum of 10 Workflow Rules for each module. Workflow Rules cannot be applied on invoices that have been imported into Zoho Billing. * * * ### Email Alerts The following steps will explain how to set up an email alert for any module in Zoho Billing. **Creating a New Email Alert:** To set up an email alert: * Go to _Settings_ **\> Automation > Email Alerts** and click on **\+ New Email Alert**. * Complete the following fields in the Email Alert creation page. **Field** **Description** **Name** Give a unique name for the email alert. **Module** Select the module for which you wish to create an email alert. **Email Template** You can pick a template from the drop down or click **\+ Add New Email Template** if you wish to create a new one. **Email Recipients** Pick customers from the drop down, to whom you wish to send the email alerts. **Additional Recipients** If you wish to send out email alerts to more people, enter their email addresses separated by a comma. Please note that you can add a maximum of 10 additional recipients. * Click on **Save** to create a new email alert. You can now select one of the many email alerts created, from the drop down, to notify you when a workflow is triggered. #### Other Actions in Email Alerts **Delete an Email Alert:** To delete an email alert: * Go to _Settings_ **\> Automation > Email Alerts**. * Hover the cursor next to an email alert on the list and click on the **Delete** icon. **Filter Email Alert:** To filter the email alerts list: * Go to _Settings_ **\> Automation > Email Alerts**. * Under **Module**, select a module from the drop down for which the email alert has been created. Based on your selection, the corresponding email alerts will be displayed as a list. **Notes:** You can create a maximum of 5 email alerts for each workflow rule. A maximum of 500 email alerts can be triggered per day. * * * ### Webhooks Webhooks facilitate communication with third-party applications by sending instant web notifications every time an event occurs in Zoho Billing. With Webhooks, you can configure HTTP & HTTPS URLs and associate them with workflow rules to automate the notification process. For general information about webhooks, visit [webhooks.org](http://webhooks.org). #### Create a Webhook To set up a webhook: * Navigate to _Settings_ > _Automation_. * Select **Webhooks**. * Click **\+ New Webhook**. * On the _New Webhook_ page, enter the following details: * Enter a name for the webhook in the **Name** field. * Select the module for which you want to create the webhook from the dropdown next to the **Module** field. * Add a description about the webhook in the **Description** field, if required. * In the **URL & Parameters** field, select the HTTP method and enter the URL of the third-party application. The HTTP methods available in Zoho Billing are listed below: * **Post**: Requests that the data sent must be considered as new. * **Put**: Requests that the data sent should be considered as a modified version of the one already present. * **Delete**: Requests that the data must be deleted. ```
Insight:You can also add additional query parameters by clicking **Add Parameters** and entering the required values in the **Key** and **Value** fields. You can add custom parameters like Auth Token, Security Token, API Key, etc. ``` * Check **I want to secure this webhook** box if you want to secure your webhook. Enter the secret key in the **Secret Token** field. This will help to verify whether the webhook was sent from Zoho Billing. It should be alphanumeric and range between 12-50 characters. ``` Note:You cannot edit or view the secret token later. ``` ``` Note: The secret token will be used to compute a hash value, so, you will have to ensure that the same token is available on your server to compute a similar hash value. ``` * In the Headers section, you can include any additional information that you want to be included in the HTTP request. Click **\+ Add New Headers** if you want to add additional headers. * In the _Authorization Type_ section, choose how you want to authorize the webhook. * **Self-Authorization**: Select this option to set up your webhook by providing the authorization details manually. * **Connections**: Select this option to set up your webhook using a connection. * In the _Body_ section, choose how you want to send the data. You can choose between **Default Payload**, **x-www-form-urlencloded**, and **Raw** body parameters. * **Default Payload**: In the default payload format, all the parameters associated with the module will be sent to the request body in the application/json format content type. * **x-www-form-urlencoded**: In the x-www-urlencoded format, the data will be encoded and sent to the server. * **Raw**: In the raw format, you can choose the parameters sent to the request body. The content type will be application/json. * Click **Save and Execute** to check if the webhook works properly, or click **Save** if you want to execute it later. **Note:** When you set up webhooks, all your customers’ details in your Zoho Billing organization (name, phone number, address, and email address) will be shared with the URL you want to notify. #### Secure Your Webhooks Securing your webhooks can help verify that the webhooks were sent from Zoho Billing. To do this, you have to set up your server so that it listens for webhooks from Zoho Billing. When your server receives a webhook from Zoho Billing, a hash value must be generated based on the payload and your secret token. Once done, check if it matches the hash value from Zoho Billing and thereby validate the source of the webhook. This can add a layer of security by enabling your server to disregard third-party webhooks pretending to originate from Zoho Billing. #### Validate Webhooks When your server receives the webhook, a hash value will have to be generated for the payload in the same way that Zoho Billing generated it. This is necessary to produce the same hash value to validate the webhook. The following parameters (if available) are used to generate the hash value: * Query string parameters. * Default payload or customized raw JSON payload. * x-www-form-urlencoded payload (key-value pairs). Construct a string by sorting the payload’s key-value pairs in alphabetical order. The pairs must be sorted in alphabetical order with respect to their keys. * If your webhook contains **query string parameters**, ensure that those key-value pairs are sorted along with the payload’s key-value pairs. * There cannot be any spaces between the key-value pairs. Once you’ve sorted the key-value pairs and constructed the string, append the raw JSON to the end of the string. **Examples** 1\. **Default Payload** Query string parameters’ key-value pairs: ``` subscription\_id=90343, name=basic ``` Default payload/raw JSON: ``` {"created\_date":"2023-10-11","event\_id":"5675"} ``` The constructed string would be: ``` namebasicsubscription\_id90343{"created\_date":"2023-10-11","event\_id":"5675"} ``` 2\. **x-www-form-urlencoded** Query string parameters’ key-value pairs: ``` customer\_name=Brandon, status=active ``` x-www-form-urlencoded payload’s key-value pairs: ``` addon\_description=Monthly addon, quantity=1 ``` The constructed string would be: ``` addon\_descriptionMonthly addoncustomer\_nameBrandonquantity1statusactive ``` **Pro Tip** * If your payload is in the x-www-form-urlencoded format, the entire string must be decoded before generating the hash value. * If one of the key value pairs contains spaces, the spaces must also be included in the constructed string. The hash value can be computed by applying the HMAC-SHA256 algorithm on this string, along with the secret token that was used in Zoho Billing. You can then validate the webhook by checking if the hash value computed from your side matches the one in the header (X-Zoho-Webhook-Signature) of the webhook from Zoho Billing. ### Configuring SMS Gateways You can set up webhooks to send and receive message alerts through SMS gateways. All you have to do is configure the SMS gateways using the URL and follow the steps provided below. #### Bulk SMS Bulk SMS is a popular SMS Gateway and is compatible with over 800 mobile network providers, worldwide. ``` URL: https