Skip to main content
Tempo stimato

Get to Know the Coral Cloud Sample App

Now that the app is deployed, let’s tour it. We start by exploring the configured Data Cloud data streams, then learn how to add a flow to Apex, and we top it off with Agent Builder.

Discover Data Cloud Configuration

In Data Cloud, you map data lake objects (DLOs) to a standardized data model known as the Customer 360 Data Model. This canonical data model ensures consistent representation of the data, regardless of its origin. Mapping data to a common data model facilitates data unification, and makes it easy to access and act on data from various sources in a consistent way.

Coral Cloud Resorts stores its Contacts in Salesforce and Guest data in Amazon S3. These systems represent individuals in different ways. For example, Guests in Amazon S3 have a field called Surname, while Contacts in Salesforce have a field called Last Name.

Data Cloud abstracts these differences by mapping data to the Customer 360 Data Model that includes a generic Individual object. Both the Guest object from S3 and the Contact object from Salesforce are mapped to the Individual object within Data Cloud.

Let’s import and review these mappings, specifically the mapping of the Contact Data Lake Object to the Customer 360 Data Model based on the included Data Kit.

  1. Open the App Launcher (””), type data, then select the Data Cloud app.
  2. Click the Data Streams tab.
  3. Click New.
  4. Click Salesforce CRM.
    Salesforce CRM connector icon.
  5. Click Next.
  6. Click the Salesforce_Contacts Custom Data Bundle.
    Custom data bundle for Salesforce CRM contacts.
  7. Click Next.
  8. Notice that the default Data Space is preselected and all the fields included in the bundle are listed. Leave the selections as is, and click Next.
  9. Click Deploy.
  10. Click Data Lake Objects, then change the list view from Recently Viewed to All Data Lake Objects.
  11. From the Contact_Home Data Lake Object, in the Data Mapping panel on the right, click the Review button.
    Data Lake Object record view for the Contact Home object.
  1. Review the mappings
    • Review the Source object on the left-hand side. These are the fields of the Salesforce Contact object that you ingested into a data lake object.
    • Review the Destination objects on the right-hand side. These are standard entities within the Customer 360 Data Model, also known as data model objects (DMO). Note that your Contact DLO is mapped to five DMOs: Account Contact, Contact Point Address, Contact Point Email, Contact Point Phone, and Individual.

Data mapping view that shows how data is mapped between the Contact object in Salesforce to the Individual data model in Data Cloud.

Mapping ingested data is the first step when working with Data Cloud. The sample app contains several other elements for Data Cloud, like Calculated Insights or an S3 Data Stream, which you can explore on your own.

Discover Prompt Templates

Coral Cloud Resorts uses generative AI within Salesforce and it wants to make sure that generative AI responses are grounded in its customer data. For that they use Prompt Builder to securely bring CRM and Data Cloud data into its generative AI workflows.

  1. Click the gear icon (“”) and click Setup.
  2. In QuickFind enter prompt, then select Prompt Builder.

The sample app comes with various prompt templates which are listed as Custom in the Category column.

One of those prompt templates is a Field Generation template to automatically generate descriptions for Coral Cloud Resorts’ experiences (like Beach Yoga Retreat, Aqua Fitness in Paradise, and so on). Coral Cloud Resorts grounds the template using record merge fields.

Now let’s see how Coral Cloud is using this template for generating its experience descriptions.

  • In the App Launcher, select the Coral Cloud Resorts app, click the Experiences tab, and click the Aqua Fitness in Paradise record.
  • Click the Setup icon and select Edit Page.
  • Click the Description field.
  • In the right panel, check that Generate Experience Description is the prompt template used to generate the experience description.
  • Click the back arrow button (””) to leave App Builder and go back to the Experience record.
  • Click the Edit button next to the Description field.
  • Click the Generate button (Sparkles icon besides description field.) next to the Description input field, and watch Einstein generate a description.
  • Click Use to move the generated description to the description field.

You can explore the other prompt templates in Prompt Builder, which also make use of custom Apex classes or flows.

Discover Agent Builder

Coral Cloud is driving additional efficiencies by using agents for its internal and external processes. The resort utilizes flows and Apex to ground the work of those agents, and to empower actions on data through those agents.

First, let’s activate and open Agent Builder.

  1. Click the gear icon (“”) and click Setup.
  2. In the quick find, search for agents and click Agents.
  3. In the list of agents (at the bottom of the screen), click Einstein Copilot (it’s the only item in the list).
  4. Click Open in Builder.
  5. If the left-hand pane has a welcome message, click Dismiss.

Take a look at the topics on the left. By using topics you provide instructions to your agent in natural language, which your agent then uses to identify what actions are needed in a specific conversation.

List of standard and custom defined agent topics.

Coral Cloud defined a custom topic, Coral Cloud, for this agent. Let’s see what it does.

  1. In the Topics list, click Coral Cloud.
  2. Explore the Classification Description and the Scope of this topic. These define when this topic should be used by the agent.
  3. Then explore the Instructions. Here Coral Cloud provides specific instructions, like what type of object the agent should use for a specific user request. It can also define the date format that the agent should pass to an action.
  4. Click This Topic’s Actions to see the actions that are assigned to this topic. They power the capabilities of your agent. They are a mix of standard actions, delivered by Salesforce, and custom actions from the sample app.

Let’s try it out.

  1. Click into the Conversation Preview pane on the right, and enter the following prompt:
What’s the weather like for tomorrow at Coral Cloud?
  1. Press Return on your keyboard, and await the response.

Output of the dynamic plan that the agent built based on the given topics.

In the middle of the screen you see how the agent selected the right topic and the relevant action to provide the correct response. The weather forecast, backed by Apex, is only one example that is included in the sample app. There are more for you to check out on your own.

Next Steps

In this project you learned how to install and use the Coral Cloud sample app.

While this is the end of your guided tour of the Coral Cloud sample app, there’s so much more to explore. Make sure to check out the different prompt templates and agents, and how flow and Apex are used to drive better AI with data. Explore the source code on GitHub to understand how to bring this to your enterprise.

Last, but not least, check out the other sample apps in the sample gallery. Explore their source code and learn from them best practices for Lightning web components, Apex, flow, and so much more.

Resources

Condividi il tuo feedback su Trailhead dalla Guida di Salesforce.

Conoscere la tua esperienza su Trailhead è importante per noi. Ora puoi accedere al modulo per l'invio di feedback in qualsiasi momento dal sito della Guida di Salesforce.

Scopri di più Continua a condividere il tuo feedback