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

S’more Campfire Stories

Learning Objectives

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

  • Add more stories to the Campfire Stories object.
  • Ask the Campfire Stories agent to tell you stories based on criteria you choose.

The Plan Comes Together

Ruth, Codey, and Astro are getting excited to see the Campfire Stories Experience come together. It was so easy to use the agent to add Astro’s dream, and now everyone is eager to add more stories. You talk about ghosts, haunted houses, mysteries, and zombies. No one notices that Astro slipped out until they return with an armful of boxes and packages.

“We’ll need snacks so we can think more clearly,” they announce as they unload a few flavors of graham crackers, a variety of chocolate bars, and three sizes of marshmallows onto your desk. “I went to the kitchen and the chef gave me these!”

“Astro, we need to make you a s’more costume for Halloween!” Ruth giggled.

Add Another Campfire Story

Each of you can think of stories you’d like to tell to Coral Cloud guests around the campfire. Ruth describes ghost stories that frightened her when she was a calf at camp. Codey has read every mystery he could get his hands on and can make up a mystery story on the spot about almost anything. And Astro says they knew a lot about zombies.

You need to add a few more stories to the agent to test how well it can select stories to tell at experience sessions. You decide to add two more stories and then test the agent. Follow these steps to add a ghost story to the Campfire Stories object.

  1. Select the Campfire Stories tab to show the All view of the Campfire Stories object.
  2. Select Agentforce to open the Campfire Stories agent.
  3. Select Create a new campfire story. (Note: Your agent might phrase this differently. If you don’t see a button to create a new story, select the Campfire Stories tab to open the Campfire Stories object on the All list view.)
  4. In the agent text field, copy and paste these story details, then select Enter .
The title is The Last Stop
The type is Ghost Story
The audience is Teens
The Length is Long (8-10 min)
The full text is this: Everyone in Belltown knew the number thirteen bus stopped running at midnight. That is, everyone except the girl waiting in the rain beneath the broken streetlamp.
Noah noticed her as the bus rolled past Belltown Cemetery at 12:07 AM. She stood perfectly still in the rain, wearing a pale blue school uniform that hadn’t been in fashion for decades. Her dark, wet, hair hung over her face and she raised one hand toward the bus.
The driver slammed on the brakes.
“Why are we stopping?” Noah asked.
The bus driver, Mr. Vale, stared at him in the mirror. “Someone rang the bell.”
Noah looked around. “No one rang the bell, Mr. Vale. I’m the only one here.”
Outside, the girl climbed aboard.
She dropped something heavy into the fare box.
Clunk.
Then she walked down the aisle and sat directly across from Noah.
The doors folded shut, and the bus moved on.
Noah tried not to stare, but he couldn’t ignore the cold that rolled from her seat like fog from an open freezer.
“You shouldn’t be on this bus,” the girl whispered.
Noah turned.
Her face was pale, but ordinary. Almost. Rainwater dripped from her hair, although her clothes were completely dry.
“Neither should you,” he said. “The last bus was supposed to come at 11:30.”
“This is the last bus.”
Something in the way she said it made his stomach tighten.
At the front, Mr. Vale drove without blinking. The road ahead was empty, shining black beneath the headlights.
Noah glanced out the window.
Hadn’t they passed the same boarded-up gas station three times?
He stood. “Mr. Vale, you missed my stop.”
The driver said nothing.
Noah walked toward him and froze.
Mr. Vale’s hands rested on the steering wheel, but they weren’t moving. They weren’t even gripping it. They lay there stiffly while the wheel turned by itself.
In the mirror, the driver’s reflection was smiling, but Mr. Vale wasn’t.
Noah stumbled backward.
The girl caught his wrist. Her fingers were as cold as ice.
“Sit down,” she whispered. “It doesn’t like passengers walking around.”
“What doesn’t?”
The lights inside the bus flickered off.
In the darkness, something scraped across the roof.
Scratch, scratch, scratch.
The lights returned.
Long fingerprints streaked the windows—on the inside.
Noah dropped into the nearest seat. “What’s happening?”
The girl looked toward the front of the bus.
“Thirty years ago, the number 13 bus crashed during a storm. The driver lost control near the cemetery. Twenty-nine people died.”
“Twenty-nine?”
Every year, on the night of the crash, this bus comes back. It collects the passengers who were on the bus, plus one more person.”
Dark shapes now sat in previously empty rows.
A woman with broken glasses. A man holding a soaked and torn newspaper. A little boy hugging a wet red backpack. None of them had been there before.
He counted. There were 28 more people.
Noah turned to the girl.
“Twenty-nine” she said quietly. “With me.”
The bell rang. Ding. Ding. Ding.
The bus turned onto Cemetery Road.
“What happens when we reach the last stop?” Noah asked.
“You’d better get off of the bus before we reach the last stop,” she said.
The cemetery gates appeared ahead, standing open. Beyond them waited a road that shouldn’t have existed, descending between the graves into a darkness deeper than night.
Noah grabbed the emergency handle beside the rear door and pulled, but nothing happened.
The smiling reflection in the driver’s mirror widened.
“You can’t open it,” the girl said. “Not without paying the fare.”
She opened her hand.
A heavy blackened coin lay in her palm. It was the same coin she had dropped into the fare box.
The bus crossed through the cemetery gates.
The girl pressed the coin into Noah’s hand. Frost spread over his fingers.
“Put it in the coin box,” she said. “Then pull the handle.”
“What about you?”
She looked toward the shadowy passengers. “I don’t get to leave.”
Noah ran.
The figures turned their heads as he passed. The little boy reached for him. The woman with broken glasses opened her mouth, and rainwater poured out.
The scratching thing on the roof began to pound.
Noah reached the fare box and dropped in the coin.
Clunk.
Every light shattered.
He pulled the emergency handle.
The front and rear doors burst open.
Wind tore through the bus. Noah was lifted from his feet and tossed out onto the rainy roadside.
Behind him, the bus careened between the graves. For one second, he saw the girl standing in the rear doorway, staring. Then the bus vanished.
Noah woke at sunrise beside the cemetery gates. A police officer drove him home. When Noah described the bus, the officer’s eyes grew big and he went silent.
When he got home, Noah emptied his wet jacket pockets.
Something fell onto the floor with a clunk.
It was the heavy, blackened coin.
From outside came the hiss of brakes.
Then a bus bell rang once and Noah walked toward the door.
  1. Copy and paste this text into the chat window, then select Enter : Save this story to the Campfire Stories object if it hasn’t already been saved.
  2. Select close to close the Campfire Stories agent.
  3. Refresh your browser window to see the new story, The Last Stop, added to the Campfire Stories object.

Generate a Campfire Story

As you talk about other kinds of stories to include in the experience, Ruth remembers that when you used headless technology to create the agent, one of the actions that was added allowed the agent to create its own stories.

“Let’s see what kind of stories the agent can write!” Ruth suggests. “We can give the agent some details, and see what it comes up with. It’ll be a quick way to add another story so we are able to test, and who knows, maybe it’ll be a story we’ll want to use.”

“OK, since you built this with headless technology, let's ask the agent for a story about a headless ghost who is looking for its head,” Astro offers while munching a graham cracker.

  1. Select the Campfire Stories tab and make sure you’re on the All list view.
  2. Select Agentforce.
  3. Select Create a New Campfire Story.
  4. Again, you can ignore the agent’s questions and instead copy and paste this story prompt, and then select Enter .
Write a short (2-3 min) haunted house story for all ages about a headless ghost who forgot where he left his head.

The agent turns out a story that matches your criteria quickly. The story might need a little editing before it can be used, but it’s pretty good already!

  1. Copy and paste this text into the chat window, and then select Enter : Save this story to the Campfire Stories object if it hasn’t already been saved.

“This is really fun!” Ruth exclaims, “Let’s look at the Campfire Stories object to make sure our stories are all there.”

  1. Select close to close the Campfire Stories agent.
  2. Refresh your browser window.
  3. You can see that all of the stories, including Astro’s dream and the two you just added, are stored as records on the Campfire Stories object. (If you don’t see the stories, refresh your browser, and make sure you’re on the All list view.)

Tell Us a Campfire Story

It’s finally time to test that the Campfire Stories agent can pull up stories from a short prompt. “Let’s imagine we’re at the Campfire Stories Experience,” says Codey with his eyes closed so he can more clearly picture the scene.

He imagines the guests cozying up around the fire and toasting marshmallows while the Campfire Stories Experience host asks the employee agent to suggest stories from the Campfire Stories object that fit the audience.

The host prompts the agent with something like, “Tell me a long ghost story for teens.” The agent shows a selection of stories that match that criteria, and the host can choose to read one to the guests. To test this, follow these steps.

Note

Agents are nondeterministic, which means they can reason differently and produce unique responses based on the exact same input. People who build agents can “shape” behavior using an iterative process of testing, and then add instructions and guardrails to their agent to help it generate desired responses.

In the next section, you might experience the Campfire Stories agents’ nondeterministic nature. Your agent might not return the expected story. In the real world, this would be an opportunity to shape the agent to return the types of responses expected. We won’t do that in this module. You will still pass the Hands-on Challenge if your agent doesn’t return the expected stories.

  1. Make sure you’re still on the Campfire Stories object, and then select Agentforce.
  2. Click Search for a Campfire Story. (Your agent’s text may be slightly different.)
  3. In the agent chat window, copy and paste: Show me a long ghost story for teens. Then select Enter .
  4. The agent should recommend The Last Stop.
  5. At the top of the chat window, select refresh then select Clear History.
  6. Click Search for a Campfire Story. (Your agent’s text may be slightly different.)
  7. In the agent chat window copy and paste: Show me a medium (5-7 min) scary dream story for kids. Then select Enter.
  8. The agent should recommend A Sea of S’mores.

“It works!” shouts Astro. “And there’s the story about my dream! I can’t wait to be a s’more for Halloween!”

Congratulations! You helped Astro, Ruth, and Codey create a new Campfire Stories Experience for Coral Cloud Resorts using headless technology—and you ate plenty of s’mores along the way! Now you can apply these same headless capabilities to build custom features and experiences of your own, wherever they’re needed.

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