Skip to main content
Featured group

* Sales Cloud - Best Practices *

Welcome! This group is dedicated to your continued success with Sales Cloud products. Join the conversation here to ask questions, get answers, learn best practices, and share experiences as you continue your journey. --------------------------------------- This group is maintained and moderated by Salesforce employees. The content received in this group falls under the official Forward-Looking Statement: http://investor.salesforce.com/about-us/investor/forward-looking-statements/default.aspx

We are using a Territory Model in our Salesforce org. As part of this setup, we have made Country and State mandatory on Account.

Since Address is a compound field, we cannot directly make Country and State individually required using standard field-level required settings. Therefore, we implemented validation rules on the Account object to enforce these requirements.

🔹 Current Implementation

We have separate validation rules on Account such as:

  •  Billing Country required 
  •  Billing State required (based on selected countries) 

These rules ensure data quality for the territory assignment logic.

🔹 Issue During Lead Conversion

During Lead Conversion, these Account validation rules are firing and blocking the conversion.

However, the problem is:

  •  Each validation rule fires separately 
  •  Users receive multiple step-by-step errors (Country first, then State, etc.) 
  •  This creates a poor user experience during conversion 

🔹 Our Attempted Solution

To improve the user experience, we implemented a before-save Lead Record-Triggered Flow to:

  •  Detect missing required fields 
  •  Group all missing field errors 
  •  Show a single consolidated custom error message using Flow error handling 

🔹 Problem We Are Facing

Even after implementing the Flow-based custom error handling:

  •  Account validation rules are still firing first during Lead conversion 
  •  The validation rule error appears before the Flow custom error message
  •  As a result, users do not see the consolidated error message we intended 

🔹 Expected Behavior

We want the system to:

  1.  Validate missing Country/State in a grouped way (preferred UX) 
  2.  Show a single consolidated error message (via Flow or custom logic) 
  3.  Avoid multiple validation rule errors during Lead conversion 
  4.  Ensure smooth Lead → Account conversion experience 

🔹 Question / Help Needed

Is there a better approach to:

  •  Enforce required Country and State on Account without relying heavily on validation rules? 
  •  OR control the execution order so Flow-based validation is shown before Account validation rules during Lead conversion? 
  •  OR design a best practice pattern for handling required Address fields in Territory-based implementations?

@* Sales Cloud - Best Practices * 

2 answers
  1. Jun 15, 5:49 PM

    Hi @Manthan Ghorpade - @Abaid Ur Rehman is correct that you can't override validation rule execution order during Lead conversion. But there's a cleaner architectural solution he didn't mention: 

     

    The Best Practice: Consolidate into One Validation Rule

    Instead of separate rules for Country and State, merge them into a single validation rule that catches all missing address fields and returns one error message:

    AND(    ISPICKVAL(RecordType.Name, "Your Record Type"),    OR(        ISBLANK(BillingCountry),        ISBLANK(BillingState)    ))

    Error message:

    "Billing Country and State are required for Territory assignment. Please complete both fields before saving."

    One rule = one error = clean UX during Lead conversion. 

     

    Prevent at Lead Level (Cleanest Long-Term Fix)

    Add validation on the Lead object itself before conversion is even attempted:

    AND(    ISBLANK(Country),    ISBLANK(State))

    Error: "Country and State are required before converting this Lead."

    This stops the user at the Lead record — before conversion triggers Account validation entirely. 

     

    For Territory Model specifically:

     This is actually the recommended Salesforce pattern — enforce address completeness at the Lead stage so Territory assignment on the resulting Account never fails downstream. 

     

    Your Flow-based approach was architecturally sound but Lead conversion's execution order makes it unwinnable — the validation rule always fires first on the target object. 

     

    If this helps, please mark as Best Answer!

0/9000
U k asked in #Sales Cloud

We are creating and managing campaigns in Salesforce Sales Cloud, and those campaigns are being synchronized to Salesforce Marketing Cloud Engagement.

We have also installed a Salesforce Labs package in Marketing Cloud that captures incoming leads from Meta (Facebook/Instagram Lead Ads) and Google lead sources. These leads are automatically landing in Marketing Cloud along with source-level information.

Current Issue:  For leads coming from Meta, the payload includes a Meta Campaign ID (the original campaign identifier from Meta Ads). However, we want these leads to be associated with the corresponding Sales Cloud Campaign that was created and synced to Marketing Cloud, rather than relying only on the Meta Campaign ID Because in the end the meta leads are pushed back in the sales cloud and added as campaign member to respective campaigns. Can anyone guide on how to achieve this ?    @* Sales Cloud - Best Practices * 

2 answers
  1. Yesterday, 6:07 AM

    Hi @U k -  good setup description, makes the problem clear.  

     

    The core challenge here is mapping the Meta Campaign ID to the correct Sales Cloud Campaign ID

     before or during the lead push-back process. Here are your options cleanest to most complex:  

     

    Option 1 — Custom Field Mapping (Simplest, Recommended First) 

    Add a custom field Meta_Campaign_ID__c on the Salesforce Campaign object. When creating campaigns in Sales Cloud that correspond to Meta campaigns, store the Meta Campaign ID in this field manually or via import. 

    Then in Marketing Cloud, when the Meta lead arrives with the Meta Campaign ID in the payload: 

    • Use a Journey Builder Decision Split or Automation Studio Query Activity to look up the Sales Cloud Campaign where Meta_Campaign_ID__c matches the incoming payload value
    • Pass the matched CampaignId when pushing the lead back to Sales Cloud as a CampaignMember

     

    Option 2 — Marketing Cloud Connect + AMPscript Lookup

    In your lead capture email or landing page process, use AMPscript to query the Sales Cloud Campaign object: 

     

    VAR @metaCampaignId, @sfCampaignIdSET @metaCampaignId = AttributeValue("Meta_Campaign_ID")SET @sfCampaignId = Lookup(  "Sales_Cloud_Campaigns_DE",  "CampaignId",  "Meta_Campaign_ID__c", @metaCampaignId)

      

    Where Sales_Cloud_Campaigns_DE is a synchronized Data Extension from Sales Cloud Campaign object via Marketing Cloud Connect. 

      

    Option 3 — Automation Studio Query to Auto-Assign

    If leads land in a Marketing Cloud Data Extension first, run a nightly or real-time SQL query to join on Meta Campaign ID and stamp the correct Sales Cloud Campaign ID before the lead is pushed back:

    SELECT     l.SubscriberKey,    l.Email,    l.Meta_Campaign_ID,    c.CampaignIdFROM Lead_Capture_DE lJOIN SF_Campaign_Sync_DE c     ON l.Meta_Campaign_ID = c.Meta_Campaign_ID__c

      

    Then use this output DE as the source for your Sales Cloud lead push. 

      

    My Recommendation for your architecture:

    Option 1 + Option 3 combined is the most maintainable. The custom field on Campaign is the single source of truth. The query auto-resolves the mapping without manual intervention per lead. 

      

    One thing to validate — confirm your Salesforce Labs Meta connector payload field names so the Meta Campaign ID is consistently available in the DE before building the join logic. 

      

    If this helps, please mark as Best Answer!

0/9000

Hi all,

I am on my search of a good data quality tool which should not be expensive.

Which data quality tool would you recommend from your experience?.

 

#Sales Cloud  #Integration  #Data Management

5 answers
  1. Ajaypreet Singh Saini (Grantbook) Forum Ambassador
    Feb 15, 2024, 5:46 PM

    Hey @Lena Wong, have you tried Salesforce optimizer and Health Check tools in salesforce?

     

    https://www.salesforceben.com/salesforce-health-check/

    https://www.apexhours.com/salesforce-health-check/

0/9000

🎉 Big shoutout to our incredible Forum Ambassador, @Sushil Kumar for an awesome deep dive on "Add Custom Link to Lightning App Record Page"!📘 Check out the article here >> https://help.salesforce.com/s/articleView?id=005336072&type=1 

 

🔍 Found it helpful? Have thoughts to share?

 Let us know by clicking the "Yes" or "No"  button at the bottom of the article—your feedback helps us improve!🎉 Big shoutout to our incredible Forum Ambassador, for an awesome deep dive on> 🔍 Found it helpful?" style="display: block;" />

 

#Reports & Dashboards

4 comments
0/9000

Field Integrity Exception Error When Editing Opportunity Records in a Refreshed Partial Copy Sandbox

 

Environment:

 Partial Copy Sandbox (recently refreshed) 

 

Issue Description:

 

After refreshing a Partial Copy sandbox, when attempting to edit any field on existing Opportunity records, the following error appears: 

 

field integrity exception: unknown (006U000000WzvnS|1||3459||4,) 

 

Observations:

 

The error occurs when trying to edit any field on the Opportunity record — not just a specific one. 

 

The numeric value 3459 in the error message corresponds to the Amount field on the Opportunity. 

 

The alphanumeric value (006U000000WzvnS) appears to be a Salesforce Record ID that likely belongs to a related record (e.g., a custom lookup, Quote, Contract, or other object). 

 

The issue occurs consistently across multiple Opportunity records in the refreshed sandbox. 

 

The error does not occur when simply viewing the records — only when attempting to edit and save. 

 

Root Cause Suspected: 

 

During the Partial Copy sandbox refresh process, some Opportunity records were copied from Production, but the related records they reference (via lookup fields) were not included in the sample. This results in orphaned or broken lookup (specifically 'opportunity line items')references. When an edit is attempted, Salesforce validates these hidden references and throws a FIELD_INTEGRITY_EXCEPTION.  

 

How to resolve this issue?. Other than deleting all opportunities and importing some of the opportunities from production along with the related products (opportunity line items).

 

@* Sales Cloud - Best Practices *  @* Sales Cloud - Getting Started * 

2 answers
  1. Yesterday, 6:04 AM

    Hi @Naveenakumar Panchyal - great diagnosis on the root cause. @Kundan Kumar Jha's answer covers the fix well. One addition directly addressing your constraint:  

     

    If you want to avoid deleting OR remapping line items, there's a quicker sandbox-specific workaround:  

     

    Option 4 — Enable the Standard Pricebook in Sandbox + Re-sync via Apex 

    // Run in Anonymous Apex to identify broken OLIsList<OpportunityLineItem> brokenOLIs = [    SELECT Id, PricebookEntryId, Product2Id     FROM OpportunityLineItem     WHERE PricebookEntry.IsActive = false     OR PricebookEntryId = null];System.debug('Broken OLI count: ' + brokenOLIs.size());

      

    This tells you exactly how many records are affected before you touch anything. 

      

    Then match to active sandbox PricebookEntries by Product2Id and bulk update via Data Loader — no deletions needed. 

      

    Root cause reminder for future refreshes:

     When refreshing a Partial Copy sandbox, always include PricebookEntry and Product2 in your sandbox template object selection. This prevents orphaned line items entirely. 

      

    If this helps, please mark as Best Answer!

0/9000

I am looking into creating a custom field that records the last activity of the opportunity owner.   This will be limited to activity for the oppo owner and would overcome the issue of events with future start dates being recorded as the last activity (as seen in the standard last activity field).    My original plan depended on being able to add a custom field to the event object that recorded whether the event start date was overdue by one day. I would use this in entry requirements of a scheduled flow to review the activity on a daily basis and update a custom field on the oppo - Last Activity of Opportunity Owner.     > I cannot add new fields to either event or task object.   > I cannot reference the event start date time in a formula for a flows entry requirements.  > The standard value fields for flow entry requirements does not support a formula variable - only allows to enter dd/mm/yyyy hh:mm    I think I would also need other supporting flows that also trigger on create, edit and delete of all activities. This part seems relatively straight forward as long as I can somehow limit the number of activities being reviewed by the flow every time someone creates an activity.     What are peoples usual solutions to this issue of the last activity date being inaccurate due to future events being used in the calculation?    @* Sales Cloud - Best Practices * 

5 answers
  1. Yesterday, 5:54 AM

    Hi @Charlie Kaye — you've identified the exact gap in both suggestions above.  

     

    You're right. If the Event record isn't updated, nothing triggers the Flow or Apex. This is the core problem with future events silently becoming "past" — there's no DML event to hook into.

      

    The clean solution is a two-part approach:  

     

    Part 1 — Record-Triggered Flow (handles real-time changes)

     Fires on Task/Event create/update/delete. Decision element checks ActivityDate <= TODAY() AND OwnerId = Opportunity.OwnerId. Updates custom Last_Owner_Activity__c field on Opportunity. This covers 90% of your scenarios.  

     

    Part 2 — Scheduled Flow (handles the midnight gap)

     Runs daily. Queries Activities where ActivityDate = YESTERDAY and OwnerId = Opportunity.OwnerId. Updates the custom field only if this date is more recent than the current stored value. 

    This is the only fully native solution to the "future event crosses midnight" problem without custom fields on Event. 

     

    If you can use Apex, a single @Schedulable class running nightly is cleaner and more governor-limit-safe than a Scheduled Flow querying large activity datasets. 

     

     Happy to share the exact Flow configuration or Apex pattern if useful. 

     

    If this helps, please mark as Best Answer!

0/9000

Hello everyone,

We are currently working on optimizing our sales process in Salesforce and are encountering some challenges. Our sales team follows an account-based approach, meaning each sales rep manages a fixed portfolio of accounts and actively searches for the right contacts—whether they already exist in the CRM, via Google, or through LinkedIn.

In our previous CRM, all contacts were directly linked to the respective company. However, it was difficult to clearly differentiate their status (e.g., unqualified, contacted, qualified, engaged in a business relationship, already had an opportunity, or even purchased).

When implementing Salesforce, we decided to follow the classic distinction between Leads (no opportunity yet) and Contacts (starting from the first opportunity). To maintain the connection to the account, we linked the Account via a Related List to the Lead.

Now that we have been using this setup for a while, some challenges have emerged:

  • Activities on a Lead are not visible on the Account, making tracking difficult.
  • Lead import via LinkedIn Sales Navigator does not work because we have made the related Account a mandatory field.
  • Reporting is complicated, as we either report on Leads or on Contacts, but not both together.

Does anyone have experience with this setup or a recommendation on how to best structure account-based sales in Salesforce? How can we efficiently manage Leads and Contacts without losing visibility of activities at the account level?

We would really appreciate any insights, best practices, or practical solutions!

Thanks in advance! 

Birgit 

@* Sales Cloud - Best Practices * 

3 answers
  1. Jun 11, 6:21 PM

    Hello,  

     

    I think you are running into some of these challenges because Salesforce's standard lead model wasn't really designed around a pure account-based sales motion. 

     

    If your reps are prospecting within known target accounts, I'd be hesitant to make the Account relationship mandatory on the Lead object. That's where a lot of reporting and visibility issues start to appear in day-to-day operations. 

     

    From my experience, there are two options. Either keep leads completely separate until they are qualified and ready for conversion or go all-in on an Account → Contact model if your sales team is already working from assigned accounts. 

     

    If you want to keep the Lead process, a tool like LeadAngel or LeanData can help bridge the gap. It automatically matches Leads to existing Accounts and routes them to the right account owner, so reps don't have to manually figure out who owns what. It won't change Salesforce's native behavior around Lead activities, but it does make account-based prospecting much easier to manage. 

     

    Personally, I'd first revisit whether those records should be Leads at all. Your team already knows which accounts they're targeting, and that's usually a sign that Contacts tied directly to Accounts may be a better fit. The reporting becomes cleaner, LinkedIn workflows are simpler, and account-level visibility is much easier to maintain. 

     

    Just my two cents—I've seen a lot of teams try to force account-based selling into a lead-centric process and end up fighting Salesforce more than they need to.

0/9000

Hello all,    I am going to start using projects. In our projects we have related lists of Opportunity & Campaigns.  We also have an activity feed. Is there an easy way to add list emails as activity in the project?    I would only want to track that it's there was an email sent out. I know it tracks in the contact activity but I don't want each individual one as an activity.    I would love to connect the list email to the project, but I know I can't do that.     If I can't do that I would love to be able to create an "activity" report that tracks list emails singularly to the campaign it was a part of.    Does any of this make sense?  Thanks in advance.    

@* Sales Cloud - Best Practices * 

5 answers
  1. Jun 5, 8:30 PM

    No, you can’t directly add List Emails as a single activity on a Project in Salesforce. List Emails are tracked at the recipient level, not as one grouped activity. 

    Best options: 

    •  Use Campaign as the main container (best native approach) 
    •  Build a report on Campaign + Email Activities and group it to see sends in a summarized way 
    •  If you really need “one email = one activity”, you’ll need a custom object with Flow to log each send 

    That’s basically the limitation and your practical options. 

     

0/9000

*** Update: Revised Enforcement Dates for Step-up Authentication Upcoming Security Mandate ****** Update: Revised Enforcement Dates for Step-up Authentication Upcoming Security Mandate ***The enforcement dates for Time-Based Step-Up Authentication for Report Actions have shifted due to issuesThe enforcement dates for Time-Based Step-Up Authentication for Report Actions

have shifted due to issues discovered during testing. Fixes are targeted for the 262.8/9 release. 

 

Updated Enforcement Schedule (All Orgs):

 

Step-up Auth: Report Export (SLP — Time-Based)

  • Available for Customers — Sandboxes: May 27 – Jun 3 (unchanged)
  • Available for Customers — Production: May 27 – Jun 14 (unchanged)
  • Enforcement — All Sandboxes: NEW confirmed dates Jun 17 to June 24 [moved from starting June 3]
  • Enforcement — Production: NEW confirmed dates: July 1 – Jul 25 [moved from starting June 10]

 

All other mandates (MFA for All, PRMFA for Admins, TSP, Anomalous Detection) are

not affected

by this change. 

 

For future updates to the release dates, see the Knowledge article. 

1 comment
0/9000

How to Change opportunity to won without cancelling the lot hold without admin permission     @* Sales Cloud - Best Practices * 

2 answers
  1. Jun 8, 3:19 PM

    @Charlene Hipwell

     

     

    If the business process allows it, ask your admin whether there is a specific profile, permission set, or exception process for converting a lot hold to a Closed Won opportunity. 

0/9000