Skip to main content
The online Trailblazer Community becomes read-only Oct 30, 2026, as we move new community conversations to Slack. Read the FAQ

Superbadges let you take the skills you’ve learned and apply them to complex, real-world business problems. These assessments require a higher level of skill and knowledge. These are not step-by-step challenges and often require more time to complete.

Get Ready for the Superbadge: Apex for Agentforce

Introduction to Superbadges

Heads-up! A superbadge is different from other learning on Trailhead. It's a hands-on technical skills assessment where you take business requirements and apply your skills to build something amazing, without the step-by-step guidance. We have provided recommended learning and Help articles filled with resources to aid you along your journey. The estimated completion time assumes prior experience with the superbadge concepts and completion of the recommended learning. Your hard work will pay off!

Assessment Objectives

In this superbadge, you’ll:

  1. Create an invocable Apex class to call an existing functionality.
  2. Invoke a prompt template from an Apex class.
  3. Create an Apex action for an Agent.

Before you start this superbadge, consider completing the recommended content. This provides a knowledge base to help you complete the technical skills assessment.

Content

Description

Corresponding badge art

Quickstart: Apex Coding for Admins

Add Apex to your toolkit and build complex business processes with code.

Corresponding badge art

Agent Customization with Apex

Create custom AI agents using agent actions and Apex.

Corresponding badge art

Agent Customization: Quick Look

Learn how you customize agents with prompts, flows, and Apex.

Prework and Notes

Sign Up for a Developer Edition Org with Special Configuration

To complete this superbadge, you need a special Developer Edition org that contains specific configuration and sample data designed to work with the challenges in this superbadge.

Note

Important

Sign up for the free Developer Edition org with special configuration. Follow the instructions in the “Verify Account” email to log in and complete the sign-up process. Keep your org credentials handy. Store your Developer Edition org's username and password somewhere secure, like a password manager, so you can find them later. If you don't log into this org for 30 days, you may be asked to reconnect it to Trailhead before you can continue your hands-on work.

Connect Your New Developer Edition Org to Trailhead

  1. Make sure you’re logged in to your Trailhead account.
  2. Select Connect org from the Choose a hands-on org screen.
  3. On the login screen, enter the username and password for the Developer Edition org you just set up.
  4. On the Allow Access? page, click Allow.
  5. On the Want to connect this org for hands-on challenges? page, click Yes! Save it. You are redirected back to the Get Ready for Superbadge page and ready to use your new Developer Edition org to earn this superbadge.
  6. Now that you have a Salesforce org with special configuration for this superbadge, you’re good to go.

Review the Apex for Agentforce: Trailhead Challenge Help Article

Note

Important

Before you begin the challenges, review Apex for Agentforce Superbadge: Trailhead Challenge Help for resources to complete the challenges. Check out the accessibility section to learn more about any accessibility considerations related to this superbadge.

Use Case

Coral Cloud Resorts is a vacation destination with something for everyone. The resort works hard to provide great experiences for guests, who choose from hundreds of activities and adventures. In this superbadge, you’ll use Apex and Agentforce to help the team at Coral Cloud Resorts provide excellent service, strengthen customer relationships, and gain repeat business for the resort. Your work focuses on two areas: guest experience reviews and campaigns.

Guest Experience Reviews

Guest reviews are a key element of Coral Cloud’s success. On the Coral Cloud website, each experience is listed with a brief description, price, an overall rating, and snippets of individual guest reviews. Guests provide a review in their own words and give the experience a numeric rating from 1–10, with 10 being outstanding. These reviews then guide future decisions for returning customers. Guests can choose to book the Tropical Snorkel Adventure, Sunrise Mountain Yoga, or the Kids’ Marine Discovery, just to name a few examples. They partly base their booking decisions on reviews and ratings.

Guest Campaigns

Management at Coral Cloud uses campaigns to stay in touch with customers between stays. Each year, guests can qualify for different campaigns based on their interests and experiences.

As a Salesforce developer, you’ve been asked to help Coral Cloud automate its process for capturing reviews and adding guests to campaigns. You’ll set up some new functionality in the Coral Cloud CRM by working with Agentforce and Apex customizations.

Note

New Agentforce Builder Generally Available!

The new Agentforce Builder went live in February 2026. This superbadge uses the legacy builder, but we're working on new superbadges for the updated experience. In the meantime, explore the new builder in Take a Tour of the New Agentforce Builder or the Agentforce documentation.

Configure Agentforce in Your Org

You’ll need to use Agentforce in your org to complete objectives. Follow these steps to set up the agent in your connected developer edition org.

  1. Enable Einstein and Agentforce.
  2. Open the Coral Cloud Experience Agent in Agentforce Builder.
  3. Create a new subagent named Customer Experience Reviews with the following information.
    Note: Click Next to advance past the optional “What do you want this subagent to do?” modal, then add the field values in the next modal screen.

Field

Value

Classification Description

This subagent handles guest reviews about their experience at Coral Cloud Resorts. It identifies the specific experience, processes customer feedback, and records their review in the Coral Cloud Resorts org.

Scope

Your sole job is to gather and process guest reviews about their experiences at Coral Cloud Resorts to ensure feedback is accurately recorded and categorized.

1st Instruction

Always begin by checking that the Email__c field on the MessagingSession record is available with the session. If the Email__c field is available, then use this value to get the Contact record. If the Email__c field value is not known, always ask the customer for their email address and get their Contact record before creating the Guest Reviews record from the customer.

2nd Instruction

Get the Contact record by using the Lookup Contact by Email action. Then get the most recent Booking information by using the Get Most Recent Booking by Contact action.

3rd Instruction

There's an Experience Name field in the Booking record retrieved from the Get Most Recent Booking by Contact action. Confirm with the customer that the review they want to submit is for the experience related to this booking.

4th Instruction

If the experience name is not what the customer intends to provide a review for, ask the user for their experience name. Check that the Booking record with this experience name exists for the customer, then confirm the experience name with the customer.

5th Instruction

Use the Experience Name field on the Booking record to call the Lookup Experience action to get the Experience__c record.

6th Instruction

Prompt the user to provide their review and a numeric rating on a scale of 1-10, with 10 being the most favorable rating. If the user submits a decimal rating, round it to the nearest whole number. Once both the review and the rating are received, invoke the Process_Guest_Reviews action with the collected details.

  1. Add the following Flow Agent Actions.
    1. Lookup Contact by Email: This action queries the contact record based on an email address.
    2. Get Most Recent Booking by Contact: This action queries the most recent booking record before today.
    3. Lookup Experience: This action queries the experience record based on an experience name.
  1. Set up the agent to capture the contact’s email.
    1. Select Context in the Legacy Agentforce Builder navigation bar.
    2. Select Messaging Session under Context Variables.
    3. Click Edit Included Fields.
    4. Select the Email__c field.
    5. Click Save Included Fields to save this setting.
Note

Note

When implementing record changes via AI, it’s best practice to include security measures such as user identity verification. This step is not required for this challenge, but is encouraged for real-world scenarios. See Maintain Trust with Agentforce Actions in the Legacy Builder for more information.

Now that you've configured Agentforce in your org and prepared the Coral Cloud Experience Agent, move on to the next challenge.

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback