Skip to content
The Chat Archive
gemini-2.5-pro-exp-03-25-grounding· Google LMArena Search Arena 24K

write some saql queries that can give insigt about EFT on a salesforce crma dashboard…

  1. User

    write some saql queries that can give insigt about EFT on a salesforce crma dashboard with LightningUsageByPageMetrics loaded or others

  2. Assistant

    Okay, let's craft some SAQL queries for gaining insights related to usage and performance on Salesforce pages, which might be what you mean by "EFT" (perhaps Effective Frequency/Time, Effort, or Efficiency) using the LightningUsageByPageMetrics dataset.

    If "EFT" specifically means "Electronic Funds Transfer" and you have a custom object or fields tracking that, the queries would be different and depend heavily on your specific data structure.

    Assuming you're interested in page usage, time spent, and performance using LightningUsageByPageMetrics:

    First, let's ensure we have the latest context or definitions if needed. Okay, here are several SAQL queries using the LightningUsageByPageMetrics dataset that provide insights into page performance and user time spent. These metrics can serve as proxies for "EFT" if interpreted as Effort, Efficiency, or Effective Time.

    Important Notes:

    1. Dataset Name: The standard dataset name is LightningUsageByPageMetrics. If you've customized it, replace the name in the load statement.
    2. Field Names: These queries use standard field names like PageName, SumEPT, SumDuration, TotalCount, UserId, MetricsDate. Verify these match your dataset. SumEPT represents the sum of Experienced Page Time (page load time), and SumDuration represents the sum of time users spent actively engaged on the page (both in milliseconds).
    3. Units: SumEPT and SumDuration are typically in milliseconds (ms). The queries often convert these to seconds (sec) or leave them as ms for clarity. Adjust units as needed for your dashboard display.
    4. Filtering: You might want to add filter statements (e.g., filter q by 'TotalCount' > 10;) to focus on pages with significant usage or filter by specific MetricsDate ranges.

    1. Average Page Load Time (EPT) per Page

    • Insight: Identifies pages that take the longest to load on average, potentially indicating performance bottlenecks or complexity causing user friction.
    • SAQL:
      q = load "LightningUsageByPageMetrics";
      -- Group by page name to aggregate metrics for each unique page
      q = group q by 'PageName';
      -- Calculate total views, total EPT, and average EPT per view in milliseconds
      q = foreach q generate
          'PageName',
          sum('TotalCount') as 'TotalViews',
          sum('SumEPT') as 'TotalEPT_ms',
          sum('SumEPT') / sum('TotalCount') as 'AvgEPT_ms';
      -- Optional: Filter out pages with very few views to focus on relevant ones
      q = filter q by 'TotalViews' > 10;
      -- Order by average EPT descending to see slowest pages first
      q = order q by 'AvgEPT_ms' desc;
      q = limit q 2000;
      

    2. Total Time Spent (Duration) per Page

    • Insight: Shows which pages users spend the most cumulative time on. This could indicate high-value pages, complex pages, or areas where users get stuck.
    • SAQL:
      q = load "LightningUsageByPageMetrics";
      -- Group by page name
      q = group q by 'PageName';
      -- Calculate total duration in seconds
      q = foreach q generate
          'PageName',
          sum('SumDuration') / 1000 as 'TotalDuration_sec';
      -- Order by total duration descending
      q = order q by 'TotalDuration_sec' desc;
      q = limit q 2000;
      

    3. Average Time Spent (Duration) per Visit per Page

    • Insight: Measures the average duration of a single page view. High average duration might indicate complex tasks, engaging content, or user difficulties navigating away from the page.
    • SAQL:
      q = load "LightningUsageByPageMetrics";
      q = group q by 'PageName';
      -- Calculate total views, total duration, and average duration per view in seconds
      q = foreach q generate
          'PageName',
          sum('TotalCount') as 'TotalViews',
          sum('SumDuration') as 'TotalDuration_ms',
          (sum('SumDuration') / sum('TotalCount')) / 1000 as 'AvgDurationPerView_sec';
      -- Optional: Filter out pages with low view counts
      q = filter q by 'TotalViews' > 10;
      -- Order by average duration per view descending
      q = order q by 'AvgDurationPerView_sec' desc;
      q = limit q 2000;
      

    4. Pages with High EPT (Load Time) Counts

    • Insight: Instead of average EPT, this looks at how often pages exceed certain load time thresholds (e.g., > 3 seconds, > 10 seconds). This helps identify pages with consistently poor load times. The dataset has pre-binned fields for this (EptBinUnder3, EptBin3To5, EptBin5To8, EptBin8To10, EptBinOver10).
    • SAQL:
      q = load "LightningUsageByPageMetrics";
      q = group q by 'PageName';
      -- Sum up the counts for each EPT bin and total views
      q = foreach q generate
          'PageName',
          sum('TotalCount') as 'TotalViews',
          sum('EptBinUnder3') as 'Loads_Under_3s',
          sum('EptBin3To5') as 'Loads_3_to_5s',
          sum('EptBin5To8') as 'Loads_5_to_8s',
          sum('EptBin8To10') as 'Loads_8_to_10s',
          sum('EptBinOver10') as 'Loads_Over_10s';
      -- Calculate percentage of loads over a threshold (e.g., 5 seconds)
      q = foreach q generate
          'PageName', 'TotalViews', 'Loads_Under_3s', 'Loads_3_to_5s', 'Loads_5_to_8s', 'Loads_8_to_10s', 'Loads_Over_10s',
          (sum('Loads_5_to_8s') + sum('Loads_8_to_10s') + sum('Loads_Over_10s')) * 100 / sum('TotalViews') as 'Percent_Loads_Over_5s';
      -- Optional: Filter for pages where a significant percentage of loads are slow
      q = filter q by 'Percent_Loads_Over_5s' > 10 and 'TotalViews' > 20;
      -- Order by the percentage of slow loads
      q = order q by 'Percent_Loads_Over_5s' desc;
      q = limit q 2000;
      

    5. Time Spent (Duration) per User per Page

    • Insight: Identifies which specific users are spending the most time on which pages. Useful for understanding power users or users potentially struggling with specific pages. Requires joining with the User dataset to get user names.
    • SAQL:
      -- Load usage metrics
      usage = load "LightningUsageByPageMetrics";
      -- Load User data (ensure you have a User dataset loaded in CRMA)
      users = load "User"; -- Replace "User" if your dataset has a different API name
      -- Select only User ID and Name for joining
      users = foreach users generate 'Id' as 'UserId', 'Name' as 'UserName';
      
      -- Group usage data by Page and User
      q = group usage by ('PageName', 'UserId');
      -- Calculate total duration per user per page in seconds
      q = foreach q generate
          'PageName',
          'UserId',
          sum('SumDuration') / 1000 as 'UserTotalDuration_sec';
      
      -- Join with User data to get the UserName
      result = join q by 'UserId' left, users by 'UserId';
      
      -- Select final fields, replacing UserId with UserName
      result = foreach result generate
          'PageName',
          'UserName',
          'UserTotalDuration_sec';
      -- Optional: Filter for a specific page of interest
      -- result = filter result by 'PageName' == "Specific Page You Are Investigating";
      -- Order to see users spending most time
      result = order result by ('PageName', 'UserTotalDuration_sec' desc);
      result = limit result 5000; -- Increase limit if needed for user-level detail
      

    6. Trend of Average EPT Over Time for a Specific Page

    • Insight: Tracks the performance (average load time) of a key page over months to see if performance is degrading or improving.
    • SAQL:
      q = load "LightningUsageByPageMetrics";
      -- !! Replace "Your Target Page Name" with the actual page name !!
      q = filter q by 'PageName' == "Your Target Page Name";
      -- Group by year and month of the metrics date
      q = group q by ('MetricsDate_Year', 'MetricsDate_Month');
      -- Calculate Avg EPT per month
      q = foreach q generate
          date_part("year",'MetricsDate') + "-" + date_part("month",'MetricsDate') as 'YearMonth',
          sum('SumEPT') / sum('TotalCount') as 'AvgEPT_ms';
      -- Order chronologically
      q = order q by 'YearMonth' asc;
      q = limit q 2000;
      

    Alternative Interpretation: Electronic Funds Transfer (EFT)

    If "EFT" refers to a business process like Electronic Funds Transfer tracked in a custom object (e.g., EFT_Transaction__c) or standard object fields, you would need completely different queries based on that dataset.

    Example (Hypothetical EFT_Transaction__c Dataset):

    -- Example: Total Successful EFT Amount per Month
    q = load "EFT_Transaction"; -- Use YOUR dataset name
    q = filter q by 'Status__c' == "Successful"; -- Use YOUR status field/value
    q = group q by ('Transaction_Date__c_Year', 'Transaction_Date__c_Month'); -- Use YOUR date field
    q = foreach q generate
        date_part("year",'Transaction_Date__c') + "-" + date_part("month",'Transaction_Date__c') as 'YearMonth',
        sum('Amount__c') as 'TotalAmount'; -- Use YOUR amount field
    q = order q by 'YearMonth';
    q = limit q 2000;
    

    To give you relevant queries for a specific business process like EFT, I'd need to know the Dataset API Name and the Field API Names you use to track EFT information (like Amount, Status, Date, Related Account/Opportunity, etc.).

    Choose the queries above that best match your interpretation of "EFT" and adapt the dataset/field names as necessary for your specific CRMA setup.

  3. User

    build the metadata needed for the following 4 salesforce flows to send alerts: 3.1 Monitoring Dataflows and Recipes Follow these steps to monitor dataflows and recipes using Flow Builder: Create a Scheduled Flow to run daily or at a specific interval. Use a Get Records element to query the DataflowJob or RecipeJob object. Add a Decision element to check for failed jobs. Configure actions to send email alerts or post notifications to Chatter. Test and activate the flow. 3.2 Monitoring Connection Syncs To monitor connection syncs: Create a Scheduled Flow to run at the same frequency as your connection syncs. Use a Get Records element to query the ExternalDataSync object. Add a Decision element to check for sync failures. Configure actions to notify stakeholders of failures. Test and activate the flow. 3.3 Tracking Field Changes To track field changes: Create a Record-Triggered Flow for the object containing the field. Set the trigger to fire on updates. Add a Decision element to compare old and new field values. Configure actions to send alerts or log changes. Test and activate the flow. 3.4 Monitoring Permission Changes To monitor permission changes: Enable Event Monitoring in your Salesforce org. Create a Platform Event-Triggered Flow for PermissionSetAssignment events. Add actions to notify administrators of changes.

  4. Assistant

    Okay, let's build the metadata files (.flow-meta.xml and .flow) for each of the four monitoring flows.

    Important Considerations:

    1. Placeholders: These files contain placeholders (like [EMAIL_ADDRESS], Your_Object_API_Name, Your_Field_API_Name__c, Your_Chatter_Group_ID`, specific record IDs, etc.). You MUST replace these placeholders with your actual values before deploying.
    2. Customization: These are basic templates. You'll likely want to customize the specific conditions (e.g., time windows for scheduled flows), alert messages, recipient lists, and potentially add more sophisticated logic (e.g., handling multiple failures, preventing duplicate alerts).
    3. Error Handling: Production-ready flows should include robust error handling (e.g., Fault Paths). These basic examples omit them for clarity.
    4. Permissions: Ensure the running user for scheduled flows or the Automated Process User has the necessary permissions to query the objects (DataflowJob, RecipeJob, ExternalDataSync, PermissionSetAssignment, User, PermissionSet) and execute actions (Send Email, Post to Chatter).
    5. API Version: Using 59.0 as an example. Adjust if needed for your org.
    6. Deployment: You can deploy these files using tools like Salesforce DX (SFDX), the ANT Migration Tool, or by manually creating the flows in Flow Builder and carefully copying/adapting the structure (less recommended for complex flows).

    Directory Structure for Deployment:

    force-app/main/default/
    ├── flows/
    │   ├── Monitor_Dataflows_Recipes.flow-meta.xml
    │   ├── Monitor_Dataflows_Recipes.flow
    │   ├── Monitor_Connection_Syncs.flow-meta.xml
    │   ├── Monitor_Connection_Syncs.flow
    │   ├── Track_Field_Changes_on_YourObject.flow-meta.xml  // Rename YourObject
    │   ├── Track_Field_Changes_on_YourObject.flow          // Rename YourObject
    │   ├── Monitor_Permission_Changes.flow-meta.xml
    │   ├── Monitor_Permission_Changes.flow
    └── ... (other metadata)
    

    1. Flow: Monitor Dataflows and Recipes (Scheduled)

    • File: Monitor_Dataflows_Recipes.flow-meta.xml
      <?xml version="1.0" encoding="UTF-8"?>
      
  5. User

    continue with building the flows

  6. Assistant

    Okay, continuing with the flow definitions.


    1. Flow: Monitor Dataflows and Recipes (Scheduled) - Continued

    • File: Monitor_Dataflows_Recipes.flow (Continuing from previous snippet)

      <formulas>
      

    YesterdayDateTime DateTime ADDDAYS({!Flow.CurrentDateTime}, -1)</expression> </formulas> <interviewlabel>Monitor Dataflows &amp; Recipes {!Flow.CurrentDateTime} Monitor Dataflows and Recipes Loop_Failed_Dataflows Loop Failed Dataflows 50 398 Get_Failed_Dataflows Asc Append_Dataflow_Failures Loop_Failed_Recipes Loop_Failed_Recipes Loop Failed Recipes 314 398 Get_Failed_Recipes Asc Append_Recipe_Failures Send_Failure_Alert BuilderType LightningFlowBuilder CanvasMode AUTO_LAYOUT_CANVAS OriginBuilderType LightningFlowBuilder AutoLaunchedFlow Get_Failed_Dataflows Get Failed Dataflows 182 278 true Get_Failed_Recipes and Status EqualTo Failed LastModifiedDate GreaterThanOrEqualTo YesterdayDateTime true DataflowJob false Get_Failed_Recipes Get Failed Recipes 182 278 true Any_Failures_Found and Status EqualTo Failed LastModifiedDate GreaterThanOrEqualTo YesterdayDateTime true RecipeJob false 56 0 Get_Failed_Dataflows Daily 08:00:00.000Z Scheduled Draft EmailBody String false false false

    ```
    

    2. Flow: Monitor Connection Syncs (Scheduled)

    • File: Monitor_Connection_Syncs.flow-meta.xml
      <?xml version="1.0" encoding="UTF-8"?>
      
    • File: Monitor_Connection_Syncs.flow (Continued)
      <formulas>
      

    LookbackDateTime DateTime

    {!Flow.CurrentDateTime} - (1/24)</expression> </formulas> <interviewlabel>Monitor Connection Syncs {!Flow.CurrentDateTime} Monitor Connection Syncs Loop_Failed_Syncs Loop Failed Syncs 50 398 Get_Failed_Syncs Asc Append_Sync_Failure Send_Sync_Failure_Alert BuilderType LightningFlowBuilder CanvasMode AUTO_LAYOUT_CANVAS OriginBuilderType LightningFlowBuilder AutoLaunchedFlow Get_Failed_Syncs Get Failed Syncs 176 278 true Failures_Found and Status EqualTo Failed LastModifiedDate GreaterThanOrEqualTo LookbackDateTime true ExternalDataSync false 50 0 Get_Failed_Syncs

    Hourly 1 00:00:00.000Z Scheduled Draft

  7. User

    continue

  8. Assistant

    Okay, finishing the Monitor_Connection_Syncs.flow and moving on to the next flows.


    2. Flow: Monitor Connection Syncs (Scheduled) - Completion

    • File: Monitor_Connection_Syncs.flow (Completion of previous snippet)

      <!-- (Continuing from previous XML block) -->
      

    Draft EmailBody String false false false

    ```
    

    3. Flow: Track Field Changes (Record-Triggered)

    • File: Track_Field_Changes_on_YourObject.flow-meta.xml
      • RENAME THIS FILE: Replace YourObject with the API name of the object you're monitoring (e.g., Track_Field_Changes_on_Account.flow-meta.xml).
      <?xml version="1.0" encoding="UTF-8"?>
      

    Record ID: {!Record.Id} Changed By: {!User.FirstName} {!User.LastName} ({!User.Username}) Timestamp: {!$Flow.CurrentDateTime}

    Previous Value: {!Record__Prior.Your_Field_API_Name__c} <!-- ** REPLACE FIELD ** --> New Value: {!Record.Your_Field_API_Name__c}

    Please review this change if necessary.

    ```
    

    4. Flow: Monitor Permission Changes (Platform Event-Triggered)

    • Prerequisite: Event Monitoring must be enabled, and the PermissionSetAssignment event type must be available for streaming/monitoring. This might require purchasing the Event Monitoring add-on.
    • File: Monitor_Permission_Changes.flow-meta.xml
      <?xml version="1.0" encoding="UTF-8"?>
      

    Event Details:

    Event Time: {!Flow.CurrentDateTime} Permission Set ID: {!Record.PermissionSetId} Assignee ID (User/Group): {!$Record.AssigneeId}

    Operation: (Check specific fields in the PermissionSetAssignment event payload if available in your version/setup - e.g., Operation, EventType, CreatedById etc. These might vary)

    Please review this assignment change in Setup -> Users -> Permission Sets or Profiles.

    Note: To get User Name and Permission Set Name, enhance this Flow to perform 'Get Records' based on the IDs.

    ```
    

    Remember to replace all placeholders, adjust logic/recipients/scheduling as needed, test thoroughly in a sandbox, and ensure the necessary user permissions and Event Monitoring setup are in place before activating in production.

  9. User

    explain to me how to build 3.1 Monitoring Dataflows and Recipes Follow these steps to monitor dataflows and recipes using Flow Builder: Create a Scheduled Flow to run daily or at a specific interval. Use a Get Records element to query the DataflowJob or RecipeJob object. Add a Decision element to check for failed jobs. Configure actions to send email alerts or post notifications to Chatter. steo by steo

  10. Assistant

    Okay, let's break down how to build the "Monitor Dataflows and Recipes" flow step-by-step using the Salesforce Flow Builder interface.

    Goal: Create a flow that runs automatically every day, checks if any Dataflows or Recipes failed in the last 24 hours, and sends a single email notification summarizing any failures found.


    Step 1: Create a New Scheduled Flow

    1. Go to Setup (Gear icon).
    2. In the Quick Find box, type Flows and select Flows.
    3. Click the New Flow button.
    4. Select the Scheduled-Triggered Flow type.
    5. Click Create.

    Step 2: Configure the Schedule

    1. On the Start element configuration screen that appears:
      • Click Set Schedule.
      • Start Date: Choose today's date (or the date you want it to start running).
      • Start Time: Select a time when you want the check to occur daily (e.g., 6:00 AM). Remember this is in your org's time zone, displayed during setup, but stored in GMT/UTC.
      • Frequency: Select Daily.
      • (Optional: Choose an object and set conditions if you only wanted this schedule to run based on certain record criteria, but for this monitoring task, we usually don't need this).
      • Click Done.

    Step 3: Create a Formula Resource for "Yesterday"

    • We need to define a time window for checking failed jobs (e.g., the last 24 hours). A formula makes this dynamic.
    1. In the Toolbox on the left, click the Manager tab.
    2. Click New Resource.
    3. Resource Type: Select Formula.
    4. API Name: Enter YesterdayDateTime.
    5. Data Type: Select Date/Time.
    6. Formula: Enter {!$Flow.CurrentDateTime} - 1 (This calculates the date/time exactly 24 hours before the flow starts).
      • Alternatively, for "since midnight yesterday", you could use a more complex formula if needed, but checking the last 24 hours is common.
    7. Click Check Syntax (optional, but good practice).
    8. Click Done.

    Step 4: Get Failed Dataflow Jobs

    1. On the flow canvas, click the + icon below the Start element.
    2. Scroll down to the Data elements and select Get Records.
    3. Label: Get Failed Dataflows
    4. API Name: (This will auto-populate, e.g., Get_Failed_Dataflows)
    5. Object: Search for and select Dataflow Job.
    6. Condition Requirements: Select All Conditions Are Met (AND).
    7. Configure Filters:
      • Field: Status
      • Operator: Equals
      • Value: Failed
      • Click Add Condition.
      • Field: Last Modified Date (or CompletedDate if you prefer)
      • Operator: Greater Than or Equal
      • Value: Select the formula resource you created: {!YesterdayDateTime}.
    8. Sort Order: (Optional) You can sort if needed, but not required for this logic.
    9. How Many Records to Store: Select All records.
    10. How to Store Record Data: Select Automatically store all fields.
    11. IMPORTANT: Expand Advanced section. Check the box for Assign null values to the variable if no records are found. This prevents the flow from failing if there were no errors.
    12. Click Done.

    Step 5: Get Failed Recipe Jobs

    1. Click the + icon below the Get Failed Dataflows element you just added.
    2. Select Get Records.
    3. Label: Get Failed Recipes
    4. API Name: (Auto-populates)
    5. Object: Search for and select Recipe Job (or Analytics Recipe Job depending on your API version/setup - check the object name in Object Manager if unsure).
    6. Condition Requirements: Select All Conditions Are Met (AND).
    7. Configure Filters: (Same conditions as Step 4)
      • Field: Status | Operator: Equals | Value: Failed
      • Click Add Condition.
      • Field: Last Modified Date | Operator: Greater Than or Equal | Value: {!YesterdayDateTime}.
    8. How Many Records to Store: Select All records.
    9. How to Store Record Data: Select Automatically store all fields.
    10. IMPORTANT (Advanced): Check the box for Assign null values to the variable if no records are found.
    11. Click Done.

    Step 6: Add a Decision to Check if Failures Were Found

    1. Click the + icon below the Get Failed Recipes element.
    2. Select the Decision element.
    3. Label: Any Failures Found?
    4. API Name: (Auto-populates)
    5. Configure Outcomes:
      • Outcome Details (for the first outcome):
        • Label: Yes, Failures Found
        • Condition Requirements to Execute Outcome: Select Any Condition Is Met (OR).
        • Resource: Select the record collection variable from the first Get Records: {!Get_Failed_Dataflows} (hover over it, it might show as Dataflow Jobs from Get_Failed_Dataflows).
        • Operator: Is Null
        • Value: {!$GlobalConstant.False} (This means the collection is not null, i.e., records were found).
        • Click Add Condition.
        • Resource: Select the record collection variable from the second Get Records: {!Get_Failed_Recipes}.
        • Operator: Is Null
        • Value: {!$GlobalConstant.False}.
      • Default Outcome: The default outcome will automatically be labeled Default Outcome. You can click on it and rename the Label to No Failures Found.
    6. Click Done.

    Step 7: Define Actions for "No Failures Found" Path

    • This path is simple: if no failures are found, the flow should just end. You don't need to add any elements to the No Failures Found path.

    Step 8: Prepare the Alert Message (for "Yes, Failures Found" Path)

    • We need to build the body of the email. We'll loop through the found failures and add their details to a text variable.
    1. Create an Email Body Variable:
      • Go back to the Manager tab in the Toolbox.
      • Click New Resource.
      • Resource Type: Variable
      • API Name: varEmailBody
      • Data Type: Text
      • Default Value: (Optional) You can add a header like The following Data Integration jobs failed in the last 24 hours:\n\n (\n creates a line break).
      • Click Done.
    2. Loop Through Failed Dataflows:
      • Go back to the Elements tab in the Toolbox.
      • On the canvas, click the + icon on the Yes, Failures Found path.
      • Select Loop.
      • Label: Loop Failed Dataflows
      • API Name: (Auto-populates)
      • Collection Variable: Select the record collection {!Get_Failed_Dataflows}.
      • Specify Direction: First item to last item.
      • Click Done.
    3. Append Dataflow Details to Email Body (Inside the Loop):
      • Click the + icon inside the Loop Failed Dataflows box (For Each path).
      • Select Assignment.
      • Label: Append Dataflow Failure Details
      • API Name: (Auto-populates)
      • Set Variable Values:
        • Variable: {!varEmailBody}
        • Operator: Add
        • Value: Create a mini-template here. Example: Dataflow: {!Loop_Failed_Dataflows.Label} (ID: {!Loop_Failed_Dataflows.Id}, Error: {!Loop_Failed_Dataflows.ErrorMessage})\n (Replace .Label with .Name if Label isn't suitable. \n adds a line break). Adjust the fields as needed.
      • Click Done.
    4. Loop Through Failed Recipes:
      • Click the + icon after the Loop Failed Dataflows element (the path labeled "After Last").
      • Select Loop.
      • Label: Loop Failed Recipes
      • API Name: (Auto-populates)
      • Collection Variable: Select the record collection {!Get_Failed_Recipes}.
      • Specify Direction: First item to last item.
      • Click Done.
    5. Append Recipe Details to Email Body (Inside the Loop):
      • Click the + icon inside the Loop Failed Recipes box (For Each path).
      • Select Assignment.
      • Label: Append Recipe Failure Details
      • API Name: (Auto-populates)
      • Set Variable Values:
        • Variable: {!varEmailBody}
        • Operator: Add
        • Value: Example: Recipe: {!Loop_Failed_Recipes.Label} (ID: {!Loop_Failed_Recipes.Id}, Error: {!Loop_Failed_Recipes.ErrorMessage})\n Adjust fields as needed.
      • Click Done.

    Step 9: Send the Email Alert

    1. Click the + icon after the Loop Failed Recipes element (the path labeled "After Last").
    2. Select Action.
    3. In the Action search box, type Send Email and select the Send Email action.
    4. Label: Send Failure Alert
    5. API Name: (Auto-populates)
    6. Set Input Values:
      • Body: Toggle "Include" ON and select the {!varEmailBody} variable.
  11. User

    i dont see DataflowJob

  12. Assistant

    Okay, that's a key piece of information! If you cannot find DataflowJob when adding a Get Records element in Flow Builder, here are the most likely reasons and how to check them:

    1. Tableau CRM (Einstein Analytics) Not Enabled or Provisioned:

      • The DataflowJob and RecipeJob objects are part of Tableau CRM (formerly Einstein Analytics). If your org doesn't have Tableau CRM enabled and licenses assigned, these objects simply won't exist.
      • How to Check (roughly): Go to Setup -> Analytics -> Getting Started. See if Tableau CRM is enabled. Also, check your company's licenses. If you don't use Tableau CRM for data preparation, you won't have these objects.
    2. Permissions:

      • Even if Tableau CRM is enabled, your user profile or the permission sets assigned to you might lack the necessary permissions to "Read" the DataflowJob object. Flow Builder only shows objects you have at least Read access to.
      • How to Check:
        • Go to Setup -> Users -> Profiles.
        • Find your profile and click on it.
        • Go to Object Settings.
        • Look for Dataflow Job (or Dataflow Jobs). Check if Read access is enabled.
        • If not found there, check Permission Sets: Go to Setup -> Users -> Permission Sets. Check any permission sets assigned to you (view your User record to see assigned permission sets) and look under their Object Settings for Dataflow Job.
      • Important for Scheduled Flows: The flow runs as the "Automated Process User". You might need to ensure that user's profile also has the necessary permissions, although typically this relies on the permissions of the user who activates the scheduled flow initially. Best practice is to ensure your admin profile has the rights.
    3. Searching with Label vs. API Name:

      • Sometimes Flow Builder's search can be picky. Try searching for both:
        • Dataflow Job (the Label)
        • DataflowJob (the API Name - no space)
    4. Focus on Recipes (RecipeJob) Instead?

      • Salesforce is moving away from Dataflows towards Recipes. Is it possible your org primarily uses Recipes now?
      • Action: Try searching for the RecipeJob object instead. If you find RecipeJob but not DataflowJob, it might mean your org has transitioned, or only has permissions set up for the newer object. You can adapt the flow logic to monitor RecipeJob using the same steps (checking the Status field for 'Failed', etc.).

    Troubleshooting Steps:

    1. Verify Search: Double-check your spelling and try searching for both Dataflow Job and DataflowJob.
    2. Check Object Manager: Go to Setup -> Object Manager. In the Quick Find box there, type DataflowJob. Does it appear in the list?
      • If YES: It exists, and the problem is likely Flow Builder search or your permissions. Re-check your Profile/Permission Set permissions (Step 2 above).
      • If NO: The object likely doesn't exist in your org, probably because Tableau CRM isn't enabled or provisioned.
    3. Check for RecipeJob: Repeat steps 1 & 2, but search for Recipe Job and RecipeJob. If you find this, you can build the flow to monitor Recipes instead.
    4. Confirm Tableau CRM Usage: Ask your Salesforce Administrator if Tableau CRM (Einstein Analytics) is actively used and licensed in your org.

    Conclusion:

    The most common reasons are lack of permissions or the feature (Tableau CRM) not being enabled. If you confirm Tableau CRM is used, focus on checking your permissions for the DataflowJob object. If your org uses Recipes, search for RecipeJob instead.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.