React when a page is visited

Custom field

The page that triggers the action can be saved directly in the automation conditions. However in this case we want to allow non-administrative users to flag specific visitors only. Since Send2CRM can compare visitor-related field values in conditions, we’ll add a custom field to the Lead. Salesforce users can set a text value in this field to flag when specific visitors have viewed a particular page.

Automation event

Create a Send2CRM automation that raises a platform event, and set the Tested Data Type to Event. Pick a suitable Name Value to identify the event later.

Conditions

Create two conditions for the automation.

  1. Event type = PAGE

  2. Match the Event raw data against the custom field added to the Lead:

Action

The automation above will raise a send2crm Automation Event platform event with the name PAGE_NOTIFY and the Send2CRM session event data when applicable.

Handle this with a Flow or Apex trigger to perform whatever action is desired, for example sending a notification. The full page URL is available from the event data using the Send2CRM Get field from event data action, and the visitor id is available directly from the platform event record.

More options

Instead of reacting to a PAGE session event, consider using custom events. This makes it easy to create matching conditions on the automation record, and allows sending custom data values with the session event object that can be accessed in Salesforce.