Use a Coding Agent to Build & Deploy the Palonia Resort Demo to Your Salesforce Org
This demo walks you through the end-to-end steps to create an Agentforce agent. In this example, we use the experimental Salesforce Labs AI coding tools. While these tools aren’t officially supported, they give you a hands-on experience with Salesforce’s emerging capabilities.
This example uses experimental skills from Agentforce Labs. It was tested using Claude Opus 4.8 with a 1M token budget.
This guide walks you through building the Palonia Resort experience booking demo in an SF DX project on your local machine. Instead of using CLI commands, you’ll build the agent using prompts in an AI-assistant platform (such as Claude, Codex, Agentforce Vibes, Cursor, GitHub Copilot, or any AI coding assistant with file-editing capabilities). Then, you’ll use prompts to deploy the project to your Salesforce org. You’ll use your AI assistant to create:
- custom objects,
- sample data,
- a permission set,
- a check-in flow,
- a Lightning Web Component,
- a prompt template,
- an Agentforce agent,
Then deploy all of it to a Salesforce org. No prior AI-assisted development experience required!
The prompts in this example are intentionally high-level. You’re describing what you want to build, not writing code. Your AI assistant handles the implementation details: file structure, metadata format, field syntax, and Salesforce best practices. If it asks a clarifying question, just answer in plain English and it will continue.
- How to describe an idea to an AI coding assistant and let it build Salesforce metadata.
- How to use the terminal to scaffold a local SFDX project, and connect the local project to your org.
- How to build in Salesforce using your AI assistant.
- What each prompt creates: objects, fields, sample data, flow, prompt template, Agentforce agent, and the interactive resort map Lightning Web Component.
To sign up, click here. If you’d prefer to use a different Salesforce org, verify that it offers comparable functionality: Einstein is enabled, Agentforce is enabled, and it’s OK for you to add cases. Note that your user permissions and other org settings can affect your ability to complete all the steps in this example.
Don’t run this demo on a production org. This demo uses experimental tools and makes changes directly to your org.
If you’re following along with the instructions and your org runs into unexpected issues, try refreshing your browser window. You can also try going back and repeating previous instructions. Or, you can ask your AI Coding agent to help.
-
Log into the Salesforce Developer Edition org.
-
From Setup, in the Quick Find box, enter
einstein setup, and then select Einstein Setup and Turn on Einstein.
-
Search for
Agentforce Agentsand open it. -
Turn on Agentforce.

If you already have Salesforce CLI installed, skip ahead to Step 3.
-
Install Salesforce CLI. Run the
sf versioncommand to confirm that Salesforce CLI installed. If you already have it installed, runsf updateto confirm you have the latest version. -
Authorize your org by using the below terminal command. Replace
your-org-aliaswith a short, repeatable name like “my-agentforce-org”.
- When the login window appears, log in to your org and click Allow.
- Ensure you’ve enabled Einstein and Agentforce in your org.
- Ensure that you have the required permissions to publish and preview an agent in your org.
- In your terminal, run
sf org list. If you see your org alias in the list, you’re successfully authenticated.
If you haven’t already, make sure you have added the Salesforce agent skills for building applications to your coding agent so that they follow best practices for building on Salesforce. You can either tell your coding agent to add the skills from the Github repos linked here, or run the terminal commands yourself.
First, we’ll add the experimental Agentforce Labs skills.
In your terminal, run this command:
Select the agentforce-generate skill and accept the defaults. For now, we won’t install the others.
Next, we’ll add the Salesforce force.com skills. In your terminal, run this command:
To give your coding agent extra context, download the Agent Script documentation and add it to your coding agent’s root project directory.
Before we start: A note on working with your AI Assistant
Throughout this guide, you’ll use large language models (LLMs) to build your Salesforce org. Since LLMs are probabilistic, outputs can vary from run to run. If you encounter an error or unexpected result, simply describe what happened to the LLM in plain language and your AI assistant will help you diagnose and fix the issue. This conversational approach to problem-solving lets you iterate quickly and reach a working solution.
What this step does: Creates a new SFDX project folder named palonia-resort and sets your target org so the Salesforce CLI knows where to deploy.
Run these commands one at a time directly in your terminal, not in the AI assistant.
Then open the palonia-resort folder in your AI coding tool. Your directory structure looks something like this:

What this step does: instructs your AI coding assistant to use the Salesforce development skills you loaded earlier to follow best practices for building Salesforce metadata.
This step may be unnecessary if you already had the Agentforce skills loaded and have a robust .md file built out to guide your coding agent on Salesforce Development.
If you haven’t already, install and sign in to your preferred AI coding platform. Open its Agent or Chat mode, where you’ll paste each step’s prompt. The AI will read your project files, create new metadata files, and run terminal commands on your behalf.
Prompt: copy and paste into your AI coding assistant:
You can also instruct your coding agent to add these instructions to your main .md file, so that it will follow the same approach on all of your projects. Wait until your coding agent says that it’s finished.
What this prompt does: Creates five custom objects for Palonia Resort.
- Guest__c is the guest record with three interest picklist fields used for experience matching.
- Experience__c is the activity catalog and includes Map_X__c and Map_Y__c coordinates (0–100 scale) that the resort map LWC uses to position pins.
- Experience_Session__c is a scheduled time slot for an experience.
- Experience_Booking__c links a guest to a session.
- Reservation__c tracks the hotel stay and triggers the check-in flow. None of the objects link to standard Contact or Account.
Prompt: copy and paste into your AI coding assistant:
Verify your changes:
- Open your Salesforce org in your browser.
- From Setup, select Object manager.
- Search the object list for each of the new objects and confirm that they have the correct fields.

If you’re curious how your coding agent created these objects, you can ask it. In one of the testing instances, the coding agent didn’t use any skills - rather, it used prior knowledge of Salesforce DX source-format files and then deploying the XML to the target org
What this prompt does: Creates the Palonia_Resort_Admin permission set with full CRUD, View All, and Modify All on all five custom objects, plus field-level access on every custom field.
Your coding agent can use the Salesforce skill platform-permission-set-generate to create this permission set.
Prompt: copy and paste into your AI coding assistant:
What this prompt does: Generates sample data for Palonia Resort. This includes five guests with varied beach interests, eight resort experiences with realistic map coordinates placing each one in the right part of the resort (ocean activities out in the water, spa at the top of the map, beach activities along the shore), sessions across the next 30 days, reservations with two guests already checked in, and a handful of bookings. This gives the flow and the resort map LWC real records to work with.
We’ll create permissions before uploading the data. If the coding agent asks whether to upload the data, reply “not yet”.
Prompt: copy and paste into your AI coding assistant:
Remember, if your coding agent tries to upload the data now, it’ll encounter permission errors. We’ll deploy all our data in step 7.
What this prompt does: Builds a record-triggered Flow on Reservation__c. When a reservation’s Status changes to “Checked In”, the flow looks up the guest’s three interest fields, finds matching Experience__c records, and creates a Task for the concierge with a summary of recommended experiences (name, price, duration, and location). If no matches are found, the flow ends without creating a Task. In Step 10 you will extend this flow to also generate a welcome email using a Prompt Template.
Prompt: copy and paste into your AI coding assistant:
Verify your changes:
- Open your Salesforce org in your browser.
- From Setup, in the Quick Find box, enter
flow, and then select Flows. - Find Guest_Checkin_Experience_Recommendations and confirm it’s active.
- If you want to see the flow, click Open Flow.

What this step does: Deploys all metadata to your Salesforce org, assigns the permission set to your user, and imports sample data. You can paste the prompt below into your AI assistant or run the commands yourself in the terminal.
Prompt: copy and paste into your AI coding assistant:
Verify your changes:
-
In Salesforce, open Guests, and ensure you can see the list guests:

-
Click on a few guest’s names, and ensure you can see all the guest’s fields.

If you can’t see these fields, you need to add the custom fields to the Guest default page layout. Enter the following prompt (or a similar one) in your coding agent. Then, refresh the guest’s page in your browser.
What this prompt does: Builds the paloniaResortMap LWC — an SVG-based interactive map of Palonia Resort that renders on a Guest__c record page. Each Experience__c record appears as a colored pin at its Map_X__c / Map_Y__c position on the map. Experiences that match the viewed guest’s interests are highlighted; others appear dimmed. Clicking a pin shows a detail card with price, duration, activity level, and location. An Apex controller handles all data access with WITH SECURITY_ENFORCED.
Prompt: copy and paste into your AI coding assistant:
Verify your changes:
- Open a Guest__c record, then click the Setup gear and select Edit Page.
- In Components, search for
paloniaResortMapand drag it onto the page. - Save and Activate the page, then return to the regular Guest view.
- Confirm the resort map renders with colored pins. With interests set on a guest record, verify matching experiences show highlighted pins and others are dimmed.

What this prompt does: By downloading documentation or specific instructions, we can quickly give your agent the context it needs to build these correctly instead of troubleshooting through architecture and deployment errors. This is a pattern you can follow to give your coding agent instructions in addition to loading skills.
Download this file and drag it into your conversation with your agent. Then, send the below prompt to get your agent to update your .md file with this context as well.
Prompt: copy and paste into your AI coding assistant :
This prompt is specific to Claude. Feel free to update the prompt for your coding agent.
What this prompt does: Creates a Flex Prompt Template in Salesforce Einstein Prompt Builder that drafts a personalized welcome email for a guest checking in to Palonia Resort. The template pulls in the guest’s name and stay dates from their Reservation__c record, and the names and descriptions of experiences that match their interests. The generated email uses warm, enthusiastic language and is capped at 500 words. After creating the template, this step also updates the Guest_Checkin_Experience_Recommendations flow to invoke the template at the end of the flow and save the result to the Welcome_Email_Draft__c field on the Reservation__c record.
Prompt: copy and paste into your AI coding assistant:
Verify your changes:
Prompt Template:
- Open your Salesforce org in your browser.
- From Setup, in the Quick Find box, enter
prompt builder, and then select Prompt Builder. - Search for
Palonia_Welcome_Emailand confirm the template exists.
Reservation flow:
- Open a Reservation__c record and change Status to Checked In.
- Check if a Task is created with experience recommendations.
- Check if Welcome_Email_Draft__c is populated with a generated email.

What this step does: Creates an Agentforce Service Agent called “Guest Concierge Agent,” a conversational agent that Palonia Resort guests can chat with to discover available experiences during their stay. The agent uses two autolaunched Flows, structured similarly to the check-in flow from Step 6, to find available sessions matching the guest’s interests and to create bookings. Using flows keeps the logic visible in Flow Builder and easy to inspect or modify. The agent is available to guests with either “Booked” or “Checked In” reservation status. It also exposes the Palonia_Welcome_Email prompt template from Step 10 so guests can request a personalized welcome summary.
Prompt: copy and paste into your AI coding assistant:
Verify your changes:
- Open your Salesforce org in your browser.
- From the App Launcher, in the Quick Find box, enter
agentforce studio, and then select Agentforce Studio. - Open “Guest Concierge Agent” and start a conversation with it in the Preview panel.
- Ask the agent about available experiences for a guest by name. Verify it returns sessions matching the guest’s interests and correct stay dates.

For example, using these prompts, your agent should provide similar replies:
| Prompt | Reply |
|---|---|
| Isabella Reyes wants to book an experience. what is available? | To assist Isabella Reyes with booking an experience, I first need to confirm her reservation details. Could you please provide the email address on her reservation? |
| isabella.reyes@example.com | These experiences match Isabelle’s interests of snorkeling, surfing, and fitness: • Beach Yoga at Sunrise on July 18 — South Beach Lawn · $30 · 1 hour Start your day grounded with a gentle vinyasa flow on the sand as the sun rises over the water. Mats provided. • Coral Reef Snorkeling Tour on July 20 — North Reef Dock · $85 · 2.5 hours Explore the vibrant coral reefs just offshore with a certified guide. Fins, mask, and snorkel provided. Suitable for confident swimmers. • Beginner Surf Lesson on July 21 — South Beach Break · $65 · 1.5 hours Catch your first wave with our patient, ISA-certified instructors. Soft-top boards and rash guards provided. No experience needed. |
| Prompt | Reply |
|---|---|
| What are some experiences I could recommend to James Nakamura? His email is james.nakamura@example.com | These experiences match Jame’s interest of Whale Watching, Sunset Sail, and Dining. The agent also addressed the client by their preferred name, “Jamie” Jamie has two wonderful experiences available during their stay at Palonia Resort: • Whale Watching Voyage on July 22 — Head out to open water aboard our catamaran to spot humpback and pilot whales. Onboard naturalist and light refreshments included. ($120, 3 hours, departs from Main Marina) • Sunset Sail on July 23 — Unwind aboard a classic sailing yacht as the sun dips below the horizon. Sparkling wine and canapés served onboard. ($95, 2 hours, departs from Main Marina) |
Now that you’ve learned how to describe an idea to an AI coding assistant, you’re ready to build something of your own. You already know the pattern: objects, permissions, data, a flow, a Lightning Web Component, a prompt template, and an Agentforce agent. Pick a process you care about, tell your coding assistant what you want, and go make it!
If you see an error, copy the full error text and paste it into your AI assistant: “I’m seeing this error — help me fix it: [paste error]”. Screenshots work too.
Step 1 fails — sf not found: Install Salesforce CLI and ensure sf is on your PATH. Run: sf --version
Step 7 fails — target org not set: Run sf org list to find your alias, then sf config set target-org <alias>. Re-run the deploy.
Permission set or object not found after deploy: Re-run sf project deploy start, then re-run the permission set assignment.
Data import fails — sample-data-plan.json not found: Ensure Step 4 ran and the data/folder was created. Ask your AI assistant to re-run Step 4.
AI assistant created files in the wrong folder: Open the palonia-resort folder directly in your AI tool (not a parent folder) and re-run the step.
LWC does not appear in Lightning App Builder: Confirm meta.xml targets include lightning__RecordPage with object: Guest__c. Redeploy and refresh App Builder.
Flow is not creating a Task on check-in: Confirm the flow is Active. Verify the Status value on the Reservation is exactly “Checked In” — spelling and capitalization must match the picklist value.
Welcome_Email_Draft__c is empty after check-in: Confirm the Prompt Template is activated in Prompt Builder and that the flow update from Step 07 was deployed. Check the flow debug logs for any invocation errors.
Guest Concierge Agent not appearing in Agent Builder after deploy: Confirm the .agent file is under force-app/main/default/agents/ and the deploy completed without errors. Re-run sf project deploy start and check for metadata validation failures.
Agent returns no experiences: Confirm the guest record has Interest_1__c, Interest_2__c, or Interest_3__c populated, and that Experience_Session__c records exist with dates within the guest’s reservation window. Verify the guest’s Reservation__c Status__c is “Booked” or “Checked In”. Check the Get_Guest_Available_Experiences flow in Flow Builder and use Debug to trace the session query results. Verify sample data was imported successfully in Step 02.