Building a Simple iOS App for Service Engineers using Zoho CRM

Building a Simple iOS App for Service Engineers using Zoho CRM

Not Every department in your company works the same, With the help of Zoho CRM SDKs not only you can create customised experiences for your CRM users but also build custom solutions on top of Zoho CRM to run your business.

Introducing SerWiz - A simple mobile app for service engineers, through which they could have a quick look at their assigned jobs, go on the field and get their job done, all of this using Zoho CRM as the backend/the source of data.




We'll be using the Zoho CRM iOS SDK to build our app for iPhone and iPad. We'll also be using Zoho CRM Portals to give restricted access to Service engineers.

Note: It's not necessary to know iOS Development to understand this post, although it helps if you know a bit of it. 

Setup

Building a mobile app on Zoho CRM has two parts - Configuring Zoho CRM and building the mobile app in a particular platform, in this case, the iOS Platform.

Setting up Zoho CRM
  • Create a Client Portal for Zoho CRM. This will allow Service Engineers to login to Zoho CRM and access the data that has been disclosed to them

  • Add Service Engineers either as Contacts or through a custom module and invite them to the client portal we've just created. For simplicity, We will add them as Contacts for now.

  • Create a Custom Module for collecting Service Requests from Customer Complaints. This module will contain details like the affected product, details of the service request etc. Here we also ensure to add both the Customer and the Service Engineer as lookup fields so that we can associate them to the incoming service request.

  • Setup permission for Portal users,i.e Service Engineers so that they can access the necessary records in Zoho CRM.

  • Note: It is important to enable the Service Requests module and filter them by "Service Engineers" so that the Service Engineers in the portal will be shown their relevant Service requests

Getting Started With Zoho CRM iOS SDK

Zoho CRM iOS SDK is the easiest way to connect your app with Zoho CRM. The SDK takes care of all the heavy lifting that an app needs like Authentication, API calls, Data Parsing etc so that you can focus on delivering the best mobile experience to your users.

Prerequisites

  • A Mac Running MacOS Mojave or later

  • Download and Install XCode 10.2 or higher

  • Download and install Cocoapods, A Package Manager for iOS development

  • NPM

  • (Optional) A actual iOS device to test your app

Adding the Zoho CRM SDK to your XCode Project

  • You can also follow the instructions over here to setup Zoho CRM SDK for your project.

Before starting to code the app, it is always a good idea to visualize the flow of the app. Here's a simple flowchart for the same



Adding Authentication and Login to your iOS App

Authentication is the most important part of any application, and without proper authentication, one cannot access the underlying service.Building your own Authentication service is a pain, and there are so many things that could go wrong. 

The Zoho CRM SDK takes care of Securing authentication using the iOS Keychain store to provide a highly secure login layer for your app.

Zoho CRM iOS SDK provides a very handy class ZVCRMLoginHandler for handling Login for Portal users. Note that this class is different from the ZCRMLoginHandler which lets Zoho CRM users login.

For more details on how this class is used, check out the AppDelegate.swift in the shared Project.

Fetching Records from Modules

Data is the core of any application and for our application, we are sourcing our data from Zoho CRM. The Zoho CRM iOS SDK provides native Swift APIs to connect with the back end and fetch the data required.

For our app, we need all the service requests for the existing user from the custom module "Service Requests". This is achieved by the following code

  1. ZCRMSDKUtil.getModule(moduleAPIName: "Service_Requests") { (result) in 
  2. // Work with the result here
  3. }

(For the detailed code, check ViewController.swift file)

Once we get all the records from Zoho CRM, we can populate the list view in our application with the necessary details from the CRM records. 

For example, we can access the name of the service request using this code

  1. let name = record.getData()["Name"] as! String

(For detailed code, check WorkOrderTableViewCell.swift file)

Create and attach a note to a Service Request

Once the service engineer has completed the job, we create a note with details like - total time taken to complete the job, customer sign, payment reference number etc and add to the Service Request. 

Creating and adding a note is very simple using the CRM SDK, this is the code snippet as follows

  1. let note = workOrder?.newNote(content: jobCompletionNoteString)
  2. self.workOrder?.addNote(note: note!, completion: { [weak self] (result) in 
  3. // Completion block for creating a note
  4. }

(For detailed code, check `CompletionViewController.swift`)

I've shared the link to source code so that you can have a look at the code, although I've redacted the Client ID and Client Secret because I've used my personal Zoho account. Check out the Readme.md file to know more about how the code is structured. 

With a blend of good user interface and the Zoho CRM SDK, you can create custom mobile solutions in no time. This particular project, although very minimal, took me a weekend (around ~8-10 hours) to code. A fully fleshed out app might take a couple weeks or more depending on the app's requirement. 

If you are interested to know more about creating custom mobile solutions, I'll be available in Zoholics Developers, from Oct 1 - Oct 3, representing Zoho Catalyst, would love to catch up with you to know more about what you are working on.

Source Code - https://zdrive.li/RYiswO


    Access your files securely from anywhere











                            Zoho Developer Community





                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                  • Ask the Experts





                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • Functions

                                                                                        Functions

                                                                                      • Meetups

                                                                                        Meetups

                                                                                      • Kbase

                                                                                        Kbase

                                                                                      • Resources

                                                                                        Resources

                                                                                      • Digest

                                                                                        Digest

                                                                                      • CRM Marketplace

                                                                                        CRM Marketplace

                                                                                      • MVP Corner

                                                                                        MVP Corner







                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now


                                                                                            Zoho Show Resources


                                                                                              Zoho Writer Writer

                                                                                              Get Started. Write Away!

                                                                                              Writer is a powerful online word processor, designed for collaborative work.

                                                                                                Zoho CRM コンテンツ




                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方




                                                                                                            • Recent Topics

                                                                                                            • Problem Management Module

                                                                                                              I am looking for a Problem Management module within Zoho Desk. I saw in some training videos that this is available, and some even provided an annual price for it. I want an official confirmation on whether this is indeed available. This is not a particularly
                                                                                                            • Unable to explore desk.zoho.com

                                                                                                              Greetings, I have an account with zoho which already has a survey subscription. I would like to explore desk.zoho.com, but when I visit it while logged in (https://desk.zoho.com/agent?action=CreatePortal) I just get a blank page. I have tried different
                                                                                                            • Offline support for mobile app

                                                                                                              Accessing your files and folders from your mobile devices is now quicker and simpler, thanks to the power of offline support. Whether on an Android or iOS device, you can use the Offline function to save files and folders, so you can review them even
                                                                                                            • Zoho Desk KB article embedded on another site.

                                                                                                              We embed KB articles from Zoho Desk on another site (our application). When opening the article in a new tab, there is no issue, but if we choose lightbox, we are getting an error "To protect your security, help.ourdomain.com will not allow Firefox to
                                                                                                            • OPTED FOR STORAGE BY DESCRIPTIVE MISGUIDANCE

                                                                                                              We've opened a domain with three mail ids and payment has also been processed now the bill raised is for single use ID with additional storage capacity. Kindly request you to modify the purchase.
                                                                                                            • List of packaged components and if they are upgradable

                                                                                                              Hello, In reference to the article Components and Packaging in Zoho Vertical Studio, can you provide an overview of what these are. Can you also please provide a list of of components that are considered Packaged and also whether they are Upgradable?
                                                                                                            • Does Attari Messaging app have Bot option and APIB

                                                                                                              Hi, Does Attari also have Bot and API as we use in WhatsApp??
                                                                                                            • How to add application logo

                                                                                                              I'm creating an application which i do not want it to show my organization logo so i have changed the setting but i cannot find where to upload/select the logo i wish to use for my application. I have seen something online about using Deluge and writing
                                                                                                            • Email login error

                                                                                                              Login successfully but email page error
                                                                                                            • Zoho Analytics Regex Support

                                                                                                              When can we expect full regex support in Zoho Analytics SQL such as REGEXP_REPLACE? Sometimes I need to clean the data and using regex functions is the easiest way to achieve this.
                                                                                                            • Change of Blog Author

                                                                                                              Hi, I am creating the blog post on behalf of my colleague. When I publish the post, it is showing my name as author of the post which is not intended and needs to be changed to my colleague's name. How can I change the name of the author in the blogs?? Thanks, Ramanan
                                                                                                            • Show Attachments in the customer portal

                                                                                                              Hi, is it possible to show the Attachments list in the portal for the particular module? Bests.
                                                                                                            • Feature Request - Insert URL Links in Folders

                                                                                                              I would love to see the ability to create simple URL links with titles in WorkDrive. or perhaps a WorkDrive extension to allow it. Example use case: A team is working on a project and there is project folder in WordDrive. The team uses LucidChart to create
                                                                                                            • How to sync from Zoho Projects into an existing Sprint in Zoho Sprints?

                                                                                                              Hi I have managed to integrate Zoho Projects with Zoho Sprints and I can see that the integration works as a project was created in Zoho Sprints. But, what I would like to do is to sync into an existing Zoho Sprints project. Is there a way to make that
                                                                                                            • how to differentiate if whatsapp comes from certain landing page?

                                                                                                              I create a Zobot in SalesIQ to create a Whatsapp bot to capture the lead. I have 2 landing pages, one is SEO optimized and the other want is optimized for leads comes from Google Ads. I want to know from which landing page this lead came through WhatsApp
                                                                                                            • Split my account

                                                                                                              Hello, I recently bought an email service for a friend. But, looks like I used my personal account to buy the plan. Please split the account so that the email service stays in a different account than my personal account.
                                                                                                            • How to record company set up fees?

                                                                                                              Hi all, We are starting out our company in Australia and would appreciate any help with setting up Books accounts. We paid an accountant to do company registration, TFN, company constitution, etc. I heard these all can be recorded as Incorporation Costs, which is an intangible asset account, and amortised over 5 years. Is this the correct way to do it under the current Australian tax regulations? How and when exactly should I record the initial entry and each year's amortasation in Books? Generally
                                                                                                            • Have Mail Lite, wish to add/purchase 2nd domain and use email

                                                                                                              Hello, I have recently created two new businesses. I have successfully used Zoho to create a domain for one business and have set up two email addresses / users on that domain. I am trying to figure out how to create a second domain, just like I did the
                                                                                                            • Show Payment terms in Estimates

                                                                                                              Hi,  we are trying to set up that estimates automatically relates payment terms for the payment terms we introduced on Edit contact (Field Payment terms).  How can it be done? Our aim is to avoid problems on payment terms introduced and do not need to introduce it manually on each client (for the moment we are introducing this information on Terms and Conditions.  Kind Regards, 
                                                                                                            • Search Bar Improvement for Zoho Commerce

                                                                                                              Hey everyone, I've been using Zoho Commerce for a bit now, and I think the search bar could really use an upgrade. Right now, it doesn't show products in a dropdown as you type, which would make finding items a lot faster. On Shopify, for example, you
                                                                                                            • How can I calculate the physical stock available for sale?

                                                                                                              Hey Zoho Team,  I've tried to calculate the physical stock on hand in various ways - but always receive a mismatch between what's displayed in Zoho Inventory & analytics.  Can you please let me know how the physical stock available for sale is calculated?
                                                                                                            • When dispatched to crew, assigning lead missing

                                                                                                              Hello, For the past two or three weeks, whenever an officer assigns Service Appointment to a team, the lead person is missing from the assigned service list. Therefore, we have to reschedule the SA and then the lead person becomes visible in the assigned
                                                                                                            • I want to transfer the project created in this account to another account

                                                                                                              Dear Sir I want to transfer the project created in one account to another account
                                                                                                            • Inactive User Auto Response

                                                                                                              We use Zoho One, and we have a couple employees that are no longer with us, but people are still attempting to email them. I'd like an autoresponder to let them no the person is no longer here, and how they can reach us going forward. I saw a similar
                                                                                                            • Weekly Tips : Customize your Compose for a smoother workflow

                                                                                                              You are someone who sends a lot of emails, but half the sections in the composer just get in your way — like fields you never use or sections that clutter the space. You find yourself always hunting for the same few formatting tools, and the layout just
                                                                                                            • Custom Bulk Select Button

                                                                                                              Zoho CRM offers the ability to select multiple records and invoke a Custom Button This functionality is missing from Recruit Currently we can only add buttons in the detail page and list But we cannot select Multiple Records and invoke a function with
                                                                                                            • Need support in setting up the company email and few other setups

                                                                                                              Need support in setting up the company email and few other setups
                                                                                                            • Power of Automation :: Smart Ticket Management Between Zoho Desk and Projects

                                                                                                              Hello Everyone, A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate
                                                                                                            • Need to set workflow or journey wait time (time delay) in minutes, not hours

                                                                                                              Minimum wait time for both Campaigns workflows and Marketing Automation journeys is one hour. I need one or the other to be set to several minutes (fraction of the hour). I tried to solve this by entering a fraction but the wait time data type is an integer
                                                                                                            • Remote Server is misconfigured

                                                                                                              Dear Team, I am unable to use email id as remote server is misconfigured. It would be really great if you could help on this and get this resolved. Thanks & Regard Rohit Gupta
                                                                                                            • BUG - Google Business Buttons - Add a button to GBP Post

                                                                                                              I am experiencing an issue with the "Add a button" feature when creating posts for my Google Business Profile (GBP) through Zoho Social. When I schedule or publish a GBP post and include a call-to-action button with a specific URL, the post itself publishes
                                                                                                            • This mobile number has been marked spam.

                                                                                                              Dear zoho team, I am very happy to use zoho,because it india 🇮🇳 own app, but when we login into zoho account we facing some issue, please solve below issue ASAP. Add your mobile number As an added security measure for Accounts, you need to verify and
                                                                                                            • Do you have software like Windows software?

                                                                                                              We want swadeshi software
                                                                                                            • Support for Custom Fonts in Zoho Recruit Career Site and Candidate Portal

                                                                                                              Dear Zoho Recruit Team, I hope you're doing well. We would like to request the ability to use custom fonts in the Zoho Recruit Career Site and Candidate Portal. Currently only the default fonts (Roboto, Lato, and Montserrat) are available. While these
                                                                                                            • Trying to export a report to Excel via a deluge script

                                                                                                              I have this code from other posts but it gives me an error of improper statement, due to missing ; at end of line or incomplete expression. Tried lots of variations to no avail. openUrl(https://creatorapp.zoho.com/<username>/<app name>/XLSX/#Report:<reportname>,"same
                                                                                                            • Need help to create a attach file api

                                                                                                              https://www.zoho.com/crm/developer/docs/api/v8/upload-attachment.html Please help me to create it... It's not working for while. Do you have some example?
                                                                                                            • Export view via deluge.

                                                                                                              Hi, Is it possible to export a view (as a spreadsheet) via deluge? I would like to be able to export a view as a spreadsheet when a user clicks a button. Thanks     
                                                                                                            • Zoho Inventory's latest shipping integration updates at a glance.

                                                                                                              Hello Users, We would like to share some important news about our latest improvements in the Shipping integration capabilities of Zoho Inventory that we achieved in 2024 with some of our major integration partners in key editions across APAC, North America,
                                                                                                            • IP Address Blocked

                                                                                                              Hi Team. Hope you're doing good. I'm unable to access Zoho with my IP address. I have to use VPN to access it. IP: 39.44.12.153 This is happening with all the Zoho products, the admin console and the mail.
                                                                                                            • Outdated state in mexico

                                                                                                              Hello Zoho team, the drop down to add the state for customers, when they introduce their state in mexico has a city named “Distrito Federal” that name changed many years ago to “ciudad de mexico”. could you please update this so my clients can find the
                                                                                                            • Next Page