Zoho FSM | Mark attendance in Zoho People using the Checked-in hours in FSM Mobile

Mark attendance in Zoho People using the Checked-in hours in Zoho FSM Mobile

Use case: Use the check-ins and check-outs in the Zoho FSM mobile app to log the user's attendance in Zoho People.
 
Follow the steps below to implement this usecase:

Step 1: Create a connection for Zoho People

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



  2. Under the Default Services tab, select Zoho People.



  3. Perform the following and click Create And Connect:
    1. Enter the Connection Name as ZohoPeopleCon
      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 Scopes ZOHOPEOPLE.announcement.ALL,  ZOHOPEOPLE.assessment.ALL, ZOHOPEOPLE.attendance.all, and ZOHOPEOPLE.automation.ALL



  4. Click Connect in the authentication page.



  5. Click Authorize in the Authorization page.



  6. Click Proceed.



  7. Click Accept in the Permissions page.

In the custom function, where the Zoho People API is used via the invokeURL task, use this Connection Link Name.
 

Step 2: Create a custom function

Create a custom function to mark attendance in Zoho People using the checked-in hours in Zoho FSM Mobile
  1. Navigate to Setup > Automation > Functions and click Create Function.
  2. Enter the following details and click Save:
    1. Function Name: CheckInHoursAsAttendanceInPeople
    2. Module: Attendance
    3. In the Deluge Script Editor, enter the following script:

      /*
       ------check-In time-----
      */
      Check_In_Time = attendance.get("Check_In_Time");
      Check_In_temp_time = Check_In_Time.getSuffix("T");
      Check_In_time_f = Check_In_temp_time.subString(0,8);
      Temp_Check_In_Time = Check_In_Time.toTime();
      Check_In_date = Temp_Check_In_Time.getDay().toLong();
      if(Check_In_date < 10)
      {
      Check_In_date = "0" + Check_In_date;
      }
      Check_In_month = Temp_Check_In_Time.getMonth().toLong();
      if(Check_In_month < 10)
      {
      Check_In_month = "0" + Check_In_month;
      }
      Check_In_year = Temp_Check_In_Time.getYear();
      Final_Check_In_Time = Check_In_date + "/" + Check_In_month + "/" + Check_In_year + " " + Check_In_time_f;
      /*
       ------check-out time-----
      */
      Check_Out_Time = attendance.get("Check_Out_Time");
      if(Check_Out_Time != null)
      {
      Check_Out_temp_time = Check_Out_Time.getSuffix("T");
      Check_Out_time_f = Check_Out_temp_time.subString(0,8);
      Temp_Check_Out_Time = Check_Out_Time.toTime();
      Check_Out_date = Temp_Check_Out_Time.getDay().toLong();
      if(Check_Out_date < 10)
      {
      Check_Out_date = "0" + Check_Out_date;
      }
      Check_Out_month = Temp_Check_Out_Time.getMonth().toLong();
      if(Check_Out_month < 10)
      {
      Check_Out_month = "0" + Check_Out_month;
      }
      Check_Out_year = Temp_Check_Out_Time.getYear();
      Final_Check_Out_Time = Check_Out_date + "/" + Check_Out_month + "/" + Check_Out_year + " " + Check_Out_time_f;
      }
      /*
       ------Owner Email-----
      */
      owner_map = attendance.get("Owner").toMap();
      owner_email = owner_map.get("email");
      /*
       ------People Check-In check-Out Code-----
      */
      if(Check_Out_Time == null)
      {
      paramMap = Map();
      paramMap.put("dateFormat","dd/MM/yyyy HH:mm:ss");
      paramMap.put("checkIn",Final_Check_In_Time);
      paramMap.put("emailId",owner_email);
      response = invokeurl
      [
      type :POST
      parameters:paramMap
      connection:"zohopeoplecon"
      ];
      }
      else
      {
      paramMap = Map();
      paramMap.put("dateFormat","dd/MM/yyyy HH:mm:ss");
      paramMap.put("checkOut",Final_Check_Out_Time);
      paramMap.put("emailId",owner_email);
      response = invokeurl
      [
      type :POST
      parameters:paramMap
      connection:"zohopeoplecon"
      ];
      info "response: " + response;
      }

Step 3: Create a workflow rule

Create a workflow rule in Zoho FSM to mark attendance in Zoho People using the checked-in hours in Zoho FSM Mobile
  1. Navigate to Setup > Automation > Workflow Rules and click Create Workflow.
  2. Enter the following details, then click Next:
    1. Module: Attendance
    2. Rule Name: CheckInHoursAsAttendanceInPeople
    3. Description: Mark attendance in Zoho People using the checked-in hours in Zoho FSM Mobile



  3. Select the rule trigger as Created or Edited and click Next. Select the checkbox Repeat this workflow whenever a Attendance is edited.



  4. Select the rule criteria as To all Attendance. Click Next.



  5. Click +Action and select Function.



  6. Select Existing Functions and click Next.



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



  8. Click Save.


Testing the use case

Log in to Zoho FSM mobile and check-in. The checked-in time will reflect in Zoho People. Similarly, when you check-out, it will also reflect in Zoho People.
 


Please ensure that you haven't chosen any preferences for Push time log entries to attendance. You can find this option at Time Tracker > SettingsGeneral SettingsAttendance Integration Settings.



    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

                                                                                                              • 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 ...
                                                                                                              • Using FSM Mobile Offline

                                                                                                                The Offline Mode of the Zoho FSM Mobile app enables you to access the data in your mobile app even when the internet connectivity is poor or non-existent. The offline mode of the Zoho FSM mobile app will come into effect when the offline mode is ...
                                                                                                              • Overview of Zoho FSM

                                                                                                                What is Zoho FSM? Zoho FSM is a cloud application that offers an overarching solution for handling the entire life cycle of processes involved in the management and execution of field services. All processes that are pivotal to field services are ...
                                                                                                              • 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 ...
                                                                                                              • Multi-Region Support in Zoho FSM

                                                                                                                Zoho FSM offers features that will aid businesses spread across countries in managing their operations. Consider a company Zylker Inc. that offers snow removal services in Alaska, and Montana in the USA, and Quebec, and British Columbia in Canada. ...
                                                                                                                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