- 20 Aug 2025
- 5 Minutes To Read
- Print
- DarkLight
- PDF
Use Salesforce Lightning Objects for Whatfix Content Segmentation
- Updated On 20 Aug 2025
- 5 Minutes To Read
- Print
- DarkLight
- PDF
Whatfix enables content creators to configure segments on Whatfix using standard Salesforce Lightning user properties. Salesforce Lightning objects are properties that help Whatfix serve relevant content to Salesforce Lightning users based on existing Salesforce Lightning properties that help identify different users. Using Salesforce Lightning objects helps you easily show relevant content to your users.
- This configuration is not applicable for Salesforce Community users. To perform content segmentation on Salesforce Community, contact support@whatfix.com.
- Only an Account Manager in Whatfix and Admin in Salesforce Lightning can perform this task.
- To perform content segmentation using custom objects, see Integration Hub for Salesforce Lightning.
To know more about security and privacy-related information regarding this process, see FAQs.
Step 1: Enable App Integrations
To enable App Integrations, contact support@whatfix.com.
Step 2: Install the unmanaged package
On the Whatfix Guidance dashboard, click Settings.
Click Salesforce Integrations.
If you do not see Salesforce Integrations, contact support@whatfix.com.
Next to Salesforce Lightning, click Connect.
An email containing a link to install the unmanaged package that enables Salesforce Lightning integration is sent to your registered email address. Click the link and follow the onscreen instructions.
If you've missed, deleted, or someone else triggered the email, then you can use the following installation URL to install the Salesforce Lightning package. This is the same link that is shared in the email.
- Log in to Salesforce Lightning.
For your sandbox instance, as mentioned in the email, replace login.salesforce.com with test.salesforce.com in the URL.
Install the package and then refresh the App Integration page on Whatfix.
Log in to the Salesforce Lightning instance, select Install for All Users, and then click Install.
Go to Installed Packages to ensure that the Whatfix Salesforce Lightning Integration is installed.
- Whatfix relies on Salesforce objects for features such as content segmentation and locale detection. If a required Salesforce object such as
Profile Name
,User Locale
, orUser Role
is missing on a page, Whatfix waits up to 15 seconds before evaluating content and widgets. This delay affects when content and widgets display. To avoid this, ensure that the Salesforce managed package is integrated into every domain or page where Whatfix content depends on Salesforce objects.
- Use the browser console to check the values that can be used in the visibility rules.
The following are the objects that can be used to create Whatfix Segments:
Object Name | Values (example) | Description |
---|---|---|
Profile Name | “System Administrator” | The name of the profile. |
User Created Date | “Tue Jul 24 2018 16:36:53 GMT+0530 (India Standard Time)” | The date and time when the user was created in the system |
User Department | “Product” | The organizational department associated with the user. |
User Division | Has to be Set | The division associated with this user, similar to Department |
User Last Login | “Thu Apr 11 2019 11:44:39 GMT+0530 (India Standard Time)” | The date and time when the user last logged in. This value is updated if 60 seconds have elapsed since the user’s last login. |
User Locale | “en_US” | The locale associated with the user |
User Manager | Has to be Set | User lookup field used to select the user's manager. This establishes a hierarchical relationship, preventing you from selecting a user that directly or indirectly reports to themself. |
User Role | “CEO” | The company role associated with the User |
User Time Zone | “America/Los_Angeles” | The time zone associated with the User |
- To perform content segmentation using custom objects, see Integration Hub for Salesforce Lightning.
- In Whatfix, the list of Salesforce Lightning objects that can be used is displayed. Click the link under Status to see the list of objects.
Step 3: Configure Segments using Salesforce Lightning Objects
When using Salesforce Objects for segmentation or locale detection, ensure the Salesforce managed package is integrated into every domain or page where Whatfix content relies on these objects.
If the required object, for example, User Locale, is not available, locale detection waits up to 15 seconds before evaluating widgets, which can delay the display of Whatfix content. This applies to all applications with locale detection enabled.
Use the following steps to create new segments using Salesforce Lightning Objects:
On the Whatfix Guidance dashboard, click Widgets.
Click All widgets.
Click Create widget.
Click Self Help.
Enter the name of the new segment.
Click Add content.
Select the content to be displayed to the new segment.
Choose between the following options:
- Select From Library: Browse all the content in your Dashboard and select the content you want to add to the segment.
- Select by Tags: Combine tags to define the content that you want to add to your segment. Any content that has a valid set of tags is added to your segment.
Click Okay.
In Visibility Rules, select Salesforce Objects.
Set the desired Rule, Operator, and Value.
Click Save.
FAQs
1. What are Apex classes?
The Apex Class Salesforce LightningIntegrationController has a function that runs SOQL queries to get the User Profile or other data. The requested information is returned as a Map.
An example SOQL query is given below.
List<SObject> userinfo = [SELECT CreatedDate,UserRole.Name,LastLoginDate,LocaleSidKey,Manager.Name,TimeZoneSidKey,Department,Id,Division FROM User WHERE Id = :UserInfo.getUserId() LIMIT 1];
2. How does Whatfix access user profiles or any other objects?
Whatfix embeds the Component as an iframe and accesses the data from the iframe through Javascript.
3. Is the organization's data shared with other applications?
No, your data is not shared with any other third-party application.
4. What access permissions does the package have?
By default, the package has Read Access permission for Salesforce Lightning User and Profile objects. But you can make changes to the package to collect more information such as brand details, BU information, and more.
5. Are the data results stored on the client-side or server-side?
The results are not stored and are only available as a window variable (Browser level).
6. Does Whatfix archive any of the data?
No, the Whatfix package does not store any data.
7. Can a console query users other than the logged-in user?
No, it can't.
8. Can a console query be used to return any other object?
No, it can't.
9. Are there any non-client side calls being made with data coming from the JavaScript calls?
No.
10. What logs and audit info is available to ensure no unauthorized access has occurred?
None. Since Whatfix doesn't store or send any data to our servers, there are no logs around it.
11. What to do if the email with the link to install the unmanaged package is deleted or misplaced?
If you've missed, deleted, or someone else triggered the email, then you can use the following link to Install the Salesforce Lightning package.
https://whatfix-e-dev ed.lightning.force.com/packagingSetupUI/ipLanding.app?apvId=04t5j000000QELI
This is the same link that is shared in the email.