Zoho FSM | Create an event in Microsoft Calendar for a Service Appointment

Create an event in Microsoft Calendar for a Service Appointment

Use case: Whenever a service appointment is created in Zoho FSM, create an event in Microsoft Calendar.
 
Follow the steps below to implement this use case:

Step 1: Create a connection for Microsoft Calendar  

To use the Microsoft Graph APIs via the invokeURL task in the custom function, you need to create a connection for Office 365. To do so:
  1. Navigate to Setup > Developer Space > Connections and click Create Connection.



  2. Under the Default Services tab, select Office 365.



  3. Do the following and click Create And Connect.
    - Enter the Connection Name as Microsoft Calendar. 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 Scopes Calendars.ReadWrite, and offline_access.



  4. Click Connect in the authentication page.



  5. Click Connect in the Authorization page.



  6. Sign in to your account.



  7. Click Allow in the Authorization page.



  8. In the custom function, where the Microsoft Calendar API is used via the invokeURL task, use this Connection Link Name.


Step 2: Create a custom function    

Create an event in Microsoft Calendar from a service appointment.
  1. Navigate to Setup > Automation > Functions and click Create Function.



  2. Enter the following details and click Save:
    1. Function Name: CreateEventInMicrosoftCalendar
    2. Module: Service Appointments
    3. In the Deluge Script Editor, enter the following script:

      try

      {

      summary_name = service_appointment.get("Summary").toString();

      scheduled_start = service_appointment.get("Scheduled_Start_Date_Time").toString();

      scheduled_end = service_appointment.get("Scheduled_End_Date_Time").toString();

      work_order_name = service_appointment.get("Appointments_X_Services").get(0).get("Work_Order").get("name").toString();

      appointment_name = service_appointment.get("Name").toString();

      header_data = Map();

      header_data.put("Content-Type","application/json");

      eventinput = {"subject":summary_name,"body":{"contentType":"TEXT","content":"work_order_name:" + work_order_name + "- appointment_name:" + appointment_name},"start":{"dateTime":scheduled_start,"timeZone":"UTC"},"end":{"dateTime":scheduled_end,"timeZone":"UTC"}};

      info eventinput;

      response = invokeurl

      [

      url :"https://graph.microsoft.com/v1.0/me/events"

      type :POST

      parameters:eventinput.toString()

      headers:header_data

      connection:"microsoftcalendar"

      ];

      info response;

      }

      catch (e)

      {

      info e;

      }

Step 3: Create a workflow rule

Whenever a service appointment is created in Zoho FSM, create an event in Microsoft Calendar.
  1. Navigate to Setup > Automation > Workflow Rules and click Create Workflow.
  2. Enter the following details, then click Next:
    Module: Service Appointments
    Rule Name: Create Event in Microsoft Calendar
    Description: Create an event in Microsoft Calendar when a new service appointment is created



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



  4. Select the rule criteria as To all Service Appointments. Click Next.



  5. Click +Action and select Function.



  6. Select Existing Functions and click Next.



  7. Select the function created in the previous step.



  8. Click Save.


Testing the use case

Create a Service Appointment. An event will be created in your calendar.


      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 FormsRetailOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceForms for Solopreneurs
                              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
                              Forms for Government
                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic FormsInsurance
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsWufoo alternativeEncrypted Forms
                              Accessible FormsTypeform alternativeSecure Forms

                              WCAG

                                          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

                                                                  Use cases

                                                                  Make the most of Zoho Desk with the use cases.

                                                                   
                                                                    

                                                                  eBooks

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

                                                                   
                                                                    

                                                                  Videos

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

                                                                   
                                                                    

                                                                  Webinar

                                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                                   
                                                                    
                                                                  • Desk Community Learning Series


                                                                  • Meetups


                                                                  • Ask the Experts


                                                                  • Kbase


                                                                  • Resources


                                                                  • Glossary


                                                                  • Desk Marketplace


                                                                  • MVP Corner



                                                                    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 an event in Zoho Calendar for a Service Appointment

                                                                                                                              Use Case: Whenever a service appointment is dispatched in Zoho FSM, create an event in Zoho Calendar. Step 1: Create a custom function Step 2: Create a workflow rule Step 1: Create a custom function Add a custom function that will create an event in ...
                                                                                                                            • Create an event in Google Calendar for a Service Appointment

                                                                                                                              Use case: Whenever a service appointment is created in FSM, create an event in Google Calendar. Follow the steps below to implement this use case: Step 1: Create a connection for Google Calendar Step 2: Create a custom function Step 3: Create a ...
                                                                                                                            • Can I create a service appointment for a specific services in a work order?

                                                                                                                              Yes, you can create a Service Appointment for an individual service line item in a Work Order instead of scheduling for the entire Work Order. To do this: Go to: Work Order Management > Service Appointments > Create Service Appointment Select the ...
                                                                                                                            • How to schedule Equipment to a Service appointment?

                                                                                                                              To schedule equipment for a Service appointment : In the Create Service Appointment window, select Equipment from the Service Resource dropdown. Alternatively, on the Dispatch Console, pick an equipment and assign it directly to the appointment. If ...
                                                                                                                            • How can I create a service appointment for my work order?

                                                                                                                              To create a service appointment for a Work Order: Go to: Work Order Management > Service Appointments > Create Service Appointment Select the work order for which you want to create the appointment. The system will load all its details. Enter the ...
                                                                                                                              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