Skip to main content

#Automation45 diskutieren mit

so currently I'm making my own chatbot app, I'm training my own AI using machine learning and NLP for that app but how am I supposed to implement that AI model into Salesforce.. basically I want to make a UI and provide a database for that app, so what kind of salesforce technologies can help me to make a UI and to provide an overall backend + any additional tips?

#Sales Cloud #Salesforce Developer #Service Cloud #Experience Cloud #Integration #CRM Configuration #Automation 

2 Antworten
  1. Heute 10:54

    For a chatbot interface, I would keep the first screen very simple. Give users a few clear options and an obvious place to type their question. A visible route to human support is important too. Then test the interface with ordinary users. Their confusion will quickly reveal what needs changing.

0/9000

Hi everyone,

I’m working on a Tableau dashboard where users select a Mission ID using a filter dropdown.

Some Mission IDs are milestone-based, while others are not.

I have a field [Milestone Rank], and the condition for a milestone-based Mission ID is:

COUNTD([Milestone Rank]) > 0

I have a separate dashboard section containing several milestone-related charts. What I want is:

  •  If the selected Mission ID is milestone-based → show the milestone section. 
  •  If the selected Mission ID is not milestone-based → completely hide the milestone section. 
  •  When the section is hidden, I also want the empty space to collapse, rather than leaving a blank area. 
  •  The Mission ID list comes from the database, so new Mission IDs can be added over time. 
  •  Ideally, I want to keep the Mission ID as a filter dropdown, rather than requiring the user to manually change another Show/Hide parameter. 

I tried using Dynamic Zone Visibility, but Tableau does not show my Boolean calculated field as an available value for “Control visibility using value.”

I also tried a Boolean parameter for Show/Hide, but then the user has to manually change the parameter every time they select a different Mission ID, which isn't practical.

Is there a way to make Dynamic Zone Visibility respond automatically to the selected Mission ID while keeping the Mission ID as a filter?

If not, what would be the recommended Tableau approach for achieving:

Mission ID filter → detect whether milestone exists → automatically show/hide a dashboard zone → collapse the space when hidden?

Thanks! 

 

#Tableau Desktop & Web Authoring  #Reports & Dashboards  #Tableau Cloud  #Automation  #Analytics

2 Antworten
  1. Heute 10:46

    DZV can only use static values, i.e. a parameter, or a { FIXED } LoD at the level of the workbook (no Dimensions). So, not all Boolean fields will show in the DZV selection. Filtering is also carried out too late, i.e. you can't apply DZV based on filters, so your COUNTD() > 0 won't work. 

    I would switch your [Mission ID] filter to be a Set (then you'd have your worksheet filters as being in our out of that set, visually indistinguishable from a normal Dimension filter). For the DZV, because Sets are 'independent' (they don't inherently do anything like filtering) you could then have

    { FIXED: COUNTD( IF [Mission ID Set] THEN [Milestone Rank] END) > 0 }

     

    Essentially, I'm moving your filtering inside the COUNTD, looking at every row of data and checking if the rows that match the Mission ID have a Milesone Rank. Across the entire dataset, it checks if that count is greater than zero, giving one, workbook level Boolean value. 

    Having the > 0 inside the { } is important, but I never remember why. If you have { .... } > 0 you will not be given it as a choice in the DZV list of fields. 

     

0/9000

Ever wish you could grab Salesforce field API names without leaving the record page? 😅 

 

Yes, tools like Salesforce Inspector can help with API names too. 

 

But I wanted something more seamless with Salesforce Metada Navigator

 

👉 You're already on the Record Details page  

👉 Click Show/Copy API 

👉 See the API names right next to the fields 

👉 Ctrl + Click to select multiple API names 

👉 Copy them all at once 

👉 Paste directly into the SOQL Query Editor 

 

And here's the part that saves even more time:

The copied API names are automatically converted into SOQL format. ⚡

No opening another tab. 

No jumping between pages. 

No copying fields one by one. 

No manually formatting your query. 

 

Just:

Record Page → Select Fields → Copy → Paste → SOQL 🚀 

 

It's a small feature, but these are the kinds of small workflow improvements that can save a surprising amount of time when you're working in Salesforce every day. 

 

Ever wish you could grab Salesforce field API names without leaving the record page? 😅 Yes, tools like Salesforce Inspector can help with API names too.

 

#Salesforce @* Release Readiness Trailblazers *@* Salesforce Administrators *@Admin Tricks #RRTreasureHunts #New Releases #Automation

0/9000

I'm working on a Flow that needs to update a large batch of related records (a few thousand) triggered from a record update on the parent object. I've read that Record-Triggered Flows can run into governor limits or performance issues at scale, and I'm trying to figure out the right pattern before I build this out further.

For those who've dealt with bulk updates like this — is it better to handle this with a Scheduled Flow / batch approach instead of a real-time Record-Triggered Flow, or is there a cleaner declarative pattern I'm missing? Trying to avoid needing an Apex trigger if possible, but open to it if that's genuinely the better path here. 

 

#Flow  #Automation@Salesforce Flow Automation

1 Antwort
  1. 1. Okt., 13:59

    The limit for number of records to be updated before hitting a limit is 10k across all DML statements (see documentation) so you should be able to use an assignment and a collection variable to update the value(s) needed and then do the update DML on the collection without an issue based solely on what is described here. I personally don't like scheduled flows as I've encountered some unexpected/unexplained behavior with them. Hope this helps!

0/9000

Hello everyone

I need help to complete a unit in a trailmix set up case esclation project

Unit :create an automation with flow builder

I created the automation flow process but while I create the case to taste the flow

It gives me this message

And I tried to delete the flow , but it can't be deleted too!

Any help, please?

Thanks

#Trailhead#Flow #Automation
3 Antworten
  1. Eric Burté (DEVOTEAM) Forum Ambassador
    29. Sept., 22:49

    Hello @Mohamed Magdy

    make sure you have well set up all lines with ID in your flow configuration items. See for example the note from within the trailhead unit : "Note: Make sure you select the Account ID option that has a Record data type, signified by a > in its row. Could you please also provide us a debug trace of your flow, or screenshots of your configured elements from within your flow ? 

    Eric 

     

     

0/9000

I’m working with a Salesforce Flow that processes a relatively large number of records, and I’m looking for ways to improve its performance and reliability. 

 

The Flow currently performs several record queries and updates during execution. As the amount of data increases

,

the Flow takes longer to complete and can sometimes approach Salesforce governor limits. 

 

What are some recommended approaches for optimizing a Flow in this situation? For example, would reducing Get Records operations, using collections more effectively, or moving some logic to Apex help? 

 

I’d appreciate any practical suggestions or best practices for designing scalable Salesforce Flows. 

 

#Salesforce Platform  #*saleforce Platform Basic* - Understand The Salesforce Architecture  #Flows  #Slack Developers  #Automation

3 Antworten
  1. 29. Sept., 10:31

    Hi @James K.k

     

     

    The biggest win is usually reducing database operations, not just reducing Flow elements.

    I’d bulkify the Flow around collections, eliminate Get Records/DML inside loops, and query only the fields/records actually needed. If the volume or logic still pushes governor limits, I’d move that part to Apex and let Flow handle the orchestration.

0/9000

I’ve added a mini Object Manager to Salesforce Metadata Navigator

to make getting to object-related setup pages quicker. 

 

For example, open an object and you can see its page layouts right in the plugin window. Click a page layout to go directly to that specific page layout, instead of clicking through Object Manager to find it. You can also bookmark frequently used objects for quick access later. 

 

It can save three or four clicks and the time spent waiting and navigating. 

 

https://chromewebstore.google.com/detail/salesforce-metadata-navig/bhhjfabaooemhhmiigmcemjelhmjhmkf?hl=en

 

 

I’ve added a mini Object Manager to Salesforce Metadata Navigator to make getting to object-related setup pages quicker.

 

 

#Salesforce @* Release Readiness Trailblazers *@* Salesforce Administrators *@Admin Tricks #RRTreasureHunts #New Releases #Automation

0/9000

Hi everyone,

I am designing a Data Cloud flow where a CRM staging object is regularly purged due to retention rules. In Data Cloud, we need to keep the processed data in a permanent target table for audit purposes, even after the source records are deleted.

With UI-based Batch Data Transforms, platform-managed Full Refreshes periodically rebuild the target table from scratch based only on current source data. This would wipe out our historical target records once the source is purged.

I want to confirm how Python Custom Code Extensions (PySpark SDK) handle this:

  1. When using client.write_to_dmo(..., write_mode=WriteMode.APPEND), does PySpark strictly append new rows without ever wiping or truncating the target table?
  2. Is PySpark execution completely immune to automatic platform Full Refreshes, meaning Data Cloud will never automatically wipe and rebuild a target table written via Custom Code?
  3. Under WriteMode.MERGE, if a record is deleted from the source table, can we confirm it remains untouched in the target table rather than being deleted?

Has anyone implemented this pattern for keeping permanent history from short-lived staging sources in Data Cloud?

Thanks!  

 

#Data360  #Automation

2 Antworten
  1. 21. Sept., 20:46

    Hi Alessandro,

    Regarding your design pattern for preserving historical audit records from short-lived staging sources in Data Cloud, here are the technical confirmations for how PySpark Custom Code Extensions handle write operations: 

     

    1.WriteMode.APPEND Execution:Append Behavior. 

    When using client.write_to_dmo(..., write_mode=WriteMode.APPEND), PySpark strictly appends new incoming rows to the target Data Model Object (DMO) or Data Lake Object (DLO) without truncating or wiping existing data. It will never automatically rebuild or clear out historical rows. 

     

    2.Immunity to Full Refreshes:Platform Independence. 

    PySpark code execution is completely separate from the platform-managed Full Refresh schedules used by standard UI Batch Data Transforms. Data Cloud will not automatically trigger a full rebuild or drop table operation on targets populated via Custom Code Extensions. 

     

    3.WriteMode.MERGE and Source Deletions:Merge Behavior on Deletions. 

    Under WriteMode.MERGE, records that are deleted or purged from the source staging table remain untouched and preserved in the target table. Merge updates or inserts matching records based on keys, but it does not propagate source deletions to remove historical records from the target.

0/9000
1 Antwort
  1. 21. Sept., 20:47

    Hi Suraj,

    To write a unit test for a @future (callout=true) method, you need to mock the HTTP callout (using HttpCalloutMock) and enclose the execution between Test.startTest() and Test.stopTest(). Salesforce runs all asynchronous methods (like future methods) called within startTest() and stopTest() synchronously right when Test.stopTest() executes. 

     

    Here is an example test class structure to cover your method:

    1.Create a Mock Callout Class:

    Mock Implementation. 

    Create a mock class that implements HttpCalloutMock to return a fake JSON response simulating your patchCall output (ensuring it contains 'state' => 'Success' and a valid JSON structure with an id field).

    2.Prepare Test Data and Context:

    Test Setup. 

    In your test method, insert a test Bid_Review_Request__c record so that the update brUpdate; statement can successfully find and update a record in the database.

    3.Wrap in Start/Stop Test:

    Execution and Assertion. 

    Assign your mock, wrap the future method call inside Test.startTest() and Test.stopTest(), and assert that the record was updated successfully.

    Apex 

     

    @isTest

    private class NewProjectHandlerTopUpTest {

    // 1. Mock class for HTTP callouts

    public class MockHttpResponseGenerator implements HttpCalloutMock {

    public HTTPResponse respond(HTTPRequest req) {

    HttpResponse res = new HttpResponse();

    res.setHeader('Content-Type', 'application/json');

    res.setStatusCode(200);

    // Construct JSON response matching the parser requirements

    res.setBody('{"state": "Success", "resBody": "{\\"id\\": \\"12345\\"}"}');

    return res;

    }

    }

    @isTest

    static void testNewProjectHandlerTopUp() {

    // Create test record to satisfy update operation

    Bid_Review_Request__c testReq = new Bid_Review_Request__c(

    Name = 'Test Project'

    // Add required fields for Bid_Review_Request__c here

    );

    insert testReq;

    Map<String, String> recordMap = new Map<String, String>{

    'ID' => testReq.Id,

    'Name' => 'Test Project'

    };

    // Set mock callout

    Test.setMock(HttpCalloutMock.class, new MockHttpResponseGenerator());

    Test.startTest();

    // Calling the future method

    YourClassName.newProjectHandlerTopUp(recordMap, '{"test":"json"}', 'destination', 'WBS123');

    Test.stopTest(); // Future method executes here

    // Assertions to verify the record was updated

    Bid_Review_Request__c updatedReq = [SELECT WBS_Project__c FROM Bid_Review_Request__c WHERE Id = :testReq.Id];

    System.assertEquals('12345', updatedReq.WBS_Project__c, 'The WBS Project code should be updated successfully.');

    }

    }

    (Note: Replace YourClassName with the actual name of the Apex class containing your future method).

0/9000

Hi all,

 

I've created a flow so that whenever the opportunity owner field is updated, the related contact owner field is also updated to be the same.

 

I thought it'd be quite simple, which it was, but during testing it keeps throwing the error in the title which says the ownerID field is blank, but it's not. Not on the Opportunity and not on the Contact.

 

I've googled endlessly and can't find a solution, any help is greatly appreciated!

Flow error - INVALID_CROSS_REFERENCE_KEY: Owner ID: owner cannot be blank.

2 Antworten
  1. 21. Sept., 06:34

    Hi Charlie,

     

    This error (INVALID_CROSS_REFERENCE_KEY: Owner ID: owner cannot be blank) typically occurs for one of two main reasons when attempting to update Contact ownership from an Opportunity:

     

    1. How is the Flow referencing the Contact? (Primary Suspect)

    By default, standard Opportunities do not have a direct lookup to ContactId unless you are using:

     

    • Custom fields (e.g., a custom Primary_Contact__c lookup).

     

    • Opportunity Contact Roles (OpportunityContactRole).

     

    Check your Update Records element:

     

    • If your flow is trying to update records of type Contact using a filter like Id Equals $Record.ContactId (or an empty custom lookup field), that lookup value is resolving to null/blank.

     

    • When Salesforce receives an update request for a Contact where the target record ID or lookup resolution fails/is null, it often misinterprets the payload and throws Owner ID: owner cannot be blank or an INVALID_CROSS_REFERENCE_KEY.

     

    • Fix: Verify how your Opportunity finds the related Contact. If you use Opportunity Contact Roles:

     

      1. Add a Get Records element to find the OpportunityContactRole where OpportunityId Equals $Record.Id (and optionally IsPrimary Equals True).
      2. Add a Decision element to check if a Contact Role was found ({!Get_Contact_Role} Is Null False).
      3. In your Update Records element, update the Contact where Id Equals {!Get_Contact_Role.ContactId}, setting OwnerId = $Record.OwnerId.

     

    2. Is the New Opportunity Owner an Active User?

    • Unlike Accounts, Leads, and Cases, Contacts cannot be owned by Queues—a Contact's OwnerId must always resolve to an active User ID (prefix 005).

     

    • If your Flow is passing a Queue ID, or if the user being assigned is inactive or lacks the necessary license/permissions on the Contact object, Salesforce rejects the assignment with this cross-reference error.

     

    • Ensure you are mapping:
      • Field: OwnerId
      • Value: {!$Record.OwnerId} (make sure you select the ID itself, not a related field like Owner:User > ContactId).

     

    3. Contact "Private Record" Sharing Restriction

    In Salesforce's standard data model, a Contact without an AccountId is considered a private contact and has strict ownership rules:

     

    • If the related Contact is not associated with an Account, changing its owner requires specific permissions and cannot always inherit owners dynamically.

     

    • Ensure the target Contact has an associated AccountId.

     

    Quick Debugging Tip:

    Run your flow using the Debug button in Flow Builder with the specific Opportunity record ID where you saw the failure. Look at the right-hand debug panel under the Update Records step—it will show the exact values being passed into OwnerId and Id.

     

    Hope this helps track down the culprit!

0/9000