Zoho FSM | Notify Changes in Work Order Status

Notify Changes in Work Order Status

Usecase: Notify the customer by email each time the status of the work order changes. Also, notify the customer when the payment has been done for the work order.
 
Follow the steps below to implement this use case:

Step 1: Create a custom function  

Create a custom function in Zoho FSM to notify the customer by email of the work order status.
  1. Navigate to Setup > Automation > Functions and click Create Function.
  2. Enter the following details and click Save:
    1. Function Name: NotifyCustomerAboutWOStatus
    2. Module: Work Orders
    3. In the Deluge Script Editor, enter the following script:

      /*----------------------------------------
      Fetching work order information
      ------------------------------------------*/
      work_order_id = work_order.get("id");
      Status = work_order.get("Status");
      work_order_resp = zoho.fsm.getRecordById("Work_Orders",work_order_id);
      work_order_data = work_order_resp.get("data").toMap();
      woName = work_order_data.get("Name");
      Billing_Status = work_order_data.get("Billing_Status");
      Grand_Total = work_order_data.get("Grand_Total");
      Summary = work_order_data.get("Summary");
      Email = work_order_data.get("Email");
      /*----------------------------------------
      Fetching Contact information
      ------------------------------------------*/
      ContactId = work_order_data.get("Contact").toMap().get("id");
      ContactName = work_order_data.get("Contact").toMap().get("name");
      contactResp = zoho.fsm.getRecordById("Contacts",ContactId);
      contactData = contactResp.get("data").toMap();
      Mobile = contactData.get("Mobile");
      /*----------------------------------------
      Fetching Company information
      ------------------------------------------*/
      company_name = organization.get("company_name");
      /*----------------------------------------
      Constructing message
      ------------------------------------------*/
      if(Status == "Completed")
      {
       message = "Write your Custom message for completed status";
      }
      if(Status == "New")
      {
       message = "Write your Custom message for new status";
      }
      if(Status == "In Progress")
      {
       message = "Write your Custom message for in progress status";
      }
      if(Status == "Cannot Complete")
      {
       message = "Write your Custom message for cannot complete status";
      }
      if(Status == "Scheduled Appointment")
      {
       message = "Write your Custom message for scheduled appointment status";
      }
      if(Status == "Cancelled")
      {
       message = "Write your Custom message for cancelled status";
      }
      if(Status == "Closed" && Billing_Status == "Paid")
      {
       message = "Dear " + ContactName + ", Thank you for trusting " + company_name + " and giving us an oppurtunity to help you with " + Summary + ". We have received your payment of $" + Grand_Total + ". We are looking forward to serve you again in future. Thank you";
      }
      if(Status == "Dispatched")
      {
       message = "Write your Custom message for dispatched status";
      }
      /*----------------------------------------
      Code to send Email
      ------------------------------------------*/
      sendmail
      [
       from :zoho.adminuserid
       to :Email
       subject :"Status of " + woName + " changed"
       message :message
      ]
      info "Email sent";

Step 2: Create a workflow rule  

Create a workflow rule in Zoho FSM to notify the customer by email each time the status of the work order changes. Also, notify the customer when the payment has been done for the work order.
  1. Go to Setup > Automation > Workflow Rules and click Create Workflow.
  2. Enter the following details, then click Next:
    1. Module: Work Orders
    2. Rule Name: Notify User about WO Status



  3. Select the rule trigger as Created or Edited and click Next.



  4. Select the rule criteria as To all Work Orders. Click Next.



  5. Click +Action and select Function.



  6. Select Existing Functions and click Next.



  7. Select the custom function created in the previous step.



  8. Click Save.

Testing the usecase  

Create a Work Order. Whenever the status of the work order changes, then the contact will be notified by email.

    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION










                                    You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                        Manage your brands on social media

                                          Zoho Desk Resources

                                          • Desk Community Learning Series


                                          • Digest


                                          • Functions


                                          • Meetups


                                          • Kbase


                                          • Resources


                                          • Glossary


                                          • Desk Marketplace


                                          • MVP Corner


                                          • Word of the Day


                                            Zoho Marketing Automation

                                              Zoho Sheet Resources

                                               

                                                  Zoho Forms Resources


                                                    Secure your business
                                                    communication with Zoho Mail


                                                    Mail on the move with
                                                    Zoho Mail mobile application

                                                      Stay on top of your schedule
                                                      at all times


                                                      Carry your calendar with you
                                                      Anytime, anywhere




                                                            Zoho Sign Resources

                                                              Sign, Paperless!

                                                              Sign and send business documents on the go!

                                                              Get Started Now




                                                                      Zoho TeamInbox Resources



                                                                              Zoho DataPrep Resources



                                                                                Zoho DataPrep Demo

                                                                                Get a personalized demo or POC

                                                                                REGISTER NOW


                                                                                  Design. Discuss. Deliver.

                                                                                  Create visually engaging stories with Zoho Show.

                                                                                  Get Started Now









                                                                                                      • Related Articles

                                                                                                      • Work Orders

                                                                                                        Create Work Orders A work order is a record created for executing a contact service request. Permission Required: Work Orders A Work Order can be created in one of the following ways: From Requests: Use the Convert to Work Order option to create a ...
                                                                                                      • Revert Status of Records

                                                                                                        You can revert the status of cancelled or terminated work orders and service appointment records back to their previous state. You can also revert a completed service appointment. Permission Required: Revert To revert the status of a record: Click ...
                                                                                                      • Calculate Work Order Profit

                                                                                                        Use case: Calculate the profit earned for a work order. Profit = Grand Total of the work order - Total cost price of the work order where, Total cost price of the work order = Total cost price of the services used + Total cost price of the parts used ...
                                                                                                      • Create an Expense record for a Work Order

                                                                                                        Use case: In a work order, if the user adds service line items to record expenses, then create an Expense record in Zoho Expense for an amount equivalent to the sum of all such service Line Item Amount. A service called Expense will be used for this ...
                                                                                                      • Create a Work Order in Zoho FSM from a Sales Order in Zoho Books

                                                                                                        Use case: Whenever a Sales Order is created in Zoho Books, create a Work Order for it in Zoho FSM. 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 ...
                                                                                                        Wherever you are is as good as
                                                                                                        your workplace

                                                                                                          Resources

                                                                                                          Videos

                                                                                                          Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                          eBooks

                                                                                                          Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                          Webinars

                                                                                                          Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                          CRM Tips

                                                                                                          Make the most of Zoho CRM with these useful tips.



                                                                                                            Zoho Show Resources