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 > Actions. Select the Deluge Functions tab and click Create Function.
  2. Enter the following details and click Save:
    1. Function Name: CheckInHoursAsAttendanceInPeople
    2. Module: Attendance Logs
    3. In the Deluge Script Editor, enter the following script:

      /*
       ------check-In time-----
      */
      Check_In_Time = attendance_log.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_log.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_log.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 Logs
    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 > Settings > General Settings > Attendance Integration Settings.




        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

                                  Zoho FSM Video Tutorials


                                        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

                                                                                                                                    • Managing Attendance

                                                                                                                                      Using the Attendance module, you can efficiently add, manage, and monitor attendance logs for users across your organization. This provides clear visibility into day-to-day workforce activity. Permission Required: Attendance Logs Checking In/Out The ...
                                                                                                                                    • 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 ...
                                                                                                                                    • Using Telephony in Zoho FSM

                                                                                                                                      With telephony enabled, you can: Make outgoing and incoming calls After the first call (incoming or outgoing) is made, telephony adds new modules and options to Zoho FSM, including: Calls Module Ability to create Call records Channels Related List ...
                                                                                                                                    • Why is a user unable to check in from the Zoho FSM mobile app?

                                                                                                                                      Scenario 1 : Outdated App Data / Sync Issues The mobile app may not be properly synced or could be using cached data, which can prevent check-in. Refreshing the app data can help in syncing the latest updates from the server and resolve such issues. ...
                                                                                                                                      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