Contents
Overview
You may see behavior such as "After revisitng the Deal Management page, I still can't see the Negotiate Price Button." even after configuring DiscountVisibility records per Salesforce Profile.
In CloudSense Deal Management (for example, package version R37), profile-specific DiscountVisibility applies only when the Discount Configuration record’s Profile field (csdiscounts__Profile__c) contains the 18-character Salesforce Profile ID. Using a profile name/label (and/or populating a separate “User Profile Id” field) prevents the correct profile-specific configuration from being selected.
Solution
Issue
Symptom (verbatim): "After revisitng the Deal Management page, I still can't see the Negotiate Price Button."
Scenario: You configured DiscountVisibility in the Discount Configuration object to show/hide the Negotiate Price button per Salesforce Profile, but the UI does not change as expected.
Cause
Deal Management selects profile-specific Discount Configuration records by comparing the running user’s Salesforce ProfileId to the Discount Configuration record’s Profile field (csdiscounts__Profile__c).
- The Profile field must contain the 18-character Salesforce Profile ID (for example,
<profile_id>), not the profile name/label. - The separate “User Profile Id” field (if present on the record/page layout) is not used for profile matching in this behavior.
-
DiscountVisibilityis expected to be configured as:- One default
DiscountVisibilityrecord (Profile blank), plus - One
DiscountVisibilityrecord per Salesforce Profile that needs different behavior
- One default
Resolution
1) Confirm you have the correct record structure
- Default record: one
DiscountVisibilityrecord with Profile blank (applies to all profiles unless overridden). - Profile-specific record(s): exactly one
DiscountVisibilityrecord per target Salesforce Profile (do not create multipleDiscountVisibilityrows for the same profile expecting them to merge). - Value field: each record’s Value must contain the full JSON array of component visibility settings for that scope.
2) Populate the Profile field with the Salesforce Profile ID
- Open the Discount Configuration record where:
- Name (or configuration key) =
DiscountVisibility - Scope = the profile you want to control
- Name (or configuration key) =
- Set the record’s Profile field (
csdiscounts__Profile__c) to the target Salesforce ProfileId (18-character ID), for example<profile_id>. - Do not rely on any “User Profile Id” field for matching (it can be left blank unless your org uses it for a separate, custom purpose).
3) Set Negotiate visibility in the JSON payload
In the profile-specific record’s Value JSON array, ensure the Negotiate entry is present and set as needed (as strings):
Show Negotiate Price button:
{
"component": "Negotiate",
"isVisible": "true"
}
Hide Negotiate Price button:
{
"component": "Negotiate",
"isVisible": "false"
}
Note: Keep the rest of the JSON array intact (copy the full working default payload and change only what differs for that profile).
Validation (How to verify)
- Log in as a user whose Salesforce Profile matches the profile-specific
DiscountVisibilityrecord. - Open Deal Management (for example,
your_instance.domain.com) and navigate to the page where the product-level actions display. - Confirm the Negotiate Price button visibility matches the profile-specific JSON (
"true"shows it;"false"hides it). - Repeat for other profiles by creating one profile-specific
DiscountVisibilityrecord per profile, with the Profile field set to that profile’s ProfileId.
If it still doesn’t work
- Re-check that the Profile field contains the ID (18 characters), not the profile name.
- Confirm there is only one
DiscountVisibilityrecord for the tested profile. - Confirm the JSON entry uses the correct component name (
Negotiate) and uses string values"true"/"false".
Frequently Asked Questions
- 1. How can I tell this is the same issue?
- If you set the
DiscountVisibilityJSON for your profile (for example,{"component":"Negotiate","isVisible":"true"}) but the “Negotiate Price” button still doesn’t appear/disappear, and your Discount Configuration record’s Profile field contains a profile name instead of an 18-character Profile ID, you are likely affected. - 2. Can I have more than two DiscountVisibility records?
- Yes. You can have one default
DiscountVisibilityrecord (Profile blank) and then one profile-specific DiscountVisibility record per Salesforce Profile that requires different behavior. What is not supported is multipleDiscountVisibilityrecords for the same profile expecting them to combine. - 3. What value must be put into the Discount Configuration “Profile” field?
- The 18-character Salesforce Profile ID (for example,
<profile_id>). Using a profile label/name (for example, “System Administrator”) can prevent Deal Management from selecting that record for the user. - 4. What is the “User Profile Id” field on the record—should I populate it?
- For this behavior, the system matches using the Discount Configuration record’s Profile field (
csdiscounts__Profile__c). The “User Profile Id” field is not used for selecting the profile-specificDiscountVisibilitypayload in this scenario. - 5. How do I verify the fix worked?
- After updating the profile-specific
DiscountVisibilityrecord’s Profile field to the correct 18-character Profile ID and saving, log in as a user on that profile and reload Deal Management. The “Negotiate Price” button should now match theNegotiateentry in the JSON payload.
Matej Storga
Comments