OmniStudio Meet The Data Source Wizard
OmniStudio Meet The Data Source Wizard
Exercise Guide
You are logged in to your Developer Edition and you can begin practicing.
1. Click the App Launcher , and then select the OmniStudio App.
2. Click the “Gear” icon to go to Setup. This opens a new tab.
3. Return to the previous tab, open the dropdown menu, and select OmniStudio
FlexCards.
4. Click Warnings. The Warnings message displays, showing the URLs needed in
Remote Site Settings for Lightning web components to work correctly in FlexCards.
5. Return to the Setup browser tab. In the Quick Find box, search for Remote Site
Settings and click to open it.
6. Return to the tab with the Warnings message and copy the URL ending in
lightning.force.com.
7. In the Remote Site Settings tab, click Edit next to the Remote Site ending in
lightning.force.com.
8. Paste the URL you copied over the URL in the Remote Site URL field, then click Save.
9. Click Remote Site Settings to return to the list.
10. Click Edit next to the Remote Site ending in visual.force.com.
11. Return to the tab with the Warnings message and copy the URL ending in
visual.force.com. Copy the URL.
12. Paste the URL you copied over the URL in the Remote Site URL field, then click Save.
13. Return to the tab with the Warnings message. Close the modal window and refresh
the tab. The Warnings button is now gone.
Deploy OmniScripts
1. From the OmniStudio app, open the Object dropdown menu and select
OmniScripts.
2. Activate the following OmniScripts: team/editAccount, team/editContact,
team/editCase, and team/updateAccountPrimaryContact.
You can activate the OmniScript without opening it by first expanding it, clicking the
arrow to the far right of the row with the starter version, and then selecting
Activate>OK.
Create a new FlexCard using the wizard, which prompts the data source setup.
Prerequisites
● None
Tasks
1. Create a FlexCard and Configure its Data Source
2. Explore the FlexCard Designer’s UI
Time
● 10 mins
Title Leave this as-is This defaults to what you enter in the Name
field.
b. Click Next.
NOTE:
The combination of the FlexCard Name and Author must be unique in your
Org. For example, if importing a FlexCard with the same name and author of a
current FlexCard, you will be asked if you want to overwrite the current
FlexCard in your org.
A FlexCard has one data source. As you add fields and other elements to the canvas,
the values for the fields come from the data source you select
b. Click Next.
Start typing a part of the name to more easily select from a filtered list.
b. This is an integration procedure with stub data, not live data. Click + Add
under Input Map and enter the following information:
c. Click Next. If the Next button is greyed out and inactive, reselect
team_getAccountContactDetails in the Name field and then click Next.
5. Configure the inputs and confirm the test data is entering your JSON.
c. Confirm the data has two different nodes: A Contact node with first name,
last name, email, phone number, title, and Contact RecordId, and an Account
node with account name, website, account phone, primary contact name,
and postal code as well as Account RecordId.
At this stage, we’re working with stub, or mock, data, not live data. Once you switch
to live data, you’ll add a test value and fetch it. Since you haven’t linked live data yet,
the TEST PARAMETERS are not needed now. This is used to preview your FlexCard
with different parameters using real data.
6. Trim the JSON node to only provide Account data to the card.
Best practice is to only pass on the data that you need to use to a card. The FlexCard
data source is retrieving both Account and Contact data. Because you’re creating an
Account-focused card, there’s no need to bring the Contact data into the JSON for
the card.
c. Click Save. The new FlexCard is created and its Canvas is visible.
a. In the Header, you’ll see basic metadata about your FlexCard, such as the
Author, Current Version, Status, and Last Modified date and time.
The Author tells who created the FlexCard. Current Version tells what version
of the FlexCard you’re in. The Status tells you whether the FlexCard is active.
You can only make changes to an inactive FlexCard. The Last Modified field is
when this version was last worked on.
b. The Canvas is where you build your FlexCard. You drag elements from the
Build panel onto the canvas.
You can also perform actions to your FlexCard in the Header with control
buttons, such as toggle between Design view and Preview, create a New
Version, Export the FlexCard, Clone, Activate or Deactivate, and configure
Publish Options.
There is also a Help button, where you can access a list of links to resources,
called In-Product Help.
2. When you create a new FlexCard, it already has an Active state and the Build panel is
open. Explore the Build panel.
a. Notice the long list of elements split into three sections: Fields, Display, and
Inputs. Expand the list of display and input elements. To build on the canvas,
you select and drag from these lists on to the FlexCard State. Click the small
question mark next to any of the elements to view In-Product Help on
them.
b. Drag an Action display element from the Build panel to the canvas. Notice
that after you drag an element to the canvas, it triggers a switch from the
Build panel to the Properties panel.
c. Return to the Build panel. Drag a Currency input element to below the
action.
d. Return to the Build panel. Drag a Field display element to below the input
element.
b. When a Field element is selected, you can change the field name, add a field
label, enter placeholder text, select the field type, and add a condition that
determines when the field displays.
c. Tooltips are small popover windows that give you in-line information about
specific properties. Hover over the tooltip icon to view them.
e. Notice that an input element has a few more properties to configure than a
Field element due to the nature of its functionality. For example, you have to
link it to the correct data coming into the card. You can also set custom
attributes.
g. Notice that an Action element has a lot more properties to configure than a
Field element due to the nature of its functionality. For example, you can set
the action type, select an icon for the action, select the target, and where you
want the target opened.
4. Go to the Style panel. This is where we customize the look and feel of your FlexCard
by styling elements using a user interface (UI) to choose and configure the text color,
borders, and backgrounds, sizes and padding of fonts and entire elements, and
make elements responsive.
a. Scroll through the panel and note the sections: DIMENSIONS, APPEARANCE,
and ALIGNMENT.
b. The CUSTOM CSS section is for custom design needs. You can create and
apply custom CSS here, including CSS classes with an in-product code editor.
a. Go to the Setup panel. Update or change the data source here at any time.
b. Scroll down to the DATA SOURCE section. You selected and configured your
data source with the wizard.
When you replace the stub data in the selected Integration Procedure, you
will return to the Setup panel to use the test parameters and make sure
everything is properly connected.
TIPS:
If in doubt about how to use a feature or what to put in a field, look for the
or .
a. With the Action element selected, click the trashcan / bin icon to remove it.
Be careful not to remove the state.
Each FlexCard has a default Active state. States display records that we specify
using elements. Add a State element to the FlexCard canvas to present
different interactions and layouts based on specified conditions.