Back to Automation

Webhooks Examples

Purpose: Calculate Sales Commission

Calculate Sales Commission in Zoho Creator App upon creating a new invoice in Zoho Books.

Scenario:

Homes4Us is a company that helps people find homes for buying real estate. They have a dedicated sales team to handle multiple customers at a time. The sales person gets paid 3.5% of the property value as a commission. Donald, the Head of Sales at Homes4Us wishes to automatically enter the details of the customer, sales person and the sales commission in a form as soon as an invoice has been raised for their services.

Pre-requisites:

Procedure:

Step 1: Create Sales Commission App in Zoho Creator

In Zoho Creator, create a Sales Commission application with the following fields,

Note:Enter “(0.035 * Invoice_Amount)” as the syntax for the formula to calculate the sales commission.

Creator Form Setup

Step 2: Configure Webhook

Webhooks Setup Creator

While setting up the webhook, specify the following details:

URL to Notify: https://creator.zoho.com/api/xml/write

Method: POST

Custom Parameters:

User Defined Parameters:

Select the following Fields from the Invoice and Contacts module while setting up user-defined parameters:

XMLString
<ZohoCreator><applicationlist><application name="sales-commission"><formlist>
<form name="Commissions">
<add>
<field name="Sales_Person">
<value>${INVOICE.SALES_PERSON}</value>
</field>
<field name="Contact_Name">
<value>${INVOICE.CONTACT_NAME}</value>
</field>
<field name="Invoice_Date">
<value>${INVOICE.INVOICE_DATE}</value>
</field>
<field name="Invoice_Amount">
<value>${INVOICE.INVOICE_TOTAL}</value>
</field>
</add>
</form>
</formlist>
</application>
</applicationlist>
</ZohoCreator>

Note:

Step 3: Setup Workflow Rule

Follow the steps below to create a Workflow Rule,

Webhooks Creator Workflow

Webhooks Creator Action

Finally, click on Save to save the Workflow Rule.

Step 4: Test your workflow

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

P.S: You can improve upon this functionality by automatically creating an expense towards sales commission in your Zoho Books account. Depending on the needs of the organization, you can either create an expense towards ‘Sales Commission’ every time an invoice is created. You could also set up a Custom Schedule for your form, which will, say, calculate the Grand Total of the Sales Commission for one Sales Person and create an expense by for the same in Zoho Books. Click here to know more about how to create records in Zoho Books using Zoho Creator.


Purpose: Send a ‘Thank You’ and Order Confirmation SMS to customers

Send a ‘Thank You’ and Order Confirmation SMS to the customers upon creating a new invoice in Zoho Books.

Scenario:

Intelly Inc. is a company that makes customized coffee mugs, T-Shirts, umbrellas and various gift items. Customers can browse the website and place an order on their website and can pay for their purchase upon delivery of their product. Tony, one of the person handling orders creates an invoice as soon as he receives an order. Once the invoice has been created, an SMS goes out to the customer thanking them for the order along with a reference number.

Pre-requisites:

Procedure:

Step 1: Create an account in SMS gateway service

Create an account with an SMS gateway service of your choice. Selecting an SMS gateway may depend on a lot of factors including country, time zone, cost etc.

Once you create the account with the SMS gateway, provide the following details to configure the webhook,

You can purchase SMS credits and get the API details from the SMS provider.

Step 2: Configure webhook in Zoho Books

Configure SMS Webhook

While setting up the webhook, specify the following details,

URL to Notify: http://api.smsgateway.com/http/sendmsg

Method: POST

Custom Parameters:

Select the following Fields while setting up user-defined parameters

User Defined Parameters:

Under the Entity Parameters section, select Append Selected Parameters; Enter the parameter name and select Mobile Phone after selecting Contacts from the drop-down. Click on the check-box Add User defined Parameters, enter the Parameter Name(This field may vary depending on the service provider). Enter the message in the space provided and finally click Save.

Note: The code may vary based on the parameters required by the service provider.

Step 3: Setup Workflow Rule

Follow the steps below to create a Workflow Rule,

Webhooks Creator Workflow

SMS Webhook WhenTrigger

Finally, click on Save to save the Workflow Rule.

Step 4: Test your workflow

Test your workflow by creating a new invoice. Make sure that the Contact Name, Phone Number , Invoice Date and Invoice Amount fields are filled with correct information. Therefore, when an invoice is created, a workflow will be triggered to send an SMS thanking the customer and confirming the order.


Purpose: Creating a Potential in Zoho CRM upon raising a quote

A Potential must be created for a contact in Zoho CRM when a quote is raised for him/her in Zoho Books.

Scenario:

Jonathan runs a company, ‘Connect-O’ that supplies computers and computer peripherals in large numbers to multinational corporations. One such organization has requested a quote for 50 high-end computers and 25 wireless printers. Jonathan uses Zoho CRM to manage customer data and engage with them while he uses Zoho Books to take care of his finances. He wishes to automatically create a potential in Zoho CRM as soon as a quote is raised in Zoho Books.

Pre-requisites:

Procedure:

Step 1: Configure Webhook

Webhooks Setup Creator

While setting up the webhook, specify the following details:

URL to Notify: https://crm.zoho.com/crm/private/xml/Potentials/insertRecords

Method: POST

Custom Parameters:

User Defined Parameters:

Specify the following fields from Zoho Books and Zoho CRM while setting up user-defined parameters:

Zoho Books:

Zoho CRM:

<Potentials>
     <row no="1">
        <FL val="Potential Name">${QUOTE.QUOTE_NUMBER}</FL>
       <FL val="Account Name">${QUOTE.CONTACT_NAME}</FL>
       <FL val="Closing Date">${QUOTE.EXPIRY_DATE}</FL>
       <FL val="Amount">${QUOTE.TOTAL}</FL>
       <FL val="Stage">Needs Analysis</FL>
    </row>
</Potentials>

Note:

Step 2: Create a Quote

Click here to learn how to create and send a quote in Zoho Books.

Step 3: Setup Workflow Rule

Follow the steps below to create a Workflow Rule,

Webhooks Creator Workflow

Webhooks Creator Action

Finally, click on Save to save the Workflow Rule.

Step 4: Test your workflow

Test your workflow by creating a new quote. Make sure that the Zoho Books and Zoho CRM fields are filled with correct information.

Therefore, when a quote is created, a workflow will be triggered to create a Potential in Zoho CRM.


Was this document helpful?
Yes
No
Thank you for your feedback!
Want a feature?
Suggest
Switch to smart accounting software. Switch to Zoho Books.   Start my free 14-day trial Explore Demo Account

Books

Online accounting software
for small businesses.