# 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.

## Create a New Prompt Template

1. Go to **Setup**.
2. In the **Quick Find** search bar, find and select **Prompt Builder**.
3. On the Prompt Builder setup page, click **New Prompt Template**.
4. For **Prompt Template Type**, select **Flex**.
5. Enter a name for your prompt template (for example, **Handle JSON From Document AI**).
6. Under **Inputs (Optional)**, add one input:
   - Name: `inputString`
   - **Source Type**: Free Text
7. Click **Next**.
8. In the prompt screen, paste this prompt.

```
Instruction:
You are a JSON data formatter.

Input:
You will receive raw JSON as a string that may include schema, metadata, or other non-essential fields.

Raw JSON Input:
Input:inputString

Task:
- Parse the JSON.
- Ignore technical fields like schema, metadata, or keys starting with _ that don't add meaning for a user.
- Convert the remaining key-value pairs into a clean, human-readable format. > Label: Value; for each pair.
- Separate pairs with ; and add a line break between logical sections if there are nested objects or arrays.
- Label should be continuous without spaces, add _ if necessary

Example Output >
Candidate_residential_state:TX;Candidate_residential_zip_or_pin_code: 78701;Street_address:1456 Oak Avenue;Candidate_residential_city:Austin;Other_Phone_number:(512) 555-0347;Mobile_phone_number:(512) 555-0892
```

:::note
Make sure that the value `inputString` in the prompt template (`Input:inputString`) is spelled exactly as you spell it in the prompt instruction.
:::

9. From the **Models** dropdown on the left, select **GPT 4.1**. This model handles JSON and structured output reliably.
10. Click **Save** and then click **Activate**.
11. Confirm that your newly created prompt template appears on the Prompt Builder home page.
12. Copy the prompt template ID, as explained below.

:::tip
**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`
:::

## Next Step

- [Step 3 - Create Apex Classes](/docs/ai/automate-resume-processing/guide/aes-create-apex-classes.md): Add the invocable Apex classes that call Document AI from your flow.
