Zoho FSM | Create a Work Order in Zoho FSM whenever a Subscription is created or renewed

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

In Zoho FSM, create a service called ForZBilling. Use this service in the work order that you create when a subscription is created or renewed in Zoho Billing.
 

Step 2: Create a connection for Zoho FSM in Zoho Billing

To create a connection for Zoho FSM that can be used in Zoho Billing for invoking the Zoho FSM APIs, do the following:
  1. Log in to Zoho Billing.
  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:
    1. Connection Name: Zoho FSM. The Connection Link Name will be automatically populated.
    2. Disable Use Credentials Of Login User. If this is disabled, the connection will utilize the credentials of the connection owner.
    3. Select the Scope ZohoFSM.modules.all.
  5. Click Connect.



  6. Click Accept.

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

Step 3: Create a custom function in Zoho Billing 

Add a custom function in Zoho Billing to create a work order in Zoho FSM whenever a subscription is created or renewed in Zoho Billing.
  1. Navigate to Settings > Automation > Custom Functions and click New Custom Function.



  2. In the New Custom Function page, enter the following details:
    1. Name: CreateWOInZFSM
    2. Module: Subscriptions
    3. Select New Subscription, and Subscription Renewal under Predefined Events > Immediate Events.



  3. In the Deluge Script Editor, enter the following script and click Save:


    custEmail = subscriptions.get("customer").toMap().get("email");
    response = zoho.fsm.searchRecordsByField("Contacts","Email",custEmail,Map(),"zohofsm");
    subscription_number = subscriptions.get("subscription_number");
    name = subscriptions.get("name");
    summary = subscription_number + ":" + name;
    response = response.get("data").toMap();
    tax = response.get("Tax").toMap();
    //info tax; 
    custId = response.get("id");
    companyMap = response.get("Company");
    if(companyMap == null)
    {
    compId = "";
    }
    else
    {
    compId = companyMap.toMap().get("id");
    }
    serviceAddressMap = response.get("Service_Address");
    if(serviceAddressMap == null)
    {
    serviceAddressId = "";
    }
    else
    {
    serviceAddressId = serviceAddressMap.toMap().get("id");
    }
    billingAddressMap = response.get("Billing_Address");
    if(billingAddressMap == null)
    {
    billingAddressId = "";
    }
    else
    {
    billingAddressId = billingAddressMap.get("id");
    }
    Service_Address_Map = Map();
    Billing_Address_Map = Map();
    Service_Address_Map.put("id",serviceAddressId);
    Billing_Address_Map.put("id",billingAddressId);
    serviceList = List();
    response1 = zoho.fsm.searchRecordsByField("Service_And_Parts","Name","ForZBilling",Map(),"zohofsm");
    //info response1;
    if(!response1.isNull() && !response1.isEmpty())
    {
    service = response1.get("data").toMap();
    serviceMap = Map();
    serviceMap.put("Quantity",1);
    serviceMap.put("Sequence",1);
    serviceMap.put("List_Price",service.get("Unit_Price"));
    serviceMap.put("Service",service.get("id"));
    serviceMap.put("Contact",custId);
    serviceMap.put("Tax",tax);
    serviceList.add(serviceMap);
    }
    terrResp = zoho.fsm.getRecords("Territories");
    terrId = terrResp.get("data").toMap().get("id");
    createWOMap = Map();
    createWOMap.put("Summary",summary);
    createWOMap.put("Priority","Medium");
    createWOMap.put("Type","Service");
    createWOMap.put("Email",custEmail);
    createWOMap.put("Contact",custId);
    createWOMap.put("Company",compId);
    createWOMap.put("Territory",terrId);
    createWOMap.put("Service_Address",Service_Address_Map);
    createWOMap.put("Billing_Address",Billing_Address_Map);
    createWOMap.put("Service_Line_Items",serviceList);
    info "createWOMap: " + createWOMap;
    woResp = zoho.fsm.createRecord("Work_Orders",createWOMap);
    info woResp;

Testing the use case 

Following are the steps to test the use case discussed:
  1. Select Subscriptions in the left menu and click on + New Subscription.



  2. Select a Customer, add a Plan and click Continue. Select the checkbox Collect payment offline.
    Ensure that the contact you choose is present in Zoho FSM. A Service Address, Billing Address, and Email should be present for the contact.



  3. Click Create.


A work order is created in Zoho FSM.
 


        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 Work Order in FSM from a CRM Sales Order

                                                                                                                                  Use case: Create a work order in Zoho FSM whenever a sales order is created in Zoho CRM. Follow the steps below to implement this use case: Step 1: Create a connection for Zoho FSM in Zoho CRM Step 2: Create a workflow rule Step 3: Create a custom ...
                                                                                                                                • 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 ...
                                                                                                                                • 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 ...
                                                                                                                                • Can I create a Work Order directly from a Request in Zoho FSM?

                                                                                                                                  Yes. Once a Request is created, you can convert it into a Work Order. To convert a request into a work order: From the Request details page, click Create Convert to Work Order. The Request information (such as Contact, Company, and Service Address) ...
                                                                                                                                  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