Skip to main content
Bring your team and maximize your impact at Dreamforce. Register three or more to unlock $999 passes.

Su navegador es demasiado pequeño

Amplíe el tamaño de su navegador para continuar con el aprendizaje interactivo. Recomendamos un ancho mínimo de 900 píxeles.

Learning Objectives

After completing this unit, you’ll be able to:

  • Use headless technology to create a custom object to hold campfire stories.
  • Use headless technology to create an employee agent to collect and suggest campfire stories.
Note

Beta: Trailhead Headless Builder Experience

You’re entering into the great experiment with us. This unit features a beta version of the Trailhead headless builder experience, which means your experience might appear different and vary from time to time.

Be sure to go through this badge using the English language. To adjust the language, navigate to the unit 1 footer, and select English from the dropdown menu.

In this unit, you use the new headless builder experience to create a custom object and an employee agent in Agentforce using natural language. You go back and forth between the instructions, the headless builder workspace where you get hands-on with Agentforce, and the Headless Experience Playground you generated in unit 1.

From S’mores to Strategy

While you’re in your office, Astro, Codey, and Ruth splash along the water’s edge to the campfire area. The water is getting chillier, but they don’t mind. The crystal blue waves tickle Ruth’s toes before they flatten out and race back into the sea. All the way there, Astro plans the s’mores out loud.

“We could have big marshmallows and small marshmallows. Should we just have chocolate bars? What about peanut butter cups or chocolate candies? Those melt well, too! And who doesn’t like sprinkles? I like this kind of graham crackers best, but we need to have other choices of everything for people who can’t or don’t eat certain kinds of foods. And we need roasting sticks and plates and a place to wash sticky hands… and maybe some blankets, too!” And they chatter on and on while Codey and Ruth giggle at their enthusiasm.

“Astro, maybe you are a s’more! You sure know everything about them!” Ruth teases as they arrive at the campfire area.

Codey pulls a few big Adirondack chairs from the shed and arranges them around the fire ring, and then he and Ruth start planning the new Campfire Stories Experience. Astro watches a paddle boarder in the surf while planning the s’mores aloud.

Headlessly Create a Campfire Stories Custom Object

Meanwhile, back at your desk, you write a few prompts to headlessly build the features you need for the Campfire Stories Experience. Follow along to build the custom object, record page layout, and tab in the Coral Cloud Resorts org.

  1. First, you build the Campfire Stories custom object. In the chat window, copy and paste this prompt, and then select Enter.
Create a custom object called Campfire Stories that contains these fields: A text field called Title; a picklist called Type containing these values - Ghost Story, Haunted House, Zombie, Mystery, Scary Dream; a picklist called Audience containing these values - Kids, Teens, All Ages; a picklist called Length containing these values - Short (2-3 min), Medium (5-7 min), Long (8-10 min); then create a long text field called Campfire Story to hold the campfire story.

Note: Throughout this module, it may take a minute or two for the agent to build the features requested in the prompts. While the agent is working, you see progress updates in the panel. These progress updates may include red text. This is the agent identifying an error. The agent corrects its errors without any intervention and continues. The agent asks many follow-up questions. Ignore them and continue working through the steps. The work you do there answers follow-up questions the agent asks while providing additional details needed to complete this module.

  1. Now you need a record page layout and a tab for the Campfire Stories object so you can view the stories that you’ll enter later. Copy and paste this prompt into the chat window, and then select Enter.
Create a record page layout and a tab for the Campfire Stories object and make them visible in the Coral Cloud Resorts app. Make sure the page layout and the tab are assigned to the admin user. Make sure there is an All view to view a list view of the stories.

Admire Your New Custom Object

  1. Navigate to the Headless Agentforce Playground that you launched in your browser window in unit 1.
  2. Select App Launcher.
  3. Search for and select the Coral Cloud Resorts app.
  4. Refresh your browser. The Campfire Stories tab is at the end of the tab row—you might need to select More to see it.
  5. Select the Campfire Stories tab to open the Campfire Stories object.
  6. On the Campfire Stories object, select Recently Viewed.
  7. Select All.
  8. Select pin to make All the default list view.

The Coral Cloud Resorts app shows the Campfire Stories tab in the navigation bar and the All list view pinned.

The Campfire Stories object is empty because you haven’t added any stories, yet. You add stories to the object in the next two units, so it’s good to know where to find them.

Headlessly Create an Employee Agent

Next, you create an employee agent that can add new campfire story records to the Campfire Stories object and recall stories that are already stored on the object as records. You create the agent using three prompts.

  1. In the Trailhead Headless Builder chat window, copy and paste this prompt, and then select Enter.
Create an employee agent called Campfire Stories with a subagent called campfire_stories, but do not add any actions. Update the permission set created earlier to grant me access to this agent.
  1. When you receive confirmation that the agent has been created, copy and paste this prompt into the chat window, and then select Enter.
Update the agent to add an action named “Create Campfire Stories” that can access the Campfire Stories custom object to create and store new stories.
  1. When the agent has added the action in the previous step, copy and paste this prompt into the chat window, and then select Enter.
Update the agent to add one more action named “Search Campfire Stories” that can query the Campfire Stories custom object’s existing records and display fields. Make sure when referencing existing records to read the story verbatim and do not make a story up.

Check Out Your New Campfire Stories Agent

  1. Go back to your Headless Agentforce Playground, select App Launcher.
  2. Search for and select Agentforce Studio.

The App Launcher with Agentforce Studio selected.

  1. In the Agents panel, select Campfire Stories from the Agent Name column. (Note: You may see slight variations in your agent, subagent, and action names throughout this badge.)

The Campfire Stories agent in the Agents panel.

The Agent Definition tab opens and shows the details of the agent you just headlessly created, including the campfire_stories subagent and the actions it created and added to your agent. So cool!

The Agent Definition panel showing the subagents and actions that were headlessly added to the Campfire Stories agent.

Tell Us a Campfire Story!

In the next unit, you use the new Campfire Stories employee agent to add a new story to the custom object.