Available in: Axsy Retail Execution


The main Visit list within the Axsy Mobile App can be configured to include both the Visits where the logged in user is the primary visitor, as well as Visits where the logged in user is a secondary visitor. As a secondary visitor, the user is able to perform Visit Execution and complete Visit Tasks in the same manner as when they are the primary visitor.



Required Salesforce Permissions

For a secondary visitor to be able to execute a Visit, you must ensure that they have access to the appropriate Visit records via Salesforce Sharing Rules. In other words, they must have read and write access to Visit records even when they are not the owner of the Visit or the primary visitor.



Sync Configuration for Including the Additional Visits

The default sync configuration for Visits that comes out-of-the-box with the Axsy Managed Package only syncs Visits where the user is the primary visitor. To also sync Visits where they are a secondary visitor, the default sync configuration needs to be updated. The following is just one example of how to do this - the steps can be adjusted, e.g. adding additional conditions on Visit Status, as needed:

  1. Under the existing Visits Record Set which is pre-configured out-of-the-box, add a new Query Chain, e.g. "Secondary Visits".
  2. Configure this "Secondary Visits" query chain to have 5 conditions, with the following as the first condition: Id IN SELECT VisitId FROM Visitor WHERE AssigneeId = '%userId%'
  3. Configure conditions 2 through 4 to to be the same conditions 2 through 4 as the out-of-the-box "Scheduled Visits" query chain.
  4. Use the following filter logic for the "Secondary Visits" query chain, which is the same logic as the out-of-the-box "Scheduled Visits" query chain: 1  AND ((2 AND 3) OR (4 AND 5))
  5. Save the updated Sync Scope.
  6. Navigate to the Visit Record Set's Related Objects tab and ensure that the Visitor Object is selected in the tree.


Figure 1 - Example query chain to sync Visits where the user is a secondary visitor



Distinguishing When the User is Primary vs. Secondary Visitor

With the above updated sync configuration, the main Visit list within the mobile app will show both Visits where the user is the primary visitor as well as Visits where the user is a secondary visitor. To distinguish between the two, the fields displayed for each Visit in the list can be configured to include custom fields which contain information about the assigned visitor(s). 


Please see this article for more information on how to configure which fields are displayed for each Visit: Configurable Fields for the Visit List for Retail Execution



Figure 2 - Visit List showing Visits where the user is a primary and secondary visitor