SharinPix mobile App : Deeplink syntax

SharinPix uses deeplink to launch the SharinPix mobile app from other apps including Salesforce mobile app, Field Service Lightning app or any of your app.

Our deeplink URL starts with sharinpix:// in place of http:// and opens our mobile app when installed properly on the device system.

There are some features that work with URLs but not with the Deeplink URL, such as URL Buttons in Salesforce. You may then have an error like can't reach the server.

Syntax

The general form of the deeplink URL is:

sharinpix://<verb>?<parameter1>=<value1>&<parameter2>=<value2>&....


The URL support two verbs:

Upload : to run the SharinPix Mobile App in order to take/choose pictures to upload

View : to run the SharinPix Mobile App in order to access to images already taken on that device

Upload

To upload images, you should use upload as a verb.

In that case the URL will have the following syntax:

sharinpix://upload?token=<valuetoken>&<parameter1>=<value1>&<parameter2>=<value2>&....

The token provides SharinPix with the target of the upload. You can read here to learn more about how to generate a token.

This section lists the different parameters that can be used in the Deeplink URL.

mode

The parameter mode takes two values: 

  • camera - this mode opens the camera once the application is launched.
  • roll - this mode opens the roll/gallery of the mobile device once the application is launched.

roll

The parameter roll takes two values:

  • true  - this value allows the user to choose photos from the roll/gallery of the mobile device.
  • false - this value DOES NOT allow the user to choose from the roll/gallery of the mobile device.

confirmation

The parameter confirmation takes two values:

  • true -  this value previews the image on the display before uploading it.
  • false - this value DOES NOT preview an image on the display before uploading it.

tags

The tags  parameter takes a label as value(s) which will be then made available for selection in a menu. The user can then access the tag(s) from the menu to tag an image when using the SharinPix Mobile App URL Launcher. This tagging action is also available when clicking on a thumbnail.

  • The values are separated by the semicolon symbol “;”. 
  • If tags takes only one value, the semicolon can be omitted.
  • The figure below illustrates the result while accessing the Select Tags feature inside the SharinPix App.

auto_tags

The auto_tags parameter takes as value(s) a label that will be automatically assigned to all images in the SharinPix Album when the SharinPix Mobile App URL Launcher is used.

  • The values are separated by semicolon symbol “;”. 
  • If auto_tags takes only one value, the semicolon can be omitted.

default_tags

The default_tags parameter takes as value(s) a label that will be selected by default when the SharinPix URL Launcher is used.

  • The values are separated by semicolon symbol “;”. 
  • If default_tags takes only one value, the semicolon can be omitted.
  • The figure below illustrates the result obtained inside the SharinPix App when using the default_tags parameters in the Deeplink URL.
  • As depicted in the above figure, the tag Back is selected by default.

    Characteristics of parameter default_tags:

  • Tags are selected by default.
  • More than one tag can be selected by default.
  • Tags can be selected/deselected by the user.

Note:

The  semicolon symbol ";" is to be used to separate the values of the tags parameters as the previous separator (which was the vertical pipe "|") is raising errors on new iOS system versions.

IMPORTANT:  If tag values contain special characters (i.e characters that are not on this list: https://www.w3schools.com/charsets/ref_html_ascii.asp), you need to URL Encode those special characters. URL encoding means converting special characters into a format that can be transmitted over the Internet.

EXAMPLE: If you want to use "éssai" as a tag value, you need to URL encode it first as it contains the special character, "é". There is a handy tool that can be used to perform this: https://www.urlencoder.org/ .

checklist

The checklist option provides a list of tags ready to be filled with pictures. If a tag is associated with at least one picture, the associated tag turns from red to green. 

The checklist parameter takes a label as value(s) which represents all the tags that need to be filled with images.

  • The values are separated by the semicolon symbol “;”.
  • If the checklist is launched on a job for which some images have been provided already, the corresponding tags should reflect the existing images.

You will find more information about the different checklist configurations available in the following article:

http://docs.sharinpix.com/m/documentation/l/1126826-checklist

flash

The parameter flash takes two values:

  • true  - this value forces the flash to be on
  • false - this value forces the flash to be off

Without values, the flash is not available. You may use  the Native Camera App access (long click on the shoot button) if you want to modify the flash options from the UI.


scan

The scan option allows you to snap/scan documents/paperwork easily and conveniently.

The parameter scan takes two values:

  • true  - the document option is switched on by default
  • false - the document option is switched off by default

Without values, the scan option is not available.

You will discover more about the scan option by clicking on the following URL:

http://docs.sharinpix.com/m/documentation/l/890613-smart-document-scanning 

manual_jobs

The parameter manual_jobs permits the removal or addition of the + button from the SharinPix interface to give the ability (or remove the ability) to create jobs not yet related to a Salesforce record.

Using this with the value "false" will remove any access to the button which permits the creation of jobs for all future usages.

Using this with the value "true" will give back the button for all the future usages.

skip_job_assoc

The SharinPix mobile App permits to create manual jobs and associate them after creation.

In that case, you are prompted to reconnect a job created manually when it is detected.

To avoid the job association detection, you can use the skip_job_assoc parameter.

The parameter skip_job_assoc takes two values:

  • true  - the job association screen is never displayed.
  • false - the job association screen is displayed each time a manual created job is detected.

ret_url

The ret_url parameter takes as value a return URL. This parameter allows users to return to external apps such as Salesforce mobile app or Salesforce Field Service app or any website URL once images are submitted via the SharinPix app. 

The following example demonstrates how to make use of a deeplink to launch the SharinPix app, then return to a specific record within the Salesforce app once are submitted:

sharinpix://upload?token=<valuetoken>&ret_url=salesforce1://sObject/<recordID>/view

Tip:

For more information about the Salesforce mobile app URL schemes refer to the following article:

Salesforce Mobile App URL Schemes

SharinPix also includes some additional parameters that can be used along with the ret_url. These parameters are:

  • spMediaCount: which returns the number of images captured
  • spBatchState: which provides details on the state. The values available for this parameter are SUBMITTED, UPLOADING and UPLOADED
  • spBatchId: which returns the batch ID
  • spAlbumId: which returns the album ID

The following example demonstrates how to make use of the above parameters in a decoded return URL for the SFS app (without newlines or spaces):

com.salesforce.fieldservice://v1/sObject/spAlbumId/flow/TakeSurvey?imgCount=spMediaCount&state=spBatchState&batchId=spBatchId&albumId=spAlbumId

Note:

The return URL should be encoded when configured for the SFS mobile app. Here is an example of an encoded return URL (without newlines or spaces):

com.salesforce.fieldservice%3A%2F%2Fv1%2FsObject%2FspAlbumId%2Fflow%2FTakeSurvey

%3FimgCount%3DspMediaCount%26state%3DspBatchState%26batchId%3DspBatchId%26alb

umId%3DspAlbumId

For more information on how to configure the ret_url for usage within the SFS mobile app, refer to the following article:

Using deeplink to return to SFS (FSL) Flow with additional image information

await_upload

The await_upload parameter can be used to show the upload progress after submitting images captured using the SharinPix mobile app. The app will not automatically exit until the uploads are complete.

This parameter takes two values:

  • true: Used to show the image upload progress and wait for completion before exiting
  • false: Default behaviour - uploads will be done in the background

The following example depicts the image upload progress when the await_upload parameter is set to true:

The await_upload parameter can also be configured at the organization level. For more information on how to perform this configuration, refer to the following article:

Mobile App Global Configuration

view_album

To view images taken on that device and not deleted yet, you should use view_album as the verb.

In that case the URL will be as follows:

sharinpix://view_album?album_id=<recordID>

album_id

The parameter album_id permits to choose the SharinPix Album to be displayed when launching the SharinPix mobile App.

  • The AlbumID represents the record ID on which the album is hosted. It should be expressed in the 18 digits version.
  • If used in a formula, you should use CASESAFEID function to assume this value is 18 digit version.
  • If pictures was taken on another device the view_album will not show the pictures.
  • If pictures was taken since a too long time view_album will not show any pictures.

1 Comments

lexie green

Thanks for sharing such valuable content. Comparing to urlencoder.org, there is another great tool https://url-decode.com/. URL-decode has 100+ web utilities for the users. To provide more value, to the users.

Add your comment

E-Mail me when someone replies to this comment