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.
 

 


        Create. Review. Publish.

        Write, edit, collaborate on, and publish documents to different content management platforms.

        Get Started Now


          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 LinksWorkflow AutomationData Collection
                                Web FormsEnterpriseOnline Data Collection Tool
                                Embeddable FormsBankingBegin Data Collection
                                Interactive FormsWorkplaceData Collection App
                                CRM FormsCustomer ServiceAccessible Forms
                                Digital FormsMarketingForms for Small Business
                                HTML FormsEducationForms for Enterprise
                                Contact FormsE-commerceForms for any business
                                Lead Generation FormsHealthcareForms for Startups
                                Wordpress FormsCustomer onboardingForms for Small Business
                                No Code FormsConstructionRSVP tool for holidays
                                Free FormsTravelFeatures for Order Forms
                                Prefill FormsNon-Profit

                                Intake FormsLegal
                                Mobile App
                                Form DesignerHR
                                Mobile Forms
                                Card FormsFoodOffline Forms
                                Assign FormsPhotographyMobile Forms Features
                                Translate FormsReal EstateKiosk in Mobile Forms
                                Electronic Forms
                                Drag & drop form builder

                                Notification Emails for FormsAlternativesSecurity & Compliance
                                Holiday FormsGoogle Forms alternative GDPR
                                Form to PDFJotform alternativeHIPAA Forms
                                Email FormsFormstack alternativeEncrypted Forms

                                Wufoo alternativeSecure Forms

                                TypeformWCAG


                                    All-in-one knowledge management and training platform for your employees and customers.

                                              Create. Review. Publish.

                                              Write, edit, collaborate on, and publish documents to different content management platforms.

                                              Get Started Now





                                                                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


                                                                      • Desk Community Learning Series


                                                                      • Digest


                                                                      • Functions


                                                                      • Meetups


                                                                      • Kbase


                                                                      • Resources


                                                                      • Glossary


                                                                      • Desk Marketplace


                                                                      • MVP Corner


                                                                      • Word of the Day


                                                                      • Ask the Experts


                                                                        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 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 a Task in Zoho Desk

                                                                                                                                  Usecase: Create a Work order in Zoho FSM whenever a Task is added in Zoho desk. Step 1: Create a connection for Zoho FSM in Zoho Desk Step 2: Create a custom function Step 3: Create a workflow rule Step 1: Create a connection for Zoho FSM in Zoho ...
                                                                                                                                • Create a Request in Zoho FSM from your website

                                                                                                                                  Usecase: Create a Request in Zoho FSM whenever user submits a form in your website. The user has to provide an email address of an existing Zoho FSM Contact. This can be achieved in Zoho FSM using the Create Request API. To do so, you need to follow ...
                                                                                                                                • Zoho FSM Extension for Zoho CRM (Direct Data Sync)

                                                                                                                                  Prerequisites - Standard edition or above of Zoho FSM - Standard edition or above of Zoho CRM - Zoho CRM is not integrated with a Zoho Finance Suite (Books/Invoice) org In Zoho FSM, navigate to Setup > Integration > Zoho CRM and click Integrate Zoho ...
                                                                                                                                • Create Timesheets in Zoho People from Zoho FSM Timesheets

                                                                                                                                  Use case: Whenever a timesheet is created in Zoho FSM, add a timesheet in Zoho People. Follow the steps below to implement this use case: Step 1: Create a connection for Zoho People Step 2: Create a connection for Zoho FSM Step 3: Create a custom ...
                                                                                                                                • Push Zoho FSM Contacts to Google Contacts

                                                                                                                                  Use case: Push (create/update) a Zoho FSM contact to Google Contacts. Changes made to the Name, Email, Mobile, Phone, or Service Address of the Zoho FSM Contact will reflect in the corresponding Google Contact. Follow the steps below to implement ...
                                                                                                                                  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