Step 2 - Create a Prompt Template in Prompt Builder
Now that you have a Document AI configuration to process resumes, set up a prompt template to handle Document AI's output.
- Go to Setup.
- In the Quick Find search bar, find and select Prompt Builder.
- On the Prompt Builder setup page, click New Prompt Template.
- For Prompt Template Type, select Flex.
- Enter a name for your prompt template (for example, Handle JSON From Document AI).
- Under Inputs (Optional), add one input:
- Name:
inputString - Source Type: Free Text
- Name:
- Click Next.
- In the prompt screen, paste this prompt.
Make sure that the value inputString in the prompt template (Input:inputString) is spelled exactly as you spell it in the prompt instruction.
- From the Models dropdown on the left, select GPT 4.1. This model handles JSON and structured output reliably.
- Click Save and then click Activate.
- Confirm that your newly created prompt template appears on the Prompt Builder home page.
- Copy the prompt template ID, as explained below.
How to Find the Prompt Template ID
The prompt template ID is typically part of the URL of the template in the Prompt Builder.
For example, in this URL the prompt template ID is 0hfKZ000000PPrNYAW:
https://trailsignup-5fca1e948037d6.lightning.force.com/lightning/setup/EinsteinPromptStudio/0hfKZ000000PPrNYAW/edit?c__versionId=3vNKZ000000U0ma2AC
- Step 3 - Create Apex Classes: Add the invocable Apex classes that call Document AI from your flow.