Set Up the BOTanicals App
Learning Objectives
In this project, you’ll:
- Install a package in your Trailhead Playground.
- Create an Apex class and method.
- Create a trigger.
- Automate the process of creating a new sObject.
Introduction to BOTanicals
BOTanicals is a company that makes robotic flowers, the environmental and hypoallergenic alternative to traditional flowers. These flowers change color to suit your mood, glow in the dark, and never die. They’re controlled by a state-of-the-art Salesforce org that’s connected to the Internet of Things. You’re just in time for the BOTanical Bonus Bouquet promotion. In this project, we automate a business process to support the promotion. Specifically, we code our app to add a bonus bouquet every time an order is activated.
The BOTanical Object Model
First things first, let’s look at our object model.
You probably notice a few familiar standard objects: Account, Order, OrderItem, and Product. There are also some custom fields in the OrderItem and Product objects. Most of our coding revolves around the Order and OrderItem standard objects.
Create a New Trailhead Playground
For this project, you need to create a new Trailhead Playground. Scroll to the bottom of this page, click the down arrow next to Launch, and select Create a Trailhead Playground. It typically takes 3–4 minutes to create a new Trailhead Playground.
Launch Your Trailhead Playground and Install a Package
Let's get started by installing an unmanaged package into your Trailhead Playground.
- Scroll down to the bottom of the page and click Launch to open your Trailhead Playground.
Then get your username and password.
- Click
and select Setup.
- Enter
Users
in the Quick Find box, then select Users. - Check the box next to your name. Make note of your username.
- Click Reset Password(s) and then OK. This step sends an email to the address associated with your username. If you don’t see the email, check your spam folder.
- Click the link in the email.
- Enter a new password and confirm it.
- Click Change Password.
Next, install the package.
- Open an incognito browser window in Chrome.
- In the incognito window, paste this link into the address bar to install the unmanaged package.
- On the Salesforce login screen, enter the username and password for your Trailhead Playground, then click Log In.
- Select Install for All Users, then click Install.
If you’re having trouble finding your username and resetting your password, see this article. If you have trouble installing the package, see the Install Apps and Packages in Your Trailhead Playground unit of the Trailhead Playground Management module.
Update the Default Order Page Layout
- Click
and select Setup.
- Click Object Manager.
- Click Order.
- Click Page Layouts.
- Click Page Layout Assignment.
- Click Edit Assignment.
- Click the Page Layout column header to select all the profiles.
- For Page Layout to Use, select Order Layout (BOTanicals).
- Verify the Page Layout column now lists Order Layout(BOTanicals) for every profile.
- Click Save.
Pin Three List Views in the BOTanicals App
- Click
and select the BOTanicals app. The list views on the BOTanicals home page will be empty. Don’t worry, we add some data soon.
- Click All Accounts (BOTanicals).
- Click
to pin the list view on this page.
- Click Home.
- Pin the All Orders (BOTanicals) list view and the All Products (BOTanicals) list view.
Load Sample Data
- Click
and select Setup.
- In the Quick Find box, enter
Flows
. - Under Process Automation, select Flows.
- Click Load Sample Data.
- Click Run.
- When you see YOUR FLOW FINISHED, close the Load Sample window.
- Close the Flow Builder window.
- Click
and select BOTanicals.
Your home page should now have entries in the Accounts, Orders, and Products sections. The BOTanicals app is ready to go.