Introducing Redwoods Insurance
Today I’m super excited to introduce you to Redwoods Insurance, our newest sample app and our first demonstrating the Salesforce Mobile SDK for iOS. Mobile is an increasingly important part of the customer experience and this new sample app demonstrates how to build a rich native experience for customers. This sample app also features a rich Salesforce experience for (hypothetical) employees.
Redwoods is a fictitious car insurance company. The iOS app helps Redwoods’ customers track and file new auto insurance claims. On the Salesforce side, the app helps adjusters quickly make claim decisions. Additionally, the two work together to dynamically surface information to customers. Let’s explore the app, starting with the Salesforce side.
Above we see a Service Console app, named Claim Management. We’re looking at a claim Jamie Childs filed on 5/20. Julia isn’t a Redwoods employee — she’s actually a Redwoods’ customer. Because Redwoods uses Customer Communities, Julia can login to her iOS app using her community credentials and directly file her claim.
This Service console has some standard components, like the highlights panel and the Path bar. It also has three custom components I want to draw your attention to. These three are all Lightning web components. The first is the Incident audio from User component in the upper right, just below the Highlights bar. This component identifies audio files associated with this case. That way, Redwoods employees working on the case can directly hear the users’ testimony of what happened. Below the audio is an interactive map component. Salesforce users can zoom and pan around to get a sense of where the accident took place. We’ll see how that data is generated when we get to the iOS side of things. Finally, on the Images tab is a carousel of customer-uploaded images showing damage caused by the accident.
With knowledge of where the accident occurred, a description of the accident, and photographs of the resulting damage, the Redwoods adjusters have the right information immediately available for them to make accurate and quick decisions. All the information comes from the Redwoods mobile app. Let’s look at how it works!
The customer iOS app
The Redwoods iOS app is written in Swift, the open source language used for building apps for all Apple devices. It makes use of the Salesforce Mobile SDK for iOS to manage authentication and handle data exchange. Specifically, Redwoods makes use of data queries, metadata queries and the ability to create new records in Salesforce. When the user first starts the Redwoods app, they’re greeted with the login screen. After they login, they see a list of current claims.
Tapping on any of the list items takes you to the Claim Detail view.
What’s important about this view, however, is how it’s generated. Redwoods makes a metadata query via the SDK to describe the fields present on the Case Compact layout. Whenever a Salesforce admin adds or removes a field from the compact layout the change is immediately reflected to the iOS app user — this means you only have to do the work once, and pull to refresh your screen! These features allow users to view and track updates to their claim, but the banner feature of Redwoods is in the creation of new claims. Let’s dive into that now.
If you’ve ever been in an accident, you know there’s a lot of information to be gathered. Making sure that information is accurate is critically important. After all, how frustrating would it be to accidentally mistype a phone number and have no way of contacting the person who hit you? Because of this, Redwoods wrote their app to use a device’s native sensors and hardware features as much as possible. Here’s a screenshot of the first part of our new claim view.
At the top of our new claim view is a map showing the icon of a little blue convertible. The car represents the accident location and the map automatically loads to show your current location. It pulls your current location using the Core Location framework in iOS and places the car on that location. However, we all know that urban centers and gnomes can wreak havoc on GPS accuracy, so users can move the map around to make sure the accident location is accurate. Whenever the user moves the map, the device again uses Core Location to reverse geoccode the latitude and longitude at the center of the map view into an approximate street address.
Not only does Redwoods need accurate information on where the accident occurred, they need a description of what happened. To make sure getting the details is as painless as possible, Redwoods offers users the ability to record a description of the accident. That description is transcribed using the Speech framework in iOS. That audio recording is uploaded and attached to the claim. The transcribed text populates the description field on the case. Just like GPS, sometimes your five-year-old sings pop songs too loudly for speech-to-text to get a solid understanding, so users can always tap into the description field and manually update the description with the keyboard.
Below the description users can add photos of damages and select contacts from their address book. These photos and contacts are uploaded as part of the case so adjusters can contact relevant parties and assess damage.
We hope you enjoy looking at, experimenting with, and building on top of Redwoods Insurance. It’s an interesting use case highlighting Salesforce Communities, Service Cloud console, Lightning Web Components and the Salesforce Mobile SDK for iOS. See the app in the Trailhead Sample Gallery. Or if you’d like to kick the tires, as it were, with the source code to Redwoods, you can find it here. Keep an eye out for an upcoming Trailhead project that guides you through building the iOS app in Swift!
About the author
Kevin Poorman is a Developer Evangelist at Salesforce. He focuses on Testing, Mobile, and Integrations on the Lightning Platform. You can pester him on Twitter @codefriar.