Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      June 2, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      June 2, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 2, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 2, 2025

      The Alters: Release date, mechanics, and everything else you need to know

      June 2, 2025

      I’ve fallen hard for Starsand Island, a promising anime-style life sim bringing Ghibli vibes to Xbox and PC later this year

      June 2, 2025

      This new official Xbox 4TB storage card costs almost as much as the Xbox SeriesXitself

      June 2, 2025

      I may have found the ultimate monitor for conferencing and productivity, but it has a few weaknesses

      June 2, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      May report 2025

      June 2, 2025
      Recent

      May report 2025

      June 2, 2025

      Write more reliable JavaScript with optional chaining

      June 2, 2025

      Deploying a Scalable Next.js App on Vercel – A Step-by-Step Guide

      June 2, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      The Alters: Release date, mechanics, and everything else you need to know

      June 2, 2025
      Recent

      The Alters: Release date, mechanics, and everything else you need to know

      June 2, 2025

      I’ve fallen hard for Starsand Island, a promising anime-style life sim bringing Ghibli vibes to Xbox and PC later this year

      June 2, 2025

      This new official Xbox 4TB storage card costs almost as much as the Xbox SeriesXitself

      June 2, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Leveraging Data Cloud data in your Agentforce Agent

    Leveraging Data Cloud data in your Agentforce Agent

    February 3, 2025

    One of the powers of Data Cloud is the way that it can unlock ‘trapped’ data.  Let’s say that you had a large set of data like VIN (Vehicle Identification Number) numbers that you did not want to put in your Sales Cloud because of row storage limits, but you really wanted to use that data as part of a new Agent you were building in Agentforce.   This is an example of where Data Cloud will give you a place to store those VIN numbers and make it very easy to query and leverage that VIN data through an Action tied to your Agent.

    The amazing part of this is that this can all be done now with ‘No Code’.  We will leverage Flows in Sales Cloud and the ability of an Action in Agentforce to use that Data Cloud data retrieved through a Flow.

    First a couple of demo screens from my Agent…

    1. I want to ask my Agent for details about a specific VIN like Description, Make, Model and Year.  That data is stored in Data Cloud.  So I ‘prompt’ my Agent with this sentence:  ‘Can you get me the details for a VIN?’
      Af1
    2. My agent recognizes what I am asking for and gives me some properly formatted responses so I can ask for the details about my VIN number.
      Af2
    3. So now I type in my response with my VIN as it suggested.
      Af3
    4. Wow!  I got back the details about my VIN number that are stored in Data Cloud.  These details included a Description, Make, Model and Year.
      Af4

    Now, how did Agentforce do that?

    It is really pretty amazing how much of the above demo is simply Agentforce doing ‘what it does’.  My extra part is adding a new Action to extend my Agent from Data Cloud.

    So let’s go through those pieces…

    1. We first need to get the data into Data Cloud into a ‘Data Model Object’.  It cannot just get to a ‘Data Lake Object’ (DLO), but has to also be mapped onto a ‘Data Model Object’ (DMO).   The ‘GetRecords’ in the Flow that we will use later cannot query a DLO, but only a DMO.  This will involve creating a Data Lake Object, a Data Model Object and the associated Data Stream for pulling the VIN data in.
      1. Here is one way to move data into Data Cloud from Sales Cloud using ‘No Code’, but with our use case above we would probably be using a noETL option to load such a large dataset into Data Cloud from something like Snowflake or Databricks.
      2. Here is my DMO and the associated VIN data being shown in the ‘Data Explorer’.
        Af5
      3. Now the data is loaded in Data Cloud and is ready to be used.
    2. We need to create a new Action with proper Instructions that is tied to our Flow that will get the data from Data Cloud.
    3. Create a new ‘Start from Scratch’, ‘Autolaunched Flow (No Trigger)’.
      Af6
    4. We can build a Flow as simple as this to make the data available for our Agent.
      Af7
    5. The GetRecords can query our Data Cloud DMO that we created above by configuring it like so…
      Af8
      Af8
    6. But where did that ‘VIN_Number’ variable come from?  We do need to create a variable in the Flow that is needed for ‘Input’ like this with the ‘Available for input’ being checked…
      Af9
    7. We will tie that Input variable to out Action later. 🙂
    8. Now we will do a ‘Decision’ to make sure our ‘GetRecords’ actual found something…
      Af10
    9. Now I need to create some ‘Output’ variables to return this data back to my Action.  Make sure the ‘Available for Output’ checkbox gets selected for each variable.
      Af11
      Af12
    10. Finally in an ‘Assignment’ set all of these Output variables…
      Af13
    11. I did try to work out some formatting issues as I was working through this.  My ‘Year’ kept coming back as 2,019 with a comma in it since it was a number.  So one solution I did was to create a formula in the flow to convert it to being text.   That seemed to work fine…
      Af14
    12. I also tried originally to have my Output variable be a custom object in Sales Cloud so that I did not have so many output variables.  That did not work well because when Agentforce was trying to show the output of an Object like that it needed a Salesforce ID to display it.  So I just went back to individual variables which worked well.
    13. Go ahead and Save and Activate your Flow.
    14. Now we need to tie this Flow to an Action in Agentforce.
    15. In Setup go to ‘Agent Actions’ and choose ‘New Agent Action’.
      1. Choose ‘Flow’ for the ‘Reference Action Type’
      2. Choose your ‘Reference Action’ which is the new Flow you just created.
      3. Give it an understandable ‘Agent Action Label’ and ‘Agent Action API Name’
      4. Click on ‘Next’
        Af15
      5. Now the ‘Input’ and ‘Output’ variables from our Flow come into play.  We need to configure our new ‘Agent Action’ with Instructions at the ‘Action’ level and also Instructions for each ‘Input’ and ‘Output’ item.   It can look like this…
        Af16
        Af17
        Af18
      6. Make sure you select ‘Require Input’ and ‘Collect data from user’ for the Input Variable.
      7. Make sure you select ‘Show in conversation’ for the Output variable.
      8. Click on Finish
    16. Now we need to add our new Action to the Agent.
      1. In Setup go to ‘Agents’
      2. In the drop-down at the end of the row for your ‘Agent Name’ click on ‘Open in Builder’
        Af19
      3. Deactivate your Agent with the button in the top right corner.
        Af20
      4. Then click on ‘New’, ‘New Topic’ under the Topic Details section because we have to add a new Topic.
      5. Fill out the ‘Create a Topic’ page…
        Af21
        Af22
      6. Click on Next
      7. Select your Flow and click on Finish
        Af23
      8. Now we need to add the new Topic to the Agent.  Again make sure your Agent is de-activated.
      9. On the ‘Topic Details’ tab click on the ‘New’ drop-down and select ‘Add from Asset Library’
      10. Select the Topic you just created and click on ‘Finish’
      11. Do some testing in ‘Agent Builder’ to make sure your Agent is doing what you want it to do.
      12. Activate your Agent.

    All of that above was ‘No Code’!

    While all of that above was a good number of steps, there really is not a ton of work and there was ‘No Code’.  Agent Builder and building Actions and Topics is new, but it really is pretty simple configuration.  I think the hardest part will be learning how to write really great ‘Instructions’ for these new Topics and Actions so they are leveraged appropriately when the Agent runs.  The skill set related to being a ‘Prompt Engineer’ is become more important every day.

    Leveraging Data Cloud data is not required for your first Agentforce implementation.  Data Cloud has to exist but you would not have to be pulling data out of Data Cloud on day 1.  The above solution could be just as well implemented by making an API call through Apex exposing the same VIN data.

    Hopefully the above shows you that Salesforce has put together the pieces to make this easy for you to do.

    If you are brainstorming about use cases for Agentforce, please read on with this blog post from my colleague Darshan Kukde!

    If you want a demo of this in action or want to go deeper please reach out and connect!

     

    Source: Read More 

    Hostinger
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleRequest Handling with PHP Enums in Laravel
    Next Article Migrating from MVP to Jetpack Compose: A Step-by-Step Guide for Android Developers

    Related Posts

    Security

    ⚡ Weekly Recap: APT Intrusions, AI Malware, Zero-Click Exploits, Browser Hijacks and More

    June 2, 2025
    Security

    Qualcomm fixes three Adreno GPU zero-days exploited in attacks

    June 2, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    CRIL Investigates: LNK Files, SSH Commands, and the Evolution of Cyberattack Techniques

    Development

    How do you enter data from a jhtml Area element using selenium?

    Development

    Palworld developers challenge Nintendo’s patents using examples from Zelda, ARK: Survival, Tomb Raider, Titanfall 2 and many more huge titles

    News & Updates

    17-Year-Old Linked to Scattered Spider Cybercrime Syndicate Arrested in U.K.

    Development

    Highlights

    Samsung builds CXL infrastructure certified by Red Hat to speed up memory development

    June 25, 2024

    Samsung and Red Hat are offering a fast-track verification and certification process for data center…

    How to install Arch Linux without losing your mind

    January 15, 2025

    Obsidian’s Fallout: New Vegas lead writer has returned to the studio “for exciting times” — and no, that doesn’t mean what you think it does

    January 31, 2025

    State Management in React with Recoil

    November 29, 2024
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.