Transform your Customer Experience with Augmented Reality in Salesforce

Muralidhar Sampathirao
4 min readJan 30, 2020

3D and interactive knowledge articles, Virtual manuals for the Field Service Agents on field for quickly identifying the model — type — other configurations of the installed product that helps in finding and fixing the problem more easily, Equip the Health Cloud with Augmented Reality to empower the physicians with real-time analysis of three dimensional reports/anatomy, Creative 3D view and marketing of your real-estates for a realtime experience to your customers etc. These are just the tip of an iceberg for what can be achieved by Augmented Reality and Salesforce. So let us understand what is Augmented Reality a.k.a AR and how can it be made possible within Salesforce.

So What is AR?

Augmented Reality is a technology which augments layers of two or more objects (2D/3D) on top of the existing reality (as seen through a camera of device mostly mobile, tablet etc) that gives an impression as if its real and as it is actually happening. There are SDKs available to develop AR apps and these SDKs take care of rendering the objects on your camera screen by making necessary communications with the hardware of the device based on the operating system — Android, iOS etc.

Besides the in-house AR SDKs from Apple and Google following are some of the top SDKs and libraries available for AR. A detailed comparison of some these SDKs can be found here — an article by Elina Bessarabova

Adding AR to Salesforce can be done in 2 ways.

  1. Utilize one of the above SDKs along with Salesforce Mobile SDK and develop a custom app that can combine the power of Salesforce features and AR
  2. The one I have tried; utilize a framework that harness the combination of WebGL and WebRTC technology that adds native support to browsers for realizing AR. Before we look at sample VF code that uses similar framework — jsartoolkit, let us see a quick demo.

Quick Demo

In case the above Video isn’t working in your place below is a short GIF demo

The GIF is compressed to low-quality on purpose :)

AR SDKs

ARToolKit

ARToolKit is a software library for building AR applications

One of the key difficulties in developing any AR applications is the problem of tracking the users viewpoint that actually defines the perspective of the 3D object. In order to find this perspective, the application needs to know where the user is looking in the real world through the camera.

The ARToolKit video tracking libraries uses computer vision algorithms to calculate the real camera position and orientation relative to the physical markers in real time.

JSARToolKit

To avoid the dependency of installing a library for building AR applications I have used JSARToolKit which is a Javascript wrapper around ARToolKit. This library is also Marker based for the reasons explained above. Hence in the sample demo shown above, a Hiro card (which is nothing but a predefined marker image associated with a bitmap pattern) is to be shown to the Camera on top of which different 3D objects are rendered. The 3D objects are created using Three.js library — a sample of which we have seen in one of our previous article.

We can create our own custom markers with the image of our choice but more on that in the next article.

Visualforce Code

Code referred from example created by Lee Stemkoski. More details on Marker and a walk-through of code in upcoming article.

For the complete please refer the original article here.

Augmented Reality =/= Virtual Reality

The below graphics tries to create the line of difference between AR and VR. Despite of this difference most AR libraries can also be used to develop VR applications because the actual difference is just about whether a virtual object is felt in a real environment (AR) or a real person is felt in a virtual environment (VR).

Image Credit https://blog.vakoms.com/

Originally published at https://inteygrate.com on January 30, 2020.

--

--

Muralidhar Sampathirao

An Integration enthusiast connecting Salesforce to the world at https://inteygrate.com. Exploring, Adapting and Evolving with Blockchain | AI | Machine Learning