Skip to main content

Salesforce Integration

LasoExperience sends events to your configured Salesforce endpoint via HTTP POST requests. This integration allows you to track user activities and personalize their experience through Salesforce.

Configuration Requirements

  • Endpoint URL: Your Salesforce endpoint URL must be configured in the LasoExperience dashboard
  • Authentication: Basic authentication using Key ID and Key Secret
  • Active Status: The configured webhook must be active

Event Structure

Integration with Salesforce is based on the Event API

Events are sent as JSON payloads, to Event API with the following structure:

{
"action": "event_name",
"source": {
"channel": "Web|Mobile",
"operatingSystem": "OS Name",
"operatingSystemVersion": "OS Version",
"device": "Device Info",
"urlReferrer": "Referrer URL",
"userAgent": "User Agent String",
"clientIp": "IP Address",
"locale": "en_US",
"pageType": "Page Type",
"url": "Page URL",
"contentZones": "Zone1,Zone2",
"time": "Timestamp",
"surveyId": "Survey ID",
"surveyStartTime": "Survey Start Time"
},
"user": {
"id": "user_id",
"attributes": {
"extUserId": "user_id",
"emailAddress": "user@example.com",
"phoneNumber": "phone_number",
"displayName": "User Name",
// Additional flattened properties with "lasoxp_" prefix
}
}
}

User Attribute Mapping

The following table shows how user attributes from LasoExperience are mapped to MCP attributes for Salesforce integration:

MCP AttributeCurrent Attribute Name
MailingCountrylasoxp_location_country
MailingPostalCodelasoxp_pmsData_originalData_ZipCode
MailingStatelasoxp_pmsData_originalData_State
MailingStreetlasoxp_pmsData_originalData_Street
MobilePhonelasoxp_pmsData_originalData_Phone
firstNamelasoxp_pmsData_originalData_FirstName

Note:
To ensure proper mapping and data synchronization, these MCP attributes must be created in Salesforce as custom user profile attributes.

Salesforce Admin Instructions:

  1. Refer to the official Salesforce guide for creating user profile attributes: Create User Profile Attributes in Salesforce.
  2. From the main navigation, select Settings | Attributes.
  3. On the User Attributes tab, click New Attribute.
  4. Enter a Name for the attribute (e.g., MailingCountry).
  5. Enter a Label that describes the attribute. The label appears in the Unified Customer Profile.
  6. Select the Type for the attribute (e.g., String)
  7. Repeat for each attribute in the table above.

Following the official Salesforce documentation ensures that incoming webhook data is correctly stored and visible within Salesforce user records.

Data Transformation

  1. All nested properties are flattened with a lasoxp_ prefix
  2. Empty and/or unknown values are removed
  3. Only string and number values are included
  4. Device metadata is automatically collected and included in the source object

Event Filtering

Events with names starting with error are not sent to Salesforce.

Example Events

Screen View Event

{
"action": "main_screenView",
"source": {
"channel": "Web",
"operatingSystem": "Mac OS",
"device": "Macintosh",
"locale": "en_US"
},
"user": {
"id": "user123",
"attributes": {
"extUserId": "user123",
"emailAddress": "user@example.com",
"lasoxp_path": "Home",
"lasoxp_sessionId": "session123",
"lasoxp_deviceMetadata_platform": "web",
"lasoxp_deviceMetadata_device_screenDimensions_resolution": "1920x1080"
}
}
}

Activity View Event

{
"action": "content_view_activity",
"source": {
"channel": "Web",
"operatingSystem": "macOS",
"operatingSystemVersion": "10.15.7",
"device": "Macintosh",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36",
"clientIp": "185.124.240.162",
"locale": "en_US",
"urlReferrer": "https://sunseeker.app.lasoxp.com/",
"time": "1744165699246"
},
"user": {
"id": "k5FwYMrLoUUIBPvESjKQ4eMY0Qk2",
"attributes": {
"extUserId": "k5FwYMrLoUUIBPvESjKQ4eMY0Qk2",
"emailAddress": "user@example.com",
"lasoxp_payload_refId": "c3b1b5f8-f673-4bae-9bdf-d68c6ddd001d",
"lasoxp_payload_reservationId": "20250804",
"lasoxp_payload_activity_id": "c3b1b5f8-f673-4bae-9bdf-d68c6ddd001d",
"lasoxp_payload_activity_title": "Grand View Spa",
"lasoxp_payload_activity_type": "Activity"
}
}
}

How Email Address Is Extracted and Mapped

The user's email address is extracted during the authentication process and mapped to the emailAddress field in Salesforce user attributes.

Extraction Process

  • When a user signs in, the authentication provider collects the user's email from the authentication service.
  • This email is then included in the user identification event payload.

Mapping to Salesforce

  • When sending user data to Salesforce, the extracted email address is mapped to the emailAddress field inside the user.attributes object in the event payload.
  • This ensures that the correct email is always available for user identification and communication in Salesforce.

Example Mapping:

"user": {
"attributes": {
"emailAddress": "user@example.com"
}
}

Note:
The emailAddress attribute in Salesforce must exist as a user profile attribute to properly receive and store this value. Refer to the User Attribute Mapping section above for setup instructions.

Best Practices

  1. Configure Properly: Ensure your Salesforce endpoint is properly configured with correct authentication
  2. Handle Rate Limits: Be aware of any rate limits on your Salesforce endpoint
  3. Data Privacy: Sensitive data are masked in the event payload