Pulsar SFS Lightning Bolt Menu Customizations

The Pulsar SFS Lightning Bolt Menu can be customized to contain a subset of the elements that would normally appear in the Salesforce SFS Mobile Application.

Pulsar Setting:

pulsar.fsl.layout.{object type}.{optional record type developer name}.lightningbolt.listitems

How to Target Your Setting:

Let’s start by talking about the arguments to the above setting. The object and optional record type above are used to determine which Pulsar SFS pages will have the following customization applied to their lightning bolt menu.

Each page in Pulsar SFS has a single primary object context. You can see what the primary context of a given page is by clicking the Lightning Bolt Menu button and observing the header of the modal pop up. If the header shows both a Service Appointment and Work Order/Work Order Line Item, then it is a Service Appointment Context.

Important: As shown above, the object context of pages opened from the calendar navigation displayed on the Schedule tab have ServiceAppointment as their primary object context. Referencing the WorkOrder or WorkOrderLineItem associated with this ServiceAppointment can be achieved through how the setting is written.

There is a special value for the object type, Global. This object context applies to many pages that do not derive their data from a specific object. The root page of each of the Pulsar SFS tabs has a Global context.

The Lightning Bolt Menu that can be optionally displayed on Global pages can be customized in exactly the same way with a few caveats. Use “Global” for object type and do not provide a record type. Additionally only Quick Actions from the Global layout will be available when filtering this list.

How to Write Your Setting:

The value of this setting should be valid PSL (https://luminix.atlassian.net/wiki/spaces/PD/pages/10158082) and should result in a SetResult PSL Action that sets the result value to a string in the expected format.

DEFAULT{ Action=SetVar; VarName=AlternateFlowLabel; VarValue="..."; | Action=SetResult; Result=parent : qa : WorkOrder.FSL__NewEvent flow : Action_Test default custom : Asset Hierarchy : 0696A000005YLUL flow : Mobile_Survey : %%AlternateFlowLabel%% link : your_app_extension_name }

Each row defines an entry or set of entries that we would like to have displayed in the lightning bolt menu for a particular object type. As mentioned above, these entries are limited to the set of entries that Salesforce considers accessible to a given object.

Lightning bolt list items in Pulsar SFS and Salesforce SFS Mobile may contain more items that are not displayed in the app menu when you click on it. See Quick actions and Flows in SFS for information regarding which items are available.

The filter can not display lightning items (quick actions or flows) that would not be normally be present on the object type / record type pair.

There are six entry types that are valid for the result string: default, qa, flow, parent, custom, link.

default – The default option will insert all lightning bolt menu items that would appear normally had you not used this setting. This provides a way to modify the default list without reconstructing all the elements as well as use the default list as a fail safe in your PSL code. When used with other qa, flow, or parent entries you may have duplicate items in your resulting Lightning Bolt menu.

qa – The qa option will insert a single quick action defined on the primary object context. The value following the colon is the quickActionName which determines the quick action that will be displayed. If the quick action is invalid for that context, no lightning bolt menu item will be displayed for this entry.

flow – The flow option will insert a single flow defined on the primary object context. This behaves exactly as the qa option defined above. Flows are defined by the launchValue by placing it after a colon in the entry. The optional 3rd parameter, if defined, will be used as the menu item label value.

parent – The parent option will insert a single quick action defined on the parent of the primary object context. The value following the colon in the entry determines if we want to display a quick action (qa) or flow (flow). A second colon allows us to specify the quickActionName or launchValue. If the quick action is invalid for that parent context, no lightning bolt menu item will be displayed for this entry.

custom – The custom option will insert a link to launch a custom document. The first value after the colon is the label you wish to display on the lightning bolt menu. The second value is the ContentDocument Id.

link – The link option will insert a link to launch a URI defined in Field Service Mobile Settings > App Extensions. The value after the colon is the App Extension Name you defined.

Filtering based on screens:

This change allows the admin to set restrictions on where inside of the Pulsar app the particular lightning bolt menu items will appear. One of the following three options may be pre-pended to any of the lines in the PSL SetResult action:

all - this is the default screen context- It is equivalent to the behavior when not explicitly specifying a screen context. (The lightning bolt menu item will appear in both Pulsar object detail screens and on screens within Pulsar SFS)

record - This specifies that the lightning bolt menu item should only display on Pulsar object detail screens (or the “Global” lightning bolt menu, if applicable).

fsl - This specifies that the lightning bolt menu item should only display on screens inside of Pulsar SFS (Overview and Service Appointment schedule screen lightning bolt menus)

The following is a modification to the setting described above:

DEFAULT{ Action=SetVar; VarName=AlternateFlowLabel; VarValue="..."; | Action=SetResult; Result=fsl : parent : qa : WorkOrder.FSL__NewEvent all : flow : Action_Test fsl : default custom : Asset Hierarchy : 0696A000005YLUL flow : Mobile_Survey : %%AlternateFlowLabel%% record : link : your_app_extension_name }

This example, when scoped to a ServiceAppointment, has the following effects when the lightning bolt menu is opened:

  1. “NewEvent” Quick Action will display ONLY in the lightning bolt menu within Pulsar SFS

  2. “Action_Test” flow will display BOTH in the lightning bolt menu on the Pulsar ServiceAppointment detail page and within Pulsar SFS (specified explicitly here).

  3. The “default” set of QuickActions and Flows will display starting after the “Action_Test” item ONLY on the lightning bolt menu within Pulsar SFS

  4. “Asset Hierarchy” HTML item will display BOTH in the lightning bolt menu on the Pulsar ServiceAppointment detail page and within Pulsar SFS (default behavior- “all” is not explicitly specified)

  5. “Mobile_Survey” Flow will display BOTH in the lightning bolt menu on the Pulsar ServiceAppointment detail page and within Pulsar SFS (default behavior- “all” is not explicitly specified)

  6. The link specified in the app extension your_app_extension_name will appear ONLY in the lightning bolt menu on the Pulsar ServiceAppointment detail page.