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

                                                                                                            • Where does this report come from in the Zoho One ecosystems?

                                                                                                              Is this directly from MA, Analytics or ??? ???
                                                                                                            • Sub-Form Padding in CSV Export

                                                                                                              Hi, When you use the Sub-Form, and for example you have a Date Field on the Main Page, then Option 1 and Option 2 fields on the Subform, when you export this to CSV the Date column will only have the Date in 1 row, the first row, it would be nice to pad
                                                                                                            • More Formula Functions

                                                                                                              Hi, I would ike for example to be able to have a Date Field and Formula Fields, and then in the Formula Fields I would like to grab just the Month of the above Date Field or the Week Number of the above Date Field. So more "Functions" than the current
                                                                                                            • File upload size limits

                                                                                                              I am designing a contact form in Zoho Creator with File upload facility. I am not sure where and how to set the following properties for the same: Allowed File Types Maximum Size of the Attachment Number of Attachments
                                                                                                            • Composite Services and Account Tracking

                                                                                                              I am looking to garner support/request the ability to make composite services. A quick search in the forums brings up multiple requests for this feature. I fail to see why an item is mandatory while services are optional. I also would like to see the
                                                                                                            • All operation codes getting Not applied in WO-TT22J1025WOR0471, SR-TT22J1025PRE0423,FOR VIN-W1K6G2AB2SL005130.

                                                                                                              Dear Support Team, Please refer attached screenshot. All operation codes getting not applied in work order. Request you to please check and update ASAP.
                                                                                                            • Customer Grouping

                                                                                                              Hi, how can I group multiple customers into single group. So that I can have idea of accounts receivables of all the customers in single group. Like if there are multiple subsidiaries of same company we have having a business with, and want to view the
                                                                                                            • Bank Receipt Catagorization

                                                                                                              Hi, how can I match a bank deposit to multiple customer's invoices ? For e.g. A single person paid to us on behalf of different five customers. I need to keep the separated invoices for each customer
                                                                                                            • "Performed changes in the query is not allowed due to following reason" when adding columns or reordering data

                                                                                                              I'm trying to make changes to a query but every time i try to save it i get this error message.  I'm not touching the data it's flagging.  All I've tried to do is reorder a couple of fields and add a new one.  Why won't it let me do this?  It's a core
                                                                                                            • Exclude Segment from Campaign Recipients

                                                                                                              I've created two Segments in order to separate Non-Marketing Contacts from Marketing Contacts. I'd like to send an Eblast to all Marketing contacts in my lists, but when I go to select Recipients, I have two options: 1. To Choose Lists to Send to; 2.
                                                                                                            • Reschedule Multiple/Mass Calls at Once

                                                                                                              When we go into a Call record, we have the option to "Reschedule Call." How can we select multiple Calls at once from the Activities tab and Reschedule them? The big use case for us: We have many leads that our reps are supposed to call on a daily basis.
                                                                                                            • Option to Empty Entire Mailbox or Folder in Zoho Mail

                                                                                                              Hello Zoho Mail Team, How are you? We would like to request an enhancement to Zoho Mail that would allow administrators and users to quickly clear out entire folders or mailboxes, including shared mailboxes. Current Limitation: At present, Zoho Mail only
                                                                                                            • I want to Make the due date of the project appears automatically

                                                                                                              hello everyone I want to know if the zoho projects app can add automatically the END DATE of the project I added the duration, start after dates of each tasks in the project template & the starting date of the project itself and the end date of it doesn't
                                                                                                            • Drag 'n' Drop Fields to a Sub-Form and "Move Field To" Option

                                                                                                              Hi, I would like to be able to move fields from the Main Page to a Sub-Form or from a Sub-Form to either the Main Page or another Sub-Form. Today if you change the design you have to delete and recreate every field, not just move them. Would be nice to
                                                                                                            • Get Zoho Mail API working (including DRE Connector, Oauth Token, ZUID, ZOID & ACCOUNT_ID)

                                                                                                              Disclaimer: I’m not a professional coder! Do you need to use Zoho Mail API? Me too. It lets you do all sorts of things — like reading the complete header of an email, or forwarding an email with its attachments — which is what I wanted to do. But setting
                                                                                                            • Kaizen #129 : Client Script Support for Blueprints

                                                                                                              Hello everyone! Welcome to another week of Kaizen. Today, let us discuss about how you can use Client Script during a Blueprint transtion to meet your requirements. This Kaizen post will provide solution for the post - Need non-mandatory fields in blueprint
                                                                                                            • Deluge Tips & Tricks: Mastering dates and times

                                                                                                              Hello everyone! We're bringing back our Deluge Tips & Tricks series, where we show you how to make the most of Deluge for achieving a wide range of use cases. Working with dates and times is a fundamental part of almost any business application. Whether
                                                                                                            • Adding a Button in a Form in Zoho Creator App

                                                                                                              Hi I want to know how can I add a Button in Zoho Creator form. I have options that I select from a multiselect options and I want the button to add those selected options in a Subform. I do not want to add on a Page Builder I want it inside a specific
                                                                                                            • Feature Enhancement Request – Text Formatting Options in Item Description (Zoho Books/Quotes Module)

                                                                                                              Dear Zoho Development Team, Greetings from Radiant360 Integrated Technical Services LLC. We would like to bring to your attention a functional limitation we've encountered within the Item Table / Quote Description section of Zoho Books (and Zoho CRM Quotes).
                                                                                                            • Internal Exception for Creator function

                                                                                                              I have been running a script successfully for several days using the scheduler in my application. Now today it suddenly creates and Internal Exception error. Nothing has changed about the script. The data is still retrievable from the web service it is using. Why would this suddenly be happening for no apparent reason? Also noticed that my usage logs are not up to date. Is something changing behind the scenes?
                                                                                                            • How to Set Up a Custom Domain and Customize Homepage

                                                                                                              Hello, I am experimenting with Zoho Creator to build applications for my own use case and have encountered a couple of issues: 1. Custom Domain Access: Is it possible to access my Zoho Creator application through a domain that I own? If so, how does the
                                                                                                            • Announcing new features in Trident for Mac (1.26.0)

                                                                                                              Hello everyone! Trident for macOS (v1.26.0) is here with new updates to securely manage your passwords, locally save your emails, and protect against emails with suspicious URLs. Let's take a quick look at them. Manage passwords with Zoho Vault eWidget.
                                                                                                            • Default Value on a Number

                                                                                                              Hi, I would be nice to also be able to set the Default Value for a Number Field, not just the Initial Value shown, so if not on the screen so not enetred it can have a value of 0 for example. Thanks Dan
                                                                                                            • Having trouble fetching contents of Zoho Connect Feeds using the API, requesting alternative API documentation.

                                                                                                              I'm trying to retrieve feed/post data from Zoho Connect using the API but facing challenges with the current documentation. What I've tried: OAuth authentication is working correctly (getting 200 OK responses) Tested multiple endpoints: /pulse/nativeapi/v2/feeds,
                                                                                                            • Tip#45: Custom Tags and Cluster Tags

                                                                                                              Tagging your work items helps categorize and label work items within your Zoho Sprints workspace. Now, this feature is expanded across multiple modules, along with the introduction of cluster tags that offer an advanced tagging mechanism. Manage Tags
                                                                                                            • Extensions 101 webinar series: Build, integrate, and monetize with extensions

                                                                                                              Attention developers! Are you ready to take your extension development skills to the next level? We're excited to bring back the Extensions 101 webinar series with an expanded lineup of Zoho products and an introduction to more platform features. Last
                                                                                                            • When using "locations" in zoho books, can you keep the two locations totally separate from each other?

                                                                                                              I am looking to add a location but I don't want to intermingle the banking or other accounts. I want that to be like two separate independent branches that use different banking accounts, accounts payable, and accounts receivable. The people who are in
                                                                                                            • [Free Webinar] User Management in Zoho Creator - Creator Tech Connect

                                                                                                              Hello Everyone! We welcome you all to the upcoming free webinar on the Creator Tech Connect Series. The Creator Tech Connect series is a free monthly webinar that runs for around 45 minutes. It comprises technical sessions in which we delve deep into
                                                                                                            • A couple of minor enhancements to Workflows

                                                                                                              Last updated on September 17, 2024: These enhancements were initially available for early access, and we've now enabled them for all users. We are elated to announce a couple of enhancements to custom functions in our Workflows! Say hello to: "Source"
                                                                                                            • Business Continuity - Disaster Recovery

                                                                                                              I know about the Zoho CRM backup .zip files, however, this doesn't include any of the infrastructure with like custom fields or custom modules. I am curious on what everyone has in place for a true backup or what your plan is if your Zoho instance were
                                                                                                            • Free webinar alert on October 16 - Less Complexity, More Security: Workplace + Directory

                                                                                                              Hello Zoho Workplace Community! Security and productivity shouldn't be at odds—and with Zoho, they're not. Discover how Zoho Workplace + Directory delivers seamless collaboration with enterprise-grade security, all in one integrated ecosystem. Join our
                                                                                                            • Narrative 11: Are your customers happy?

                                                                                                              Behind the scenes of a successful ticketing system: BTS Series Narrative 11: Are your customers happy? Happiness isn't just something you experience; it's something you remember. Hear your customers' voices by enabling customer happiness ratings in Zoho
                                                                                                            • Don't understand INVALID_REQUEST_METHOD when I try to post up an attachment

                                                                                                              When I make the POST request (using python requests.post() for files): https://www.zohoapis.com/crm/v8/Calls/***************01/Attachments I get this response: r:{ "code": "INVALID_REQUEST_METHOD", "details": {}, "message": "The http request method type
                                                                                                            • Organization Emails in Email History

                                                                                                              How can I make received Org Emails to show up here?
                                                                                                            • Signature field is showing black

                                                                                                              Hello, When customer signed the service form, it is showing as below picture Phone model: iPhone 16 Pro We tried delete and install application, but it not solved. This has on phone of a few person. There is any advice to solve this?
                                                                                                            • Zoho CRM Android app updates: record sharing, user image upload, Zoho Survey integration, and more

                                                                                                              Hello everyone, We've made some important improvements to Zoho CRM's Android app, and we'd like to walk you through the latest updates. Here's what's new: Record sharing with org users User image upload Zoho Survey integration support Venue preference
                                                                                                            • How to Delete/hide Google adwords section from Layout?

                                                                                                              Hi people, maybe someone can tell me how to remove or hide the Google adwords section from my layout? Im not using it and it takes too much space.
                                                                                                            • WIDGET in related record list ZOHO CRM; how to get and put data to subform custom fields?

                                                                                                              he need: Read and write two custom subform line-item fields on Quotes: Segment_wyceny (picklist/text) and W_pakiecie (number). Write works; read does not return these fields via SDK. Environment Zoho CRM Widget Zoho Embedded App SDK v1.2 Module: Quotes
                                                                                                            • Introducing Assemblies and Kits in Zoho Inventory

                                                                                                              Hello customers, We’re excited to share a major revamp to Zoho Inventory that brings both clarity and flexibility to your inventory management experience! Presenting Assemblies and Kits We’re thrilled to introduce Assemblies and Kits, which replaces the
                                                                                                            • Not all emails from outlook365 migrated to my new zoho account

                                                                                                              I recently setup a new email address hosted by zoho. I migrated all my folders and email from my Outlook365 account to my new zoho account, but not all my emails migrated. Looks like only the past 12 months, or so, made the move. How do I get the rest
                                                                                                            • Next Page