Source: https://vaultcrmhelp.veeva.com/doc/Content/CRM_topics/VeevaAI/EmailAgent/RewriteToken.htm

## AI Rewrite Token for Approved Emails

Instead of having to manually create static custom picklists, Agentic Email can be used to dynamically tailor the style of each message to best suit the recipient. Agentic Email only modifies the writing style of content creator-defined text within the template while preserving its MLR-approved core message.

**Who can use this feature?**

* Content Creators - Browser
* [Enabling AI Variations in Approved Email Content](#Enabling)
* End Users - iPad
* [Generating Style Variations](#Generati)
* A Veeva AI license is required. Users also require an Approved Email license.

### Configuring AI Rewrite for

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)Content Creators](#)

To configure this feature:

1. Ensure [Configuring Approved Email](../../Multichannel/ApprovedEmail/InitialConfig/ConfiguringAE.htm) is complete.
2. Navigate to **Admin > Users & Groups > Permission Sets**.
3. Select the appropriate permission set.
4. Select the **Objects** tab.
5. Grant the following permissions:

   | Object | Object Permission | Object Types | Fields | Field Permission |
   | --- | --- | --- | --- | --- |
   | approved\_document\_\_v | CRED | All applicable object types | ai\_enabled\_template\_\_v | Edit |
   | sent\_email\_\_v | CRE | All applicable object types | ai\_assisted\_email\_\_v | Edit |

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)End Users](#)

To configure this feature:

1. Ensure the following features are configured:

   * [Configuring Approved Email](../../Multichannel/ApprovedEmail/InitialConfig/ConfiguringAE.htm)
   * [Configuring Agentic Email](Configuration.htm)
2. Navigate to **Admin > Users & Groups > Permission Sets**.
3. Select the appropriate permission set.
4. Select the **Objects** tab.
5. Grant the following permissions:

   | Object | Object Permission | Object Types | Fields | Field Permission |
   | --- | --- | --- | --- | --- |
   | approved\_document\_\_v | R | All applicable object types | ai\_enabled\_template\_\_v | Read |
   | sent\_email\_\_v | CRE | All applicable object types | ai\_assisted\_email\_\_v | Edit |

### Enabling AI Variations in Approved Email Content as

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)Content Creators](#)

Content creators determine which areas of an email template are eligible for AI Rewrite.

Text marked for the AI Rewrite token should only include salutations, opening remarks and other generic text within the email.

To enable AI variations for specific text:

1. Edit the appropriate email template, for example, via the BEE Editor.
2. Place the cursor at the beginning of the target text.
3. Add the **{{aiRewriteStart}}** token before the target text.
4. Add the **{{aiRewriteEnd}}** token at the end of the target text.

   Only text and the following supported HTML tags can be enclosed by the two tokens:

   * <p>
   * <i>
   * <strong>
   * <em>
   * <b>
   * <u>
   * <sub>
   * <sup>
   * <div>
   * <br>
   * <span>
   * <a>

   Other Approved Email tokens are not supported within the text.

   Only one instance of {{aiRewriteStart}} and {{aiRewriteEnd}} tokens can be added per email template.
5. Select **Save**.

### Generating Style Variations as

[![Closed](../../../../Skins/Default/Stylesheets/Images/transparent.gif)End Users](#)

Users can generate Direct or Warm style variations for eligible text within an email template.

To generate style variations when composing an Approved Email from any entry point:

1. Navigate to the list of email templates. Templates with the {{aiRewriteStart}} and {{aiRewriteEnd}} tokens display with an AI () icon, indicating style variations are enabled for the template.

   ![](../../../Resources/Images/VeevaAI/Email/RewriteToken.png)

   These templates are only available for selection on platforms supported by this feature, currently iPad.
2. Select the appropriate email template. Text eligible for a rewrite is highlighted with a blue border.

   ![](../../../Resources/Images/VeevaAI/Email/RewriteToken2.png)
3. Select the Rewrite button to open the Rewrite modal. Three variations of the target text display:

   * Direct – A shorter, more succinct version of the original text
   * Original – The original text as entered in the email template
   * Warm – A friendlier, more conversational version of the original text

   ![](../../../Resources/Images/VeevaAI/Email/RewriteToken3.png)
4. Select the Regenerate (![](../../../Resources/Images/VeevaAI/Email/RewriteToken4.png)) button to generate more Direct and Warm variations. This button can be selected up to three times.

   Previously generated variations are lost when a new generation is initiated.
5. Select the appropriate variation to use.
6. Select **Use this Style**.

   ![](../../../Resources/Images/VeevaAI/Email/RewriteToken5.png)

To revert the modified text back to the original version for all recipients, select the Restore Original link at the bottom of the modified text block.

The text and selected variations reset if the user tries to save the email as a draft after selecting a style variation.

### Related Topics

[Agentic Email Overview](EmailAgentOverview.htm)

[Configuring Agentic Email](Configuration.htm)

[Vault AI in CRM Overview](../Overview.htm)
