SharinPix DocumentationMain Documentation SharinPix features - main integrationIntegration of SharinPix App with SFS (FSL) App using App Extension

Integration of SharinPix App with SFS (FSL) App using App Extension

Information:

Salesforce Field Service (SFS) was formerly known as Field Service Lightning (FSL).

Assumptions:

  • The Work Order object will be used throughout this article.
  • The WorkOrder object has a custom field named SharinPix_Token__c that holds a token. If you haven't implemented this yet, refer to the article SharinPix automatic token generation to generate the token.

One method used to launch the SharinPix App from the SFS App is by creating an App Extension. The latter can be used to embed a deeplink URL referring to a location on the SharinPix App where the images will be uploaded.

In this article, you will learn how the SharinPix deeplink URL is integrated in the SFS mobile App using the SFS App Extension.

Creation of the App Extension

An App Extension permits the user to quickly access the SharinPix app. In this section, we will create an App Extension that will launch the SharinPix app from the SFS app.

  • Go to Setup then type Field Service Mobile Settings in the Quick Find box. Click on Field Service Mobile Settings.
  • Click on the Field Service Mobile Settings item (Or any settings relevant to your Organization).
  • Scroll down towards App Extensions Section.
  • Click on Add. You will be prompted with the screen below:
  • For the Field Service Mobile Settings, select the relevant record to your Organization. In our case it is Field Service Mobile Settings.
  • For the Type, select Android if you intent to use the App Extension on Android platforms or select iOS if you intent to use on iOS platforms.
  • For the Launch Value, enter the following SharinPix Deeplink URL for Android platforms:
sharinpix://upload?token={!SharinPix_Token__c}

Or use the following SharinPix Deeplink URL if you intent to use the App Extension on iOS platforms:

sharinpix://upload?token={!$SharinPix_Token__c}
  • For the field Label, enter Take Pictures
  • For the field Name, enter SharinPix Native Url
  • For the field Scoped To Object Types, enter WorkOrder
  • Click on Save

Note:

An App Extension is only visible on the record page of its associated object. You should always ensure that you entered the correct object API name when creating the App Extension. 

For example, suppose you are creating an App Extension for the Work Order object, the API name entered in the field Scoped To Object Types should be WorkOrder.

If you are using a custom object named MyVisitObject, having MyVisitObject__c as  API name you should enter MyVisitObject__c in the Scoped To Object Types field. 

Tips:

sharinpix://upload refers to the URL that will launch the SharinPix Mobile App. SharinPix_Token__c refers to the custom field containing the SharinPix token value defined in the previous sections. 

You can also use the sharinpix://view to launch the SharinPix Mobile App in order to view all the pictures already taken by this device and check the status of the upload.

Make sure you are using the right URL for the right action you want to achieve. 

sharinpix://upload is meant to upload images while sharinpix://view is only meant to view the images of an album.

For more information about the URL syntax, refer to the article that follows:

SharinPix mobile App : deeplink syntax

For an example of using sharinpix://view check this chapter below

Creation of an App Extension embedding a Field Service Mobile Flow

You can also use App Extensions to launch Field Service Mobile Flows from the SFS app. 

To do so, you simply need to select Flow as the Type and use the Flow's API name as the Launch Value in the App Extension detail page as demonstrated below:

Tip:

To learn how to integrate the SharinPix App with SFS using Flows, refer to the following article:

Integration of SharinPix App with SFS (FSL) App using Flows

Launching the SharinPix App

Note:

App Extensions are cached on the Salesforce Field Service mobile app. Therefore, it may happen that changes made to App Extensions are not applied instantly on devices. To ensure that the changes are applied, you can clear the cache on the SFS app as follows:

On the SFS app, go to ProfileSettingsAdvanced SettingsClear Cached Metadata

If the changes made to the App Extension are still unavailable after clearing the cache, try logging out and back in the SFS app to force a refresh.

You can now launch the SharinPix app from SFS.

  • Open the SFS app.
  • Choose the Service Appointment record of a WorkOrder record.
  • Select Show Actions.
  • Select Take Pictures. This option refers to the newly-created App Extension. 
  • You will then be directed to the SharinPix app.

Using an App Extension to view pictures

Using the same steps, you can also setup an App Extension to view pictures taken on this device for a specific record. 

Those pictures are held a few days (depending on the configuration) on the mobile App after it has been uploaded to Salesforce.

You can create for this a "View Pictures" App Extension with the current values:

  • For the Type, select Android if you intent to use the App Extension on Android platforms or select iOS if you intent to use iOS platforms.
  • For the Launch Value, enter the following SharinPix View Images Deeplink URL for Android platforms:
sharinpix://view_album?album_id={!Id}
  • For the Launch Value, enter the following SharinPix View Images Deeplink URL for iOS platforms:
sharinpix://view_album?album_id={!$Id}

Using this you will have a View Pictures command in the bolt menu to access all the pictures taken for a specific record from FSL.

Using an App Extension to view pictures in Salesforce mobile App

If you need to access to images stored in a record by another user, you should rely on a deeplink URL to Salesforce mobile App and add an App Extension to open it on a specific record. 

You can create for this a "View ONLINE Pictures" App Extension with the current values:

  • For the Type, select Android if you intent to use the App Extension on Android platforms or select iOS if you intent to use iOS platforms.
  • For the Launch Value, enter the following SharinPix View Images Deeplink URL for Android platforms:
salesforce1://sObject/{!Id}/view
  • For the Launch Value, enter the following SharinPix View Images Deeplink URL for iOS platforms:
salesforce1://sObject/{!$Id}/view

Tips:

  • For more information about deeplink on Saleforce mobile App you can check this Salesforce documentation:

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


  • SharinPix Images can also be added to SFS Service Reports. How more information about how this is done, please refer to the following article:

   Display Images in Service Report (Salesforce Field Service / FSL)

0 Comments

Add your comment

E-Mail me when someone replies to this comment