Skip to Content

Create, run and analyze an E-Mail Campaign with a Survey (Part 1)

In the SDN CRM Forum (SAP CRM: Webclient UI – Framework) Pankaj Arora ( and Devi b ( requested some help on the Topics Customer Response to a Survey (Customer Response to a Survey) and Email Campaign (Email Campaign). I will describe how can create a Survey which is used in an E-Mail Campaign. Also I will show how the submitted survey can be saved in an activity and analysed using CRM only. This first part shows how to create prepare the Survey Suite and create a Survey and the URL needed for the E-Mail.

h3. Prepare Survey Suite To use Surveys in E-Mail Campaigns we had first upload a parameter XML file to the Survey Repository. A description of the structure of parameter XML files can be found in SAP Support Note 836945 – Survey Tool: Empty dropdown boxes during the URL generation. Fist you have to prepare a XML File like this: h3. Create a Survey Surveys which then can be used in marketing campaigns are created using transaction CRM_SURVEY_SUITE. Surveys for marketing campaigns have to be created in the folder “Marketing”. Navigate to this folder and click “Create” (F5). You have to provide a Name for your Survey. Don’t use space here because that will cause problems if you want to send out the Survey as a link:

You will get Information that the survey does not yet exist and a new template is generates:

Now you see the main screen of the Survey Builder:


Now double click on an item in the tree on the left hand side. Then you get an input field in the upper right window where you can edit for example the text of the title. If you want to enter more than one line of text click on the “Text” icon beside the input field:


To edit the questions you have to expand the tree on the left hand side.

New Questions can be added via the Context menu when you right click on the Section. An Initial Question is always available. To change the answer possibilities you have to open the Answer leave and provide an “Answer Category”:

These are all possible Values:

Save Survey

When you have finished your Survey it maybe looks like this:

Now it’s time to save it. Hitting the save button you first had to provide a Description:

To allow us to analyse the survey answers switch to the “Technical Settings” and activate the check box “Evaluation Without Business Information Warehouse”:

Also make sure that this PBO and PAI modules are provided (CRM_MKTCA_SURVEY_MKT_PBO and CRM_MKTCA_SURVEY_MKT_PAI):

Ignore the warning that the PBO and also the PAI Module should be of type “CRM_SVY_…_PBO” or “CRM_SVY_…_PAI”:

Generate Survey URL

Before we can generate a Survey URL we had to activate our Survey by clicking “Activate” (Strg + F1) in the Survey Suite main window. With our active Survey in place and the preparation before we can now generate a Survey URL by clicking on “Generate URL” (Strg + Shift + F1).

You must be Logged on to comment or reply to a post.
      • Dear George,
           Thanks for providing a very useful information. Can you please help me in finding the results of Survey Suite.


        • Hello Madhu,

          thanks for asking here in the Blog. You can get the survey results directly in the SAP GUI Transaction CRM_SURVEY_SUITE. This transaction is still supported. I’ve raised an SAP Support Message and got this answer. Also you can try to evaluate in BW. Campaign Survey Results can be a good start.

          Best regards

          • Hi Gregor,
                      I had created the survey and also the XML file in Survey Suite and also created an URL But when i am trying to test the URL. I am facing a problem while trying to Debug it is showing an ” Survey Locked”. Can you please help me out in this regard.

            Thirunahari Madhu

          • Hello Madhu,

            You can put a breakpoint in Survey PAI module and start the survey URL generation(debugging).Please check that the latest version of survey is activated or survey is not in use in some of the one order transactions.

            SAP Ireland

    • Hi Gregor,

      I did all steps what you given with screen shots.
      but aftert that warning When i am egnoring the warning message the below error comes
      ” program CONNECTOR_CRM_800 not registered / CPI
      CALL: ‘ThSAPECMINIT’#Transaction program not 
      registered “

      Can you pls help me out


  • Hi,
    My requirement is as follows:-
    Receiver of the e-mail survey campaign needs to enter free text ( around 100 alphanumeric) as comment.
    Can you please clarify, how this is to be achieved?, where this data is saved ?
    thanks in advance !
    • Hello,

      as far as I remember you can customize that for every submitted survey a activity is created which can contain the filled out survey. When you add a text field to the survey you should see the comment then in the acitvity.


      • Hi Gregor,

        As stated above, for every submission of survey we can create activity in backend which can have the feedback of survey in that activity.

        Can you please give details of customizing on how to get activity created once user submit his/her feedback?

        Thank you,
        Dhanraj Dange

        • Hi Dhanraj Dange,

          there are two options to get this requirement solved:

          1) Implement the creation of the Activity in the PAI Function Module which can be specified in the Survey Suite. An Example is provided by SAP with Function Module CRM_MKTBP_SVY_ATTRIBUTE_PAI.

          2) Use the campaign automation where you can create a Activity using a communication medium “Activity Generation” with an activity template.

          Best regards

    • Hello Tarcisio,

      it is possible to create the Questions and Answers on demand. But you have to work extensively with the PBO Function module.


  • Also make sure that this PBO and PAI modules are provided (CRM_MKTCA_SURVEY_MKT_PBO and CRM_MKTCA_SURVEY_MKT_PAI):

    Can you give me the two FMs in detail? About code for example. Many thanks!

  • Hello Greg,

    I have generated URL for a survey referring your blog:
    But when I test it, it gives a blank screen, without any error.

    What could be the possible reason.


    • Hello Khushboo,

      could you please open a Topic in the SDN CRM General Forum because I think it could be a longer topic. Please provide your CRM Release and SP information.


  • Hello Gregor,
    Can we make a survey url generated using BSP application to general public (outside firewall)?

    In your above example, did you send this survey to general public? Or do you suggest to use HTTP?

    Best regards,

  • Dear,

    Im follow urs documentation and i have a question for you:
    1. How Can I send this campaign for lets say i want to send this survey campaign for 50 BP person. FYI i was create mail form and attach the link survey form, in the campaign where tab can be define for this case? how about the action tab function? is any spesific setting there?
    2. later, If I want to see a feed back or result response from my respondent can u tell me how to solve this?
    Many Thanks for ur attention Guru’s.



  • Hi Gregor,

    first thanks a lot for your blog. Unfortunatly our problems start directly after this blog. I do receive an eMail with a link (via campaign automization). Now I can open this link multiple times. Every time I get an empty survey that I can submit so that new answers are saved in the system. This must be a mistake but SAP describes it as standard, do you also have an easy solution for this kind of problem?

    Thanks a lot for your work on SDN, it really helps a lot!

    • Hi Rainer,

      I think the best solution to avoid incorrect results due to multiple submission of surveys is to save the User selections in Marketing Attributes. Starting with CRM 5.0 this is a standard functionality available in the Survey Transaction CRM_SURVEY_SUITE.

      Best regards

  • Hi Gregor,

    Thanks, it is really great help on survey url, i followed the same steps which u have mentioned, on last step i.e. while generating URL when i select bsp from get option it dump with runtime error “OBJECTS_OBJREF_NOT_ASSIGNED_NO” can u pls guide me what should i do to resolve it.


  • We have CRM 2007 and are live with B2C Internet Sales Application (ISA). Now we want to make Customer Surveys accessible via B2C ISA.

    For security reasons, we do not want our B2C Internet Customers to have access to the CRM system. Therefore the BSP option is ruled out. I have seen some blogs on how to enhance security for BSP option but that is also not approved in our organization so BSP option is totally ruled out.

    SAP help documenation mentions following:

    “Internet Scenarios

    Since Internet users cannot be allowed access to the CRM system for security reasons, surveys have to be made accessible in a different way. You can do this by downloading the required HTML survey to your PC. From here, you can:

    Copy the HTML survey into any Web site

    Send the HTML survey attached to an e-mail

    Internet Scenarios

    In Internet scenarios, results can be returned by the following methods:


    In this case, a mail client, for example, Microsoft Outlook, needs to be set up in advance on the client machine. Survey results are sent to a CRM Server Mail User, that is, a “machine” user. From here, the results are routed to the CRM system for further processing.



    The http(s) case is recommended, because the user does not have to have a personal e-mail account. Here, the survey results are first sent to a Survey Mailer. The Survey Mailer receives the http request and then mails the results to the CRM Server Mail User, where they can be processed. The Survey Mailer needs to be set up by the administrator at the customer.
    For presenting the Survey on ISA, we would like to take the option of Copy the HTML survey into any Web site as suggested in SAP help and would like to get back the results as per SAP help recommendation of https(s) above.”

    Detailed steps that are needed for gettting back the survey results from ISA using above options suggested in SAP help documentation.

    Please recommend any other better option (except BSP option) that you feel can be used for ISA.



    • Hi Vijay,

      I’ve experimented today a bit with the mailto method and found a way to download the survey created in CRM to a external Webserver, add some PHP script to it to process the MIG provided in a campaign and then send the form to another PHP script which will take the form data and send it as an E-Mail. I had to modify the class CL_SVY_SMTP_INBOUND because of problems with our Unicode CRM System but I’ve got it running. I’ve asked SAP via a OSS message to provide this change as a correction note. I hope I find some time to describe this solution in another Blog here.

      Best regards

      • Thanks, Gregor

        I kind of expected that you would have a solution for this.

        I would really appreciate if you could provide more details of the steps that we need to follow. If you think at this stage (till you have detailed out the full solution for a new blog) you do not want to provide all details here, would it be possible to send the sketchy steps via email ( I am not sure if this is appropriate so I leave this to your judgement.

        Thanks for you help


    • Hi Gregor,

      Thank you for your wonderful documentation..helps us alot.
      I followed the steps as suggested by you for creating a Survey.
      However, I am unable to generate a URL.

      After I have saved the survey, I activated and after the click on Generate URL, though I get the “GET Option” as BSP, https, https, I do not get anything for ‘Get File’ & ‘Send File’.

      Please provide me with steps to do so.

      Thanks a ton

  • Dear Golf,

    I need your advice on the below CRM Survey requirement.

    Requirements: We are in the process of creating Generic Survey Component which should be applicable to all the services.

    1.     Upon the service request status “complete”
    2.     The action should get trigger & this action should also maintain the verification list i.e. is this service has any questionnaire. If yes, then send it through email to the customer. Else change the status to “close”

    Proposed solution:
    1.     Create the questionnaire under activities folder using CRM Survey Suite
    2.     Define determination for questionnaires (contact or Tasks)
    3.     Define the determination criteria.
    4.     Activate the Survey
    5.     Assign Survey to a Transaction Type, Activity for example status.

    Please verify the above proposed solution and give your valuable suggestion along with the sample documentation on CRM Survey. I have also verified Building block documentation for Activity management but it doesn’t have more details.

    Question: Is it possible to system updates questionnaire and survey data directly to the SAP BW.


  • Gregor

    At the outset , my sincere compliments for you for this detailed blog .

    However I have a few questions for you and would sincerely appreciate if you can resolve my doubts based on your expertise in this area ;

    Q1 – I am able to get the survey work exactly as you mentioned as it works like a charm . However there is an issue where it asks the recipient of the survey to log in with the SAP CRM user ID . How can that be avoided . I have seen some inputs regarding making the SICF user to anonymous (system user ) but it’s still asking for user ID . Appreciate if can comment on that .
    Q2 – I am also trying an alternate option based on yout other Blog “Survey processing without opening a connection to the CRM Backend from the Internet” .However when I am testing the HTML file as mentioned in your step TEST_MAIL I get the second pop titled as Microsoft office outlook  “No profile have been created. To create a new profile , use the Mail icon in the control panel.I think its looking for MS outlook on my machine where as we use Lotus notes . Would this not work for lotus notes and secondly does this necessary needs a mail client on the respondent machinas ?Appreciate if you can help a bit more on this area as well

    Thanks again for all your help

    Sincerely appreciate it

    • Hello Victor,

      Q1: You should ask your basis administrator to save a username and password for the ICF Service crm_svy_server. Please create a special user like SURVEYUSER for this usage with an specific restrictive authorization profile.

      Q2: To avoid the problem creating the response E-Mail on the machine of the receiver of an survey you should especially look at the section “PHP Script to replace mailto action” of the Wiki Page Survey processing without opening a connection to the CRM Backend from the Internet.

      Best regards

      • Thanks so much for prompt reply .

        For Q 1 – We did set up the user with saved user name and password . But I am not sure if the user should be a ‘system’ user or a ‘service’ user . Appreciate if you can confirm .

        For Q 2 – Correct me if I am wrong , In the scenario you have illustrated in the blog pertains to when you have this HTML survey as a part of a website which is accessible to Business partner . Apologize for a silly Q but can you elaborate where this PHP script needs to be written .

        Also How do we handle this situation when we send this HTML file via an email attachment to an external user which can then open this attachment and respond back as SAP seems to pertain to this scenario in their help documentation . Can this solution be used for that scenario as well , if yes do you have any guidance on that.

        Thanks again for all your help , appreciate it

        • Q1: I think it should be a service user.

          Q2: What do you think about the idea of your company sponsoring a development for this scenario? You find my contact information on my SCN Business Card.

  • Hello Gregor,

    I hope you are doing  good.

    With reference to your SDN page

    I have a small doubt. Can I attach the downloaded HTML file and send it to my internet users(Gmail,Yahoo). Also ,do I get the values back in my survey evaluation in survey suite by this way . Obviously, I know that there would be some warning messages if we don’t implement the PHP code but can the values come back?

    Also, in the URL scenario(HTTPs)what would be the default port number of the WEB server and what would be the structure of connector ID in the structure of Parameter XML? Where else we need to set  up the connector ID so that the values from the WEB server come to the CRM server?When we upload the parameter XML it always gives error relating to connector ID. Please help .

    Thanks and Regards,

  • Dear Rita,

    unfortunately I don’t have my crystal ball with me. If you what that someone can help you here you must provide more details about your environment. How did you setup the Mailform, Survey, Campaign, what SAP CRM Release do you use …

    Best regards


    • Hi Gregor,

      thankx for your reply. I am using crm 7.0. I am sending survey (bsp) link attached with mail form. we will send this mail form in campaign. the person will recevie mail & open the survey form & save. there is no automatic determination of questionare, manual identification is their. so it the same time when a customer open n save the link the results can be seen in survey evalution. earlier it was coming back in sap business workplace(so01). so at that time I was able to see the questionnare attached & the details of bp as well. So now my requirement is to track the link as well, as who has replied on it. only answer options getting updated no other information of bp is their in evalution tab?

    • Hi Gregor,

      Thanks for both blogs about campaign and surveys. Now we are implementing an e-mail scenario for surveys with campaigns. Following your blog: “Survey processing without opening a connection to the CRM Backend from the Internet” we found some problems with the generated HTML file. When we push the Save Button the outlook new message composer just shows the recipients mail but the subject and body are empty. Do you have any idea?


      David Faustini

      • Dear David,

        as I’ve written in the SCN Wiki Entry Survey processing without opening a connection to the CRM Backend from the Internet in the section PHP Script to replace mailto action I think it’s a bad solution when you use the ACTION set to mailto:. In my example I’ve replaced the mailto: with a call of the PHP Script via http. Get someone who knows to create a service that can translate the HTTP POST parameters into an E-Mail as I’ve shown in my example.

        Best regards


        • Thanks Gregor,

          We have the last question about this, In the HMTL generated by the CRM Survey Suite there is a section with java script code, the HTML BODY that contains the survey and the buttons. Where should this PHP example code be placed? Should we replace the input?

          CODE —————

          <input name=”onInputProcessing(SUBMIT)” type=”hidden”>

                    <input class=”ButtonInside” type=”submit” value=”Save”>

                    <input class=”ButtonInside” type=”reset” value=”Restart”>

          CODE ————————-


          David Faustini

        • Hi Gregor,

          I am using CRM 7.0 Ehp1, And i have one simple query that If I run a e-mail campaign with survey attached and I am evaluting the result in BI.

          1. With the help of PAI, the activity got generated in the system…. right?…. we can check the individual response from the activity?

          2. As far as my knowledge concern that there is a standard reports available in crm named (campaign survey contact list)…is this report right?

          3. The survey answer stored in a table…..right?

          Then what is the use of using XML to extract the answer, if we can use a report directly.

          Please correct me



  • Hi Gregor,

    Like always very informative blog.

    One thing i would like to know to access surveys outside the network or access from internet does one requires a port to be opened in network firewall. Since CRM server in inside the firewall of network?



      • Dear Gregor,

        Thanks for sharing the link. But this option will not work in our scenario since at client side no one would like to go through individual responses. We are developing a separate BI report to capture responses.

        Now the only issue is to send URL to customer and make it accessible.

        I have gone through your blog – Setup SAP Web Dispatcher with URL Filter on SuSE Linux 9.0 .

        Is this the right way to achieve our requirement?



          • Dear Gregor,

            I understand the mailto option for surveys. The problem in our case is the users will not have access for GUI, hence the option to save as html file and evaluate surveys from GUI is not valid.

            We are building a solution where Marketing manager is sending the URL(CRM being used only to generate URL) to group of customers, the customer accesses the URL and fills the survey.

            Survey responses get stored in CRM tables, access them to create custom report.

            Our issue to generate URL & share with customers through email. WebDispatcher might solve our purpose.

            Through mailto options when you save survey, is it mandatory to have Outlook installed at customer place or it picks the mail domain (gmail,yahoo etc)?



          • Dear Abhishek,

            I understood your requirements but I have some doubts about the process, if the users can use GUI for URLs generation the can generate each HTML survey template too. Regarding the mailto scenario, you can avoid to answer the mails or surveys using outlook clients if you want. Gregor wrote an example of a PHP program that use some programming techniques to send the survey answers directly without calling the default mail client of the final user .

            Anyway if you think that the dispatcher is the best option for you go forward with it, I’m just trying to make clear that mailto scenario works and doesn’t need an outlook client in each client computer.