Upload the Static Resource
In this project, you’ll:
- Upload a static resource to your Trailhead Playground.
- Install a package containing a Lightning Web Component.
- Create a custom metadata record.
- Add the component to the opportunity record page using Lightning App Builder.
Let’s face it, we don’t always make a big deal about closing our big deals. But we should! Who wouldn’t want to get doused in confetti, do a victory dance, or get a congratulatory high five from their manager when they hit their number?
But what if your team isn’t all in one office? Or when the big moment happens, you’re in a meeting or on the road?
Now you can bring the celebration to Salesforce! Thanks to the power of Lightning Web Components and the Salesforce Platform, you can add sound effects to your Salesforce org. When an opportunity goes to Closed Won, let the celebration begin, featuring the audio file of your choice.
In this project, you learn how to add sound effects to your Salesforce org. And as you add these surprising moments of auditory fun, you learn how to use Lightning Web Components, Lightning App Builder, and Sales Cloud.
Let’s get started!
The first thing you need to do is upload an audio file to your Trailhead Playground. When selecting an audio file, observe these guidelines:
- Size: 5MB or less
- Type: .mp3 or .wav file
- Recommended duration: 5–10 seconds in length
- Subject matter: Choose one of our provided audio files (see below), or record your own; just make sure your audio file is work appropriate and in the public domain.
A note about accessibility: Not all people at your company may be able to hear the audio file. In this project, we provide you with a Lightning Web Component that plays an audio file. You can install a third-party audio visualizer, or you can create a similar component that plays visual and audio effects, using this component as the inspiration for your project.
To get you started, we’re offering you a zip file full of options, all of which are in the public domain and free for you to use for this project.
To complete this project, you need a free Trailhead Playground. You can find it at the bottom of this page. Click Launch to open the Trailhead Playground in a new browser tab (login required).
It typically takes 3–4 minutes from the time you first sign up for Trailhead to create your Trailhead Playground.
Once you have your audio file ready, upload it to your Trailhead Playground.
- Click and select Setup.
- From Setup, enter
staticin the Quick Find box, then select Static Resources.
- Click New.
- Create the static resource as follows:
- Cache control:
- Upload the audio file of your choice, using either your custom recording or one of the selections from our zip file.
- Click Save.
That’s it! Now you have your sound ready to go in the org. Up next, you install the package with the Lightning Web Component that makes the sound play.