Creating Custom Tokens for Email Content

Objective

After completing this lesson, you will be able to create custom tokens for email subjects and message content.

Custom Email Tokens Using Document Generation

Email tokens automatically populate information in an email once the email is triggered in the onboarding process. There are only a few tokens available for email templates, but you can add more tokens by creating custom tokens.

There are two steps involved in creating custom email tokens for email templates:

  1. Create a new document template with the name EMAIL_CUSTOM_TOKEN_MAPPING using Document Generation — Manage Document Template.
  2. Map the fields on the document template that represent the email tokens. This is done using Document Generation — Manage Document Template Mapping.

In these steps, you are creating a document template that contains a list of email tokens.

Document Template

The screenshot of an example document template

The standard Template ID for a document template is EMAIL_CUSTOM_TOKEN_MAPPING. When you create a new template in Document Generation- Manage Document Template, ensure that the Template ID is EMAIL_CUSTOM_TOKEN_MAPPING.

Configure the Template Content with the tokens that you want to map. SuccessFactors recommends adding the prefix CT_ to avoid confusion between the standard email tokens and the custom tokens.

The example template will map the Department field.

For a complete list of the fields used in the Document Generation Template screen, see the SAP Help Document: Field Details for Document Template Screens.

Document Template Mapping

The screenshot shows an example of a document template mapping

After creating the custom token template, you must map the custom tokens using Document Generation- Manage Document Template Mapping. After mapping the custom tokens, you can insert the custom tokens in the email template in Email Services.

The example mapping is for the Department field.

Consider the following:

  • Only the tokens that are mapped in Document Generation- Manage Document Template Mapping will appear in the email template token list.
  • Fields from custom MDF objects cannot be mapped to custom tokens.
  • Custom tokens are not supported in Nudge email notifications.
  • Custom tokens are not supported in templates with trigger (ONB) Suite mapping error.

Create Custom Tokens in Email Templates

Business Example

The organization wants to add more dynamic information to the email notifications sent during new hire onboarding processes. This creates more personalized messages for all employees involved in the onboarding process.

In this exercise, you will create custom tokens that will be used on email templates.

Task 1: Create the Email Custom Token Mapping Records

Steps

  1. In the instance, navigate to Document Generation — Manage Document Template using the Action Search box.

  2. In the Create New dropdown list, search for and select Document Generation Template.

  3. Complete the following for the record:

    Template IDEMAIL_CUSTOM_TOKEN_MAPPING
    Template NameEMAIL_CUSTOM_TOKEN_MAPPING
    CategoryDocument Generation
    LanguageEnglish US
    Template Content

    [[CT_Company]]

    [[CT_JobTitle]]

  4. To save the document template, choose Save.

  5. In the Action Search box, search for Document Generation — Manage Document Template Mapping.

  6. In the Select Template, choose EMAIL_CUSTOM_TOKEN_MAPPING.

  7. Map each of the custom tokens:

    PlaceholderBase ObjectTarget Field
    CT_CompanyJob InformationCompany
    CT_JobTitleJob InformationJob Title
  8. To save the mapping, choose Save.

Task 2: Use the Custom Token in an Email Template

You will use an custom token in an existing email template, but you will not save the changes.

Steps

  1. Navigate to Email Services.

  2. Select (OFB) Farewell Message Template.

  3. Select Customize.

  4. Click Step 2, then Step 3 to move to the Email Content.

  5. Click the Insert Token, and notice the inclusion of the custom tokens in the list.

  6. Return to Admin Center, without saving any changes.

Summary

  • Add dynamic custom tokens to emails for personalized onboarding notifications.
  • Create a Document Generation template named EMAIL_CUSTOM_TOKEN_MAPPING listing token names, using CT_ prefix.
  • Map each token in Manage Document Template Mapping to onboarding fields and save.