Zoho FSM | Perform actions in Zoho FSM on Quote (Estimate) approval in Zoho Books

Perform actions in Zoho FSM on Quote (Estimate) approval in Zoho Books

Use case: When a Quote (Estimate) is approved in Zoho Books, perform the following in Zoho FSM:
  1. Create a Work Order
  2. Create an Invoice for the Work Order
  3. Send the created Invoice to the customer
Follow the steps below to implement this use case:
Step 1: Create a connection for Zoho FSM in Zoho Books
Step 2: Create a custom function in Zoho Books
Step 3: Create a workflow rule in Zoho Books

Step 1: Create a connection for Zoho FSM in Zoho Books

To create a connection for Zoho FSM that can be used in Zoho Books for invoking the Zoho FSM APIs, do the following:
  1. Log in to Zoho Books.
  2. Navigate to Settings > Developer Data > Connections and click New Connection.



  3. Under the Default Services tab, search for and click Zoho FSM.



  4. Do the following and click Create And Connect:
    Connection Name: Zoho FSM. The Connection Link Name will be automatically populated.
    - Disable Use Credentials Of Login User. If this is disabled, the connection will utilize the credentials of the connection owner.
    - Select the Scope ZohoFSM.modules.all.

  5. Click Connect in the authentication page.



  6. Click Accept in the Authorization page.

In the custom function, where FSM APIs are used via the invokeURL task, use this Connection Link Name.

Additionally ensure that the status of the internal connection for Zoho Books Integration tasks is Connected. The green dot [] indicates that the connection is Connected.


Step 2: Create a custom function in Zoho Books

Create a custom function in Zoho Books to do the following:
  1. Create a Work Order in Zoho FSM for the customer for whom the Quote (Estimate) is created
  2. Create an Invoice for the Work Order
  3. Send the created Invoice to the customer
  1. Navigate to Settings > Automation > Workflow Actions.
  2. Select Custom Functions and click New Custom Function.



  3. Enter the following details and click Save:
    Function Name: ActionsOnEstimateApproval
    Module: Quote (Estimate)
    In the Deluge Script Editor, enter this script.

Step 3: Create a workflow rule in Zoho Books 

Create a workflow to perform the following in Zoho FSM when a Quote (Estimate) is approved in Zoho Books:
  1. Create a Work Order in Zoho FSM for the customer for whom the Quote (Estimate) is created
  2. Create an Invoice for the Work Order
  3. Send the created Invoice to the customer
  1. Navigate to Settings > Automation > Workflow Rules and click New Workflow Rule.



  2. In the New Workflow Rule screen, enter the following details and click Next:
    1. Workflow Rule Name: ActionsOnEstimateApproval
    2. Module: Quote



  3. For Choose when to Trigger, enter the following details and click Next.
    1. Workflow type: Event Based
    2. When Quote is: Created or Edited
    3. Execute the workflow when: When any field is updated



  4. For Filter the triggers, enter the following condition:
    1. When Quote Status is Accepted
    2. Just Once or Everytime?: Just Once



  5. In the Actions section, do the following:
    1. Type: Custom Functions
    2. Name: The function created in the previous step.



  6. Click Save.

Testing the use case

Following are the steps to test the use case discussed.

Create and send Quote (Estimate) from Zoho Books

  1. Navigate to Sales > Quotes and click New.



  2. Enter the necessary details and click Save and Send.
    Ensure that the contact you choose is present in Zoho FSM. A Service Address, Billing Address, and Email should be present for the contact. Since a quote (estimate) in Zoho FSM should have atleast one service, ensure that you add to the quote (estimate) a service that is present in Zoho FSM. If there are no services in your quote (estimate), in Zoho FSM create a dummy service with Unit Price zero, and add it to the quote (estimate).



  3. Click Send.


Approving the Quote (Estimate)

  1. Click Quotes (Estimates) in the left menu and click on the quote (estimate) you want to approve.
  2. Click Mark as Accepted.



    The status of the quote (estimate) changes to Accepted.
A new work order is created in Zoho FSM for the same customer for whom the quote (estimate) was created in Books. An invoice is also created for the work order and sent to the customer.