Capturing User and Account Attributes

The onActionEvent method captures user and account attributes to add user data to an event before sending it to Personalization. For more information on the user and account objects, see the user object and the account object documentation.

Profile Objects can only be added or updated via ETL. For more information on adding or updating Profile Objects, see Create a User Profile Object.

The following is an example of the onActionEvent method used in the global configuration.

  • SalesforceInteractions namespace

  • Evergage namespace

The following is an example of the onActionEvent method used in the pageTypes configuration.

  • SalesforceInteractions namespace

  • Evergage namespace

In the following code sample, the onActionEvent method is used in the global configuration. It listens on every page for a form in the footer to be submitted. It then sends an event containing the user's ID and captures the user's email address, which you can then configure for use as an identity. To know more about using captured data as an ID, see the Event API documentation.

  • SalesforceInteractions namespace

  • Evergage namespace

The following example shows a listener in the pageTypes configuration. You can see that the event's structure is the same as the structure of the event sent by the listener in the global configuration in the previous example.

  • SalesforceInteractions namespace

  • Evergage namespace

Capturing account attributes works the same way as capturing user attributes. For the full structure of the account object, see the account object documentation.

  • SalesforceInteractions namespace

  • Evergage namespace