Skip to content

Web Templates

Christopher Long edited this page Feb 9, 2023 · 2 revisions

API Fetch

Using the " Banner with Call-To-Action" Global template as a base, this template shows how to make an unauthorized API call to an external API. The template makes an API call to the free Cat Facts API to retrieve a random fact about cats. Once retrieved, the result is loaded into the sub header of the template so it displays on screen.
Never store credentials in a template! Making API calls that require authorization are not recommended.

link to code >>


Prioritize Product by ID

Using the "Einstein Product Recommendations" Global template as a base, this template shows how to manipulate the set of recommended items created by a recipe; specifically how to move a particular item id to the front of the recommendation set.

link to code >>


Preview Promotions

Using the "Einstein Decisions" Global template as a base, this template provides both business users and developers the ability to specify a promotion to preview on screen.

link to code >>


How to Import a Template

Convert the parent folder, containing the template files, into a ZIP file.

Using your Chrome internet browser, open the Visual Editor using the Salesforce Interactions SDK Launcher browser extension.
Hover over the "Templates" option and click "View List".

Click the blue import icon at the top of the screen.

Select your zip file and import the template files.

Clone this wiki locally