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.
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
OCR (Optical character recognition)
Credit card reader (Square, etc)
Apple Health data
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?
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.)
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.
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.
Salesforce1 Mobile Development Guide
Salesforce1 Deep Link Schemes
Salesforce Mobile SDK
Salesforce Mobile Packs
Salesforce1 Style Guide