Zoho FSM | Create Project and Tasks in Zoho Project whenever an Invoice is generated in Zoho FSM

Create Project and Tasks in Zoho Project whenever an Invoice is generated in Zoho FSM

Usecase: Create Project and Tasks in Zoho Project whenever an Invoice is generated for a Work Order in Zoho FSM. The work order should have an associated estimate. The project in Zoho Projects will be created with the name provided in the Project Name field of the estimate. Tasks will be created within the project that correspond to the service and parts line items in the work order.
 
Follow the steps below to implement this usecase:

Step 1: Create a custom field  

Create a custom field Project Name of type Single Line in the Estimates module. Use the value in this field to name the project.
 

Step 2: Create a custom function  

Create a custom function in Zoho FSM to do the following in Zoho Projects:
  1. Create a project in Zoho Projects with the name provided in the Project Name field of Estimates.
  2. Create tasks within the project that correspond to the service and parts line items in the work order.
  1. Navigate to Setup > Automation > Functions and click Create Function.
  2. Enter the following details and click Save:
    1. Function Name: CreateProjectinZProject
    2. Module: Work Orders
    3. In the Deluge Script Editor, enter the following script:

      work_order_id = work_order.get("id");
      work_order_response = zoho.fsm.getRecordById("Work_Orders",work_order_id);
      estimate = work_order_response.get("data").toMap().get("Estimate");
      service_line_items = work_order_response.get("data").toMap().get("Service_Line_Items").toList();
      part_line_items = work_order_response.get("data").toMap().get("Part_Line_Items").toList();
      part_line_item_size = part_line_items.size();
      if(estimate != null)
      {
       estimate_map = estimate.toMap();
       estimate_id = estimate_map.get("id");
       estimate_resp = zoho.fsm.getRecordById("Estimates",estimate_id);
       cf_projet = estimate_resp.get("data").toMap().get("cf_projet__C");
       if(cf_projet != null)
       {
        portal_response = zoho.projects.getPortals();
        portal_name = portal_response.get("portals").toMap().get("name");
        new_project = Map();
        new_project.put("name",cf_projet);
        project_response = zoho.projects.createProject(portal_name,new_project);
        project_id = project_response.get("projects").toMap().get("id");
        for each  service_line in service_line_items
        {
         service_line_map = service_line.toMap();
         service_name = service_line_map.get("Service").toMap().get("name");
         values_map = Map();
         values_map.put("name",service_name + " (Service)");
         response = zoho.projects.create(portal_name,project_id,"tasks",values_map);
         values_map.clear();
        }
        if(part_line_item_size != 0)
        {
         for each  part_line in part_line_items
         {
          part_line_map = part_line.toMap();
          part_name = part_line_map.get("Part").toMap().get("name");
          values_map = Map();
          values_map.put("name",part_name + " (Part)");
          response = zoho.projects.create(portal_name,project_id,"tasks",values_map);
          values_map.clear();
         }
        }
       }
      } 
Note: Ensure that the status of the connection Internal_zohoprojects is Connected. The green dot [] indicates that the connection is Connected.
 

Step 3: Create a workflow rule  

Create a workflow rule in Zoho FSM to create Project and Tasks in Zoho Project whenever an Invoice is generated for a Work Order in Zoho FSM.
  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: Create Project and Task in Zoho Project
  3. Select the rule trigger as Edited and click Next.
  4. Select the rule criteria as Only to the Work Order matching certain conditions and add the condition Billing Status is Partially Invoiced, Invoiced. 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 from an Estimate. Provide a value in the Estimate field Project Name. A project will be created in Zoho Projects with the name provided in the Project Name field and tasks will be created within the project that correspond to the service and parts line items in the work order.
 

 

    Access your files securely from anywhere

      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





                          Quick Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          CRM Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal
                          Mobile App
                          Form Designer HR
                          Mobile Forms
                          Card Forms Food Offline Forms
                          Assign Forms Photography
                          Mobile Forms Features
                          Translate Forms Real Estate Kiosk in Mobile Forms
                          Electronic Forms

                          Notification Emails for Forms Alternatives Security & Compliance
                          Holiday Forms Google Forms alternative  GDPR
                          Form to PDF Jotform alternative HIPAA Forms
                          Email Forms
                          Encrypted Forms
                          Embeddable Forms
                          Secure Forms
                          Drag and Drop form builder
                          WCAG


                                            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

                                                                                                              • Create a Work Order in Zoho FSM from an Invoice in Zoho Books

                                                                                                                Use case: Whenever an Invoice 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 Books ...
                                                                                                              • Create an Estimate in Zoho Invoice from a Work Order in Zoho FSM

                                                                                                                Use case: Whenever a Work Order is created in Zoho FSM, create an Estimate for it in Zoho Invoice. Follow the steps below to implement this use case: Step 1: Create a custom function Step 2: Create a workflow rule Step 1: Create a custom function ...
                                                                                                              • Zoho FSM Mobile App

                                                                                                                The Zoho FSM mobile app empowers on-the-go field agents with all the information they need, to be efficient at work and delight contacts with every appointment. It helps them to be on time for their appointments, attend more appointments in a single ...
                                                                                                              • Create a Work Order in Zoho FSM whenever a Subscription is created or renewed

                                                                                                                Use case: Whenever a subscription is created or renewed in Zoho Billing, create a Work Order in Zoho FSM. Step 1: Add a service named ForZBilling Step 2: Create a connection for Zoho FSM in Zoho Billing Step 3: Create a custom function in Zoho ...
                                                                                                              • 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