When you send outbound email campaigns using SAP CRM marketing, you can personalize the content for each user. Contacts will receive an email that contains their name, title, and other information you want to tailor specifically for each recipient. Similarly, when composing emails and Web chats in the SAP CRM interaction center, agents can also dynamically personalize the content of each email or Web chat message.
Key Concept
A mail form contains the message that you send to business partners in conjunction with a marketing campaign. The layout and content of a mail form can be adapted based on the communication channel of the campaign (email, letter, fax, or text messaging). For email campaigns, the mail form contains the HTML or text that contacts receive during campaign execution.
When you think of mass email campaigns, form letters with the same generic content for everyone on the distribution list might come to mind. Do you really want to buy something from a company that promises a great customer experience, yet refers to you as a “Dear Valued Customer?” You may wonder, “How can a company serve my needs, if it doesn’t seem to know my name, my title, or anything else about me?”
With personalized mail functionality in SAP CRM, you can customize the content of outbound email campaigns so that the content is targeted to each contact who receives the campaign. You can also personalize the content of email and Web chat responses sent by contact center agents using SAP CRM interaction center. This can be used to personalize salutations (e.g., “Dear Thomas” or “Dear Ms. Davis”) or to include other information about the contact, such as a title, address, or company name, in the body of the email or Web chat message. SAP CRM also allows you to expand this functionality to include information from any database table, including a Z table that you create, as well as from other sources.
Let’s explore the ways in which email personalization can be used and then go through an example in which you embed standard text into an email to support customized content.
Overview of Email Personalization
When you launch an email campaign, one of the first steps in the process is creating the mail form. The mail form contains the content, typically in HTML format, that ultimately goes to your target group. You can access the mail form creation tool from the CRM WebClient using the marketing professional business role via menu path Marketing > Create > Mail Form.
Start by creating the form as you normally would. You need to specify an ID for the form, specify the language, enter a description, specify usage (i.e., email, fax or text messaging), and enter the subject line. In addition, you need to select the attribute context, which controls the personalization fields that are available. SAP delivers the attribute context named ERMS, which stands for Email Response Management System (the attribute context is called Email Response Management in the newest versions of SAP CRM). This ERMS attribute context provides many commonly-used contact attributes, such as last name, first name, title, and physical address fields. If you need to insert these common fields into your mail form you will want to assign attribute context ERMS to your form (Figure 1).

Figure 1
Selecting the attribute context for the mail form
The ERMS solution is actually designed to help automate the handling and processing of mass inbound emails; ERMS is not specifically designed to support the creation of personalized outbound marketing emails as described in this article. Thus, not all ERMS attribute categories and attributes are available for inclusion in outbound marketing emails. For example, certain attribute categories (e.g., business date clipboard) can only be used when processing inbound ERMS emails in conjunction with the SAP CRM interaction center. When creating mail forms to be used with outbound marketing emails, we restrict ourselves to using attributes belonging to the business partner (ERMS automated process) attribute category.
To insert a personalized field into your form, first click the Attribute button. A dialog box listing all of the available fields appears. Next, select the field you want to add to the form. In this example, let’s choose Person: First Name so that the salutation in the final email will contain the contact’s name. When you click the Insert button (Figure 2), a placeholder for the field is added to the form (Figure 3).

Figure 2
Adding a personalization field to the form

Figure 3
The placeholder for Person: First Name appears on the form
Note
When you personalize the mail form, it is important to carefully review the data for the contacts who will receive the campaign. Before sending the campaign in this example, verify that each contact in the target group has a valid first name and that it is properly entered with correct capitalization. Otherwise, recipients may receive an email that begins with “Dear Contact:” or “Dear THOMAS:,” which would be undesirable. To get the benefits of personalization, you must invest some time and effort in data cleansing. There are multiple ways a company could handle this (e.g., using conditions to handle null values).
Expanding the Personalization Functionality
SAP CRM marketing allows you to personalize your mail forms using virtually any field from any table in the system. To do this, you configure a new attribute context and assign a structure to it. The structure contains the extra fields that are available when the attribute context is assigned to a mail form. You then insert ABAP code in a Business Add-In (BadI) to populate the fields in the structure. Let’s take a closer look at each of these steps.
Code is involved only when the user wants to expand the functionality to include a field that is not included in the standard personalization of a mail form. In the vast majority of instances, mail forms include things like salutation, name, and title, which are standard fields.
Step 1. Enter configuration transaction SPRO and follow menu path Customer Relationship Management > Marketing > Marketing Planning and Campaign Management > Personalized Mail > Maintain Attribute Contexts for Mail Forms. Next, click on New Entries to create an attribute context. You need to give your attribute context a name in the customer name space. The name must begin with the letter Z. Also enter a description for the new context. Finally, specify whether the attribute context includes any marketing attributes. If an attribute set is specified here, the marketing attributes within it can be dropped into a mail form. This example is not intended to outline the marketing attributes feature, so we’ve chosen option 2, Without marketing attribute sets (Figure 4). In this scenario, we pull values from a table named ZVALUE, which is a generic table of values that is used to associate groups of codes and values.

Figure 4
Defining the attribute context
Step 2. Select the new attribute context and double-click Structure to specify the record structure that contains the fields we ultimately want to place on the mail form. Since we are reading from table ZVALUE in this example, that structure is specified (Figure 5).

Figure 5
Assigning a structure to the attribute context
Step 3. Next, select the structure name and double-click Fields to specify the fields that are available in this attribute context. In this example, we choose VALUE and DESCR so that we can pull two fields from the ZVALUE table (Figure 6). If you want to expose all of the fields in the structure to the attribute context, you can check All Fields in the previous step. If this option is checked, you do not need to specify the individual fields that you want to populate.

Figure 6
Selecting fields from the structure
Step 4. After the attribute context has been defined, the last step is to implement a BAdI to populate the fields in the specified structure. To do this, go back into SPRO and follow the menu path Customer Relationship Management > Marketing > Marketing Planning and Campaign Management > Campaign Execution > BAdI: Maintain Additional Attributes for Mail form Attribute Contexts. When you select this option, you are prompted to enter an implementation name, which must start with a Z to match the customer name space. We use ZVALUE as the name in this example, which we defined in the previous step. Next, enter a short text to describe the implementation, and specify a filter. For this BAdI, the filter must be selected from a list of defined attribute contexts.
When you switch to the Interface tab of the BAdI builder, you will see that the BAdI has three methods. You are only required to insert code into method CRM_IM_BPSELE (Figure 7).

Figure 7
The parameters and code within method CRM_IM_BPSELE
Within that method you populate the NAME and VALUE fields on parameter table CT_ATT_VALUES. The first section of code clears the header structure ls_att_values, which has the same type as the table. You also refresh the table to initialize it, and clear the parameter named cv_not_send. The next line of code reads the ZVALUE table to find a record that has PERS_MAIL in the type field and the current business partner number in the code field (Figure 8).

Figure 8
ZVALUE record for business partner 0007000021, as displayed in transaction SE16
If a matching record is found, the ls_att_values structure is populated with the name ZVALUE-VALUE, and the data in that field is placed in ls_att_values-value. The structure then is appended to table ct_att_values so that it contains one record. The next three lines of code assign ZVALUE-DESCR, along with its contents, to the header structure. The header structure ls_att_values is again appended to ct_att_values, so the table has two records when the BAdI method exits. If no ZVALUE record matching the current business partner is found, the parameter cv_not_send is set to X. This suppresses the outbound email for that partner so that you do not send a mail form that is missing personalized fields.
Note
After you insert code into the BAdI, be sure to activate both the method and the implementation icon.
Adding the Custom Fields to the Mail Form
Now that the new attribute context has been configured, you can add your custom fields to the mail form. Start by creating a new mail form and assigning the attribute context named ZVALUE to it. When you click the Attribute button to add a personalization field to the form, you will see a new entry labeled Additional Fields under Attribute Category. Selecting that option from the drop-down list makes the list of custom fields appear. In this example, those fields are Description and Value (Figure 9).

Figure 9
The custom attributes appear in the Insert Attributes dialog box
Personalized Content in the Interaction Center
In addition to being able to customize the content of outbound email marketing campaigns, it is similarly important for contact center agents to be able to quickly personalize the content of individual emails and Web chat messages. The SAP CRM interaction center is the agent-facing desktop application that contact center agents use to interact with customers, whether through telephone, email, or Web chat. While telephone has historically been the predominant communication channel used in most contact centers (hence the term “call center,” which is often used synonymously with “contact center”), over the past years use of email and Web chat within contact centers has been increasing steadily.
Even during telephone-based interactions, it is also sometimes necessary for an agent to compose an outbound email to a customer. For example, it is impractical for an agent to read a 50-page installation guide to a customer over the phone; rather, the agent would likely say, “I’m going to email you a document.” Fortunately, the same type of personalized mail forms (including custom fields) available in outbound marketing campaigns are also available for use within the interaction center.
The main difference between using mail forms as part of outbound marketing campaigns and using mail forms in the contact center has to do with the broad and unpredictable nature of customer inquiries that arrive. When creating an outbound marketing campaign, a marketing professional knows exactly what the content of an email contains, and they craft an appropriate email template perfectly suited for each campaign. However, in the interaction center, each customer email or Web chat request could be in regard to any number of issues – some of which are quite common, but others are difficult to anticipate. Hence, it is important to provide contact center agents with access to a extensive variety of templates (i.e., mail forms) from which they can select when composing emails or Web chats. When possible, it is further desirable to try to anticipate which templates the agent likely needs and to make these particular mail forms readily available to the agent without the need for searching.
Creating and Editing Mail-Form Templates from the IC Manager Business Role
The same tool that is used by marketing professionals to create mail forms can also be accessed by contact center analysts from the CRM WebClient using the Interaction Center Manager business role, designated in some selections as IC Manager, via menu path Knowledge Management > Create > Mail Form. The process for creating new templates is the same as described earlier in this article.
In addition to creating new mail form templates, it is also possible to search for and edit existing mail form templates, regardless of whether you use the IC Manager or Marketing Professional business role. To search for and edit an existing mail form template from the IC Manager role, follow menu path Knowledge Management > Search > Mail Forms. To locate an existing mail form template, you can search by a variety of fields (e.g., mail form ID, mail form description, campaign ID, campaign description, usage, language, created by, created on). For example, if an analyst wants to locate and edit all mail form templates that are used by agents as part of their closing signatures, the analyst can search using the field Mail Form Description that contain signatures (Figure 10).

Figure 10
Searching for a mail form template
Standard Responses in the Interaction Center
Mail forms are especially useful for contact center agents who deal with customer emails or Web chats on a regular basis. An agent performs faster and is less error prone by composing an email or Web chat using one or more predefined templates, rather than trying to type every response from scratch. Agents can access mail form templates from both the email editor and the chat editor interfaces inside the interaction center using the standard response functionality, in which the agent can either select templates from a drop-down list or search for less frequently used templates from an extensive repository. In addition, mail form templates can even be selected and inserted automatically into reply emails by the Email Response Management System (ERMS) using either the auto prepare or auto respond functionality.
When logged into the contact center, an agent can search for and locate any existing mail form in the system. From either the email editor or the chat editor screen, the agent chooses the value More from the field labeled Std Response in order to navigate to the standard response search screen. In the search screen, the agent selects from a variety of search criteria. After clicking on a standard response in the search result list, a preview of the mail form is generated and shown to the agent to ensure the agent chose the correct template (Figure 11).

Figure 11
A preview of a mail form as displayed for an agent
Once an agent locates the desired template, the agent clicks the Select button and then is automatically returned to the email editor or chat editor. The agent then places the cursor into the desired location inside the email or chat message that he or she is composing and clicks the Insert button to the right of the standard response drop-down list box. At this point the selected mail-form template automatically populates into the email or chat message (Figure 12).

Figure 12
Populated mail form
All variables and custom fields are automatically filled into the body of the message. Optionally, if any value is maintained in the Subject field of the mail form, the subject automatically is appended to any existing value that has been entered in the email subject line (for example, note the subject line, “Experience the powerful elegance of Audi’s high-performance SUV” in Figure 12).
Standard Response Groups
While it is useful that contact center agents can manually search for any existing mail form template that is maintained in the system, it is arguably a time-consuming and cumbersome process to search for and select each template that the agent needs to use when composing email or chat responses. It is more convenient if the agents can easily and quickly select frequently used templates without the need to search.
This is possible by utilizing a standard response group, which is a grouping or collection of chosen mail form templates. You can create a standard response group from the SAP Customizing Implementation Guide via the SAP GUI menu path SAP Customer Relationship Management > Interaction Center WebClient > Basic Functions > Communication Channels > Define Standard Response Groups.
For each mail form template that you want to include in a given standard response group, enter a descriptive ID (e.g., Z_CHAT) under the Std Response Group field coupled with the mail form ID of the desired mail form template under the Form Name field. To include multiple mail form templates in the same standard response group, you simply make multiple entries with the same value for the Std Response Group field and different values for the Form Name field (Figure 13). You can later assign these standard response groups to the desired email or chat profile.

Figure 13
Maintaining multiple mail form templates in the same standard response group
To assign a standard response group to an email or chat profile, choose the IMG menu option Define E-Mail Profiles or Define Chat Profiles, respectively. Then select the desired email or chat profile and enter the desired value in the Std Response Group field (Figure 14).

Figure 14
Selecting an email or chat profile for the Std Response Group field
Note that the pop-up box in Figure 14 is somewhat misleading in that multiple entries are shown for the same standard response group, with a separate entry corresponding to each form name that is included in the standard response group. However, it does not matter which of the entries you select for a given standard response group, as only the standard response group itself (and not the selected form name) is filled into the email profile or chat profile.
After selecting the desired standard response group and saving the changes to the email or chat profile, the various mail form templates assigned to the standard response group are then available to contact center agents in the standard response drop-down list box (in either the email editor or the chat editor) without the need perform any search (Figure 15). You still need to assign the email and chat profiles to the appropriate agent-facing CRM business role first, as per normal configuration.

Figure 15
Assigned mail form templates available to agents
ERMS Auto Prepare and Auto Respond
So far we have discussed how agents can leverage standard responses either by selecting predefined (e.g., important or frequently used) templates from a drop-down list box or by manually searching for less frequently used templates. However, there is one additional manner in which standard responses can be utilized as part of the ERMS automated functionality.
It is possible to have the ERMS system automatically select and insert mail form templates directly into an outbound reply email without any manual involvement by the agent. Using the auto reply feature of the ERMS, the system will automatically find the appropriate mail form templates (based on keywords that have been mapped to specific mail form IDs in the category modeler tool) and then generate and send a reply email directly to the customer without the involvement of any actual person.
Alternatively, using the auto prepare feature of ERMS the system will similarly identify and insert the appropriate mail form templates automatically when the agent selects a customer email from the agent inbox. Rather than automatically replying, the system simply composes the email and then allows the agent to make any changes or additions (if necessary) before the agent sends the email.
William R. Pritchett
William (Bill) Pritchett has more than 25 years of IT industry experience and has worked at Dow Corning Corporation for the past 16 years. Over the past eight years he has focused on the company’s CRM systems and processes. His current responsibilities include expanding the capabilities of Dow Corning’s SAP CRM 7.0 system.
You may contact the author at bill.pritchett@dowcorning.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.

John Burton
John Burton is a director of product management at SAP and is responsible for the SAP CRM Interaction Center (including ERMS) and social CRM topic areas. John has 13 years of experience at SAP and has been involved with SAP CRM and the Interaction Center since 1999. He is also the author of Maximizing Your SAP CRM Interaction Center, available at the SAPinsider Store. John is an alumnus of the University of Michigan and Central Michigan University. John can be found on LinkedIn at www.linkedin.com/in/sapjohnburton.
You may contact the author at john.burton@sap.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.