Salesforce1 is a hybrid mobile app that lets developers easily create a mobile experience using Visualforce, Apex, and Javascript. But what happens if you already have a mobile app or need to access native device features? This is where Deep Link comes into play, and we are excited to share the newly published official Salesforce1 deep link support schemes for iOS.

What is Deep Link?

Deep Link is a popular technique that lets mobile apps interact with each other using hyperlinks. Developers can pre-define behaviors with the URI scheme (i.e. Display/edit information, enable device feature, or simply switch between apps). For example, suppose you are searching for the nearest fast food restaurant with your phone’s web browser. You find the address of your favorite place and click on it. You’re then taken directly to the Maps app with the destination already configured. This is a great example of providing additional services with a seamless experience to an end user.

  Untitled-1_bdrqg1

Common Deep Link Use Cases

  • Launching a different app

  • Communicating between apps & passing information

  • Navigating to your app using URI based navigation scheme (From an app, website, or even email)

  • Enabling integration with other apps

  • Record & Analyze user behaviors

Tips: Deep Link is not only useful for app-to-app integrations; you can also make use of the URI in webpages & emails. If you are a Salesforce1 mobile application user, you probably realized that clicking any salesforce email links on your phone would launch Salesforce1 for you. You can easily replicate this behavior with the URI scheme above by adding it to your pages with html.

While it’s possible to develop complex and robust business apps within Salesforce1, there are some use cases where you might need to leverage Deep Link to punch out of the app:

  • Barcode scanner – native camera/image processing

  • Bluetooth connectivity

  • iBeacon*

  • OCR (Optical character recognition)

  • Credit card reader (Square, etc)

  • Apple Health data

Image_3_knkyki

Sample Use Case

Suppose we are a shipping company that manages inventory. Navigating to a record by name can be time consuming, especially if there are many similar products. Wouldn’t it be nice if you could just scan the barcode of the item and get navigated straight to that record?

Image_4_p0ttc3

Within Salesforce1, I have created a publisher action called Scan Barcode that will launch the native barcode application I have developed. (to launch the native application, simply call the bundleID or the URI.)

Image_5_o6f2uv

Once the barcode is scanned, the application checks for the record ID of that specific item. When a match is found, the barcode application then navigates the user back to Salesforce1 to that exact record. (Using the sample Deep Link Schemes mentioned earlier). We can now easily update quantity, price, or any other attributes.

Image_6_oh3dnz

Conclusion

Deep Link is a great option when the desired task cannot be done by a single application. However, there will always be a cut-off on user experience when you switch between apps. With great power, comes great opportunity. Always ask yourself whether your application really needs the Deep Link, and try to make the transition as seamless as possible (Passing over meaningful parameters, and providing return links). At the end of the day, it’s all about presenting powerful capabilities and better experiences to our end users.

Useful Resources

Salesforce1 Mobile Development Guide

https://developer.salesforce.com/docs/atlas.en-us.salesforce1.meta/salesforce1/

Salesforce1 Deep Link Schemes

https://resources.docs.salesforce.com/sfdc/pdf/salesforce1_url_schemes.pdf

Salesforce Mobile SDK

https://developer.salesforce.com/page/Mobile_SDK

Salesforce Mobile Packs

https://developer.salesforce.com/mobile/services/mobile-packs

Salesforce1 Style Guide

http://sfdc-styleguide.herokuapp.com/

Get the latest Salesforce Developer blog posts and podcast episodes via Slack or RSS.

Add to Slack Subscribe to RSS