When you use SAP CRM Marketing to send out an email marketing campaign, you should offer a way for recipients to opt out of subsequent emails from your company. Learn how to provide this functionality using standard HTML commands to generate opt-out requests and the E-mail Response Management System to process these requests and automatically update a marketing attribute.
Key Concept
You can accommodate opt-out requests by assigning a marketing attribute to the SAP CRM contact record. You can then maintain and reference this attribute when you execute email campaigns. This prevents users who have opted out of campaigns from receiving future emails from your company. SAP CRM Marketing provides all the tools you need to execute email marketing campaigns. These kinds of campaigns are a cost-effective way to communicate with contacts in your SAP CRM database and tell them about your products and services. However, when you send mass emails, you must comply with regulations such as the CAN-SPAM Act of 2003. That provision (which became law in the US in December 2003) established national standards for the sending of commercial email. It includes a requirement that unsolicited emails must contain a visible and operable unsubscribe mechanism. Similar laws have also been enacted in other countries to protect consumers from receiving unsolicited emails.
Even if your campaigns include contacts who are not in countries where such laws exist, it is a good business practice to offer an unsubscribe option. This allows you to eliminate contacts who are not interested in your company’s products and services from subsequent campaigns, allowing you to focus your resources on more viable prospects.
You can take several approaches to design an opt-out mechanism. We’ll show you a simple way to provide this functionality using both SAP CRM Marketing and the E-mail Response Management System (ERMS).
Design the Mail Form
Start by adding a hyperlink to the mail form for your email campaign. Somewhere in the <BODY> section of the HTML, typically toward the bottom of the form, you should insert code that includes the mailto: command (Figure 1). The mailto: command is followed by the email address that will receive the opt-out request. The subject and body parameters allow you to control the content of the message that is automatically created when the recipient clicks the “unsubscribe” hyperlink.
You may <A href="mailto:unsubscribe@yourcompany.com?subject=Request%20to%20Unsubscribe& Body=Please%20take%20a%20moment%20to%20let%20us%20know%20why%20you%20are%20choosing%20 to%20unsubscribe:">unsubscribe</A> if you do not wish to receive email in the future. |
Figure 1 | HTML code for the unsubscribe link |
In this example, the opt-out request will be sent to the email address unsubscribe@yourcompany.com. The %20 values in the code are placeholders for the space character, so the command sets the subject line to “Request to Unsubscribe” and the body of the note to “Please take a moment to let us know why you are choosing to unsubscribe.” By adding this text to the message body, you can encourage contacts to provide you with information explaining why the campaign did not meet their needs — which, over time, can help you refine your email campaigns to make them more relevant for your target audience.
When the email campaign is executed, the embedded mailto: command causes each recipient’s email message to contain an unsubscribe link that looks like this: “You may unsubscribe if you do not wish to receive email in the future.” Clicking the hyperlink invokes the user’s email program and automatically creates a new message that has the recipient, subject line, and body specified (Figure 2). By simply clicking send, users submit their request to opt out of future email campaigns.

Figure 2
Sample version of unsubscribe email
Flag Contacts Who Opt Out
When customers send a request to opt out of future email campaigns, you need to set an indicator on their contact record. In this example, we show you how to use a marketing attribute to store this information. When the opt-opt request is submitted, you can automatically set the marketing attribute to exclude the contact from subsequent campaigns.
Start by entering transaction CRMD_PROF_CHAR in the SAP GUI or by following SAP CRM menu path Marketing > Create > Marketing Attribute. This allows you to create a marketing attribute named OPT-OUT. This attribute has a data type of CHAR and is one character in length. It contains a value of Y if the user has requested to opt out; otherwise, it contains a value of N, which is the default (Figure 3).

Figure 3
Marketing attribute OPT-OUT and its properties
Next, use the same menu path (or SAP GUI transaction CRMD_PROF_TEMPL) to add the new attribute to the attribute set named GENERAL. (This set was used in Bill Pritchett’s article “How to Create Custom Filters for Segment Builder” posted to the CRM Expert knowledgebase in December 2008.)
As Figure 4 illustrates, this attribute set now contains two attributes. The NEWSLETTER attribute is used to select the contacts who have subscribed to the email campaign. This attribute can be manually set by users as they create and update contact records in the system. The OPT-OUT attribute indicates which contacts have opted out of the campaign.

Figure 4
Attribute set containing two attributes
When the attribute set GENERAL is assigned to a contact, the two marketing attributes named NEWSLETTER and OPT-OUT are automatically assigned with their default values (Figure 5). Note that the OPT-OUT attribute initially had a value of N to indicate that the user has not requested to opt out of the email campaign.

Figure 5
Values of marketing attribute OPT-OUT
Process the Opt-Out Request with ERMS
When the customer’s opt-out email request is received, you can configure the system to automatically update the customer’s marketing attributes (e.g., setting the OPT-OUT marketing attribute to value Y) using ERMS. You can do this using the ERMS action UNSUBSCRIBE. Although not originally delivered as part of the standard SAP code line, you can enable this action as standard functionality in SAP CRM 2006s (SAP CRM 6.0), SAP CRM 2007, and SAP CRM 7.0 by applying the advance correction delivered in SAP Note 1455745. You should keep in mind that the note contains some additional steps that you must apply manually.
After fully applying this note, the new UNSUBSCRIBE action is automatically available in both the ERMS repository in the IMG and the ERMS context of the Rule Modeler. While outside the scope of this article, it is worth noting that you can potentially use the UNSUBSCRIBE action (despite its name) to update any marketing attribute you desire, making it useful for much more than just handling marketing unsubscribe requests.
To use the new ERMS action, you need to create a rule in a new (or existing) rule policy in the ERMS context of the Rule Modeler. To access the Rule Modeler, log on to the CRM WebClient UI using the IC Manager business role. Then, click the menu option Process Modeling and either Create > Rule Policy (to create a new ERMS rule policy) or Search > Rule Policies (to modify an existing ERMS rule policy).
After you have created a new rule policy or selected an existing rule policy for modification, you need to create a new rule that uses the UNSUBSCRIBE action. In our example, we created a rule named Unsubscribe with the description Unsubscribe e-mail sender, but you are free to use any name and description you desire (Figure 6). You also need to add a condition to the rule. In our example, we stipulated that the unsubscribe action should only be executed if the subject of the email contains the word “unsubscribe.”

Figure 6
Create a new rule
After adding the condition, you need an action. Select the action Unsubscribes Email Sender and then enter the appropriate parameters for the Marketing Attribute Set, Marketing Attribute, and Marketing Attribute New Value as shown in Figure 6 (using the values you created earlier). In this example, the Marketing Attribute Set should be GENERAL, the Marketing Attribute is OPT-OUT, and the New Marketing Attribute Value should be Y.
You can then save and release the draft rules via the menu option More > Release Draft Rules and Save. After the rule has been released, any incoming emails that contain the word unsubscribe in the subject trigger the underlying code in ABAP class CL_CRM_ERMS_AH_UNSUBSCRIBE to update the sender’s marketing attributes as specified in the parameters of the rule action.
As we mentioned earlier, you may want to ask the recipients to indicate why they want to opt out of future marketing emails. If such an approach is used, then you would probably also want to route the email to someone in the marketing department who is responsible for analyzing why customers are opting out of marketing communications. You can easily route the email to the appropriate person by adding a second action to the existing rule (beneath the unsubscribe action, for example) using the Forward Email action in conjunction with the Forward To parameter for specifying the email address of the responsible Marketing employee.
Use the Marketing Attribute in Subsequent Campaigns
After you implement the unsubscribe functionality, you’ll want to begin using the OPT-OUT marketing attribute to remove any contacts that have Y in the attribute from future campaigns. You can do this by creating a custom filter based on the marketing attribute.
To create a custom filter, follow SAP CRM menu path Marketing > Create > Segment (or in the SAP GUI, use transaction CRMD_MKTDS). Start by specifying a name for your profile set and then click Graphical Modeler to proceed. For this example, locate the attribute list named General Filters (which was used in Bill Pritchett’s article on filters referenced earlier) and add a second custom filter to it. The new filter is based on the marketing attribute named OPT-OUT, and its properties select values equal to Y (Figure 7).

Figure 7
Create a filter
Now you can use the two custom filters in the General Filters list to create your segment. First, drag the Receive Newsletter filter into the profile set to select all of the contacts who have the value Y in this marketing attribute. This includes all the contacts that are subscribed to your email newsletter in the target group. Next, drag the new Requested Opt-Out filter into the profile and specify the Remove option (Figure 8). When you save the profile set and create the target group, only the contacts who subscribe to the email newsletter and have not requested to opt out of future campaigns are included.

Figure 8
Drag the filter to the Remove option
Other Applications for This Approach
In this overview, we focused on creating an opt-out feature for your emails. However, you can easily adapt the same solution to meet other requirements. For example, if your email campaign includes hyperlinks for obtaining product samples, requesting literature, or contacting your company, you can use the mailto: command to generate additional email messages. By directing these requests to specific email addresses and looking for key words in the subject line or message body, you can use ERMS to intelligently route and process these messages.
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.

Vinod C
Vinod C is the developer at SAP for SAP CRM Interaction Center. Vinod has four years experience with Interaction Center and has been involved in SAP CRM since 2005. He specializes in SAP CRM Interaction Center (both WinClient and WebClient), ERMS, and Call List functionality. His current responsibilities include support and maintenance of the SAP CRM Interaction Center.
You may contact the author at vinod.c@sap.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.