Appearance
Exercise 1: Create a Field Generation Template
In this exercise, you'll use a Field Generation template to automatically generate descriptions for Coral Cloud Resorts experiences (like Beach Yoga Retreat, Aqua Fitness in Paradise, etc). You'll ground the template using record merge fields.
Step 1: Enable Einstein
Open the Setup Menu and click Setup.
In the Setup Quick Find, search for Generative AI, and select Einstein Setup.
Click the Turn on Einstein toggle.
Step 2: Create the Field Generation template
In the Setup Quick Find, search for Prompt Builder, and select Prompt Builder.
Click the New Prompt Template button.
Configure the prompt template as follows:
Field Value Prompt Template Type Field Generation Prompt Template Name Generate Experience Description API Name Keep default Template Description This template is used to generate a description for a resort experience. Object Experience Object Field Description Click Next.
Paste the following text in the Prompt Template Workspace:
txtYou are a marketer at ORGANIZATION_NAME. The resort provides experiences guests can book throughout the day. Write a marketing description for the experience below. Make it sound unique and exciting. Highlight the benefits of the experience. The description should be between 80 and 100 words. Experience name: EXPERIENCE_NAME Type: EXPERIENCE_TYPE Location: EXPERIENCE_LOCATION Duration: EXPERIENCE_DURATION Level: EXPERIENCE_LEVEL Capacity: EXPERIENCE_CAPACITY
Replace the placeholders below with the corresponding merge fields (click the Resource search box to access merge fields):
Placeholder Merge field ORGANIZATION_NAME Current Organization > Name EXPERIENCE_NAME Experience > Experience Name EXPERIENCE_TYPE Experience > Type EXPERIENCE_LOCATION Experience > Location EXPERIENCE_DURATION Experience > Duration Hours EXPERIENCE_LEVEL Experience > Activity Level EXPERIENCE_CAPACITY Experience > Capacity In the Preview panel, select Aqua Fitness in Paradise as the Related Record. "Aqua Fitness in Paradise" is one of the experiences offered at Coral Cloud.
Click Save & Preview.
In the Resolution panel (bottom left), examine the prompt that was generated. Notice that the merge fields have been replaced with the actual values for the "Aqua Fitness in Paradise" record.
In the Response panel (bottom right), examine the experience description that was generated by the LLM.
Experience tweaking the template instructions. For example, change the number of words you want the generated description to be. Click Save & Preview again to see the results.
TIP
Try adding Experience > Record Snapshot as a merge field.
Click Activate when you are satisfied with your template.
Step 3: Bind the template to the Experience Description field
In the App Launcher, select the Coral Cloud app, click the Experiences tab, and click the Aqua Fitness in Paradise record.
Click the Setup icon and select Edit Page.
Click the Description field.
In the right panel, select Generate Experience Description as the prompt template to be used to generate the experience description.
Click Save to save your changes to the page.
Click the back arrow button to leave App Builder and go back to the Experience record.
Click the Edit button next to the Description field.
Click the Generate button (sparkles icon) next to the Description input field, and watch Einstein generate a description.
Click Use to move the generated description to the Description field.
Click Save to save the record.