Overview: In one of the recent projects, we had to extend Salesforce FSL mobile application to launch StoryPulse (http://storypulse.com) to capture few additional data points and signatures in the field. In this blog, I would like to explain a practical example to pass parameters from FSL to StoryPulse
Target Audience: CRM Engineers, Salesforce Administrators
Problem statement: FSL application is great for Field Service but it may not have some functionality that end-users are looking for. As an example, an FSL or a Field Trainer in the Med Tech industry may have to capture data through forms, train folks and capture signatures in the field. That module is available in StoryPulse and we had to follow Salesforce’s best practices to pass dynamic data from Field Service mobile app to StoryPulse and achieve the desired functionality. To enable this, we have created an app extension to pass the data dynamically from Field service mobile app to StoryPulse.
Prerequisites: The Field Service core features, managed package, and mobile app. Field Service mobile users need the Field Service Mobile user license to access the app.
Admins can create and modify app extensions through Field Service Mobile Settings. Field Service Mobile Settings supports the below app Extension types.
APP EXTENSION TYPES: Android, iOS, Lightning Apps, Web apps, Flow.
How to create a new App Extension?
- From Setup, enter Field Service Mobile Settings in the Quick Find box, then select Field Service Mobile Settings.
- Click Edit next to the mobile settings configuration that you want to create an app extension for.
- Under App Extensions, click Add.
- Fill out the fields.
- Field Service Mobile Settings: Automatically populated. Represents the current Mobile Field Service Settings configuration.
- Type: Select an iOS as type As StoryPulse is an iOS app.
- Label: The label as it appears to users in the app. Entered label as “Capture Attendees”
- Name: The extension’s name which we can identify in salesforce admin, Entered Name as “Capture Attendees” to identify easily.
- Scoped To Object Types: The records from which a user can activate an app extension. The object names are entered as comma-separated values and cannot include spaces. For example, In StoryPulse integration we have used Workorder and Service Appointment object, So enter Work Order, Service Appointment.
- Launch Value: A launch value of “https://google.com” will launch a web browser on both iOS and Android. The value to use to launch the app or Flow. To integrate with StoryPulse URL is “iAssessSalesRep://templateview/” and pass required data as parameter in the URL.
Note: The launch value supports static URLs for web addresses and dynamic values that can be used to pass contextual information to the other app in the form of tokens.
- Click Save.
Admins Can pass the data Dynamically at record level and Values that do not record level called global variables
Record Level Format: {!AccountId }, {!Id},{!AssetId}, {!WorkOrderNumber}
Global Variable Format: {!$User.email}, {!$User.Username}
URL Format: iAssessSalesRep://templateview/Account={!AccountId}&fromApp=FSL&objectType=account&flowName=ClinicalTraining&workOrderId={!Id}&assetId={!AssetId}&email= {!$User.email}
SUPPORTED GLOBAL VARIABLES:
- Organization.id,
- User.displayName,
- User.email,
- User.firstName,
- User.id,
- User.language*,
- User.lastName,
- User.locale*,
- User.nickName,
- User.orgId,
- User.userName
Once these parameters are set, a Field Service Engineer can launch StoryPulse and complete the required task.