Using the SF Marketing Cloud action you can also push or pull data from your data extensions. If you have data extensions, you probably already have a good idea how useful this data can be in your surveys! For the purpose of explanation let's say, for example, we want to collect feedback on service tickets. Since each subscriber could have multiple service tickets we have this information stored in an Salesforce Marketing Cloud data extension. In this tutorial we'll use this example to discuss pulling and pusing information to this service ticket data extension.
Action Modes: Push and Pull
First things first, if you haven't already done so, you'll need to start by setting up the integration itself. Check out our Salesforce Marketing Cloud Tutorial for steps to setup the integration!
Once you have linked your account, create a survey for testing and go to the Build tab and add a click Add New Action on the page where you need your SF Marketing Cloud action. There are two action modes available: Pull or Push.
The Pull action allows you to pull subscribers from SF Marketing Cloud and populate survey questions from subscriber attributes and/or data extensions in your SF Marketing Cloud account. When pulling from data extensions you have two options for how you want to use the data extension data:
- Populate Survey Fields - If you choose to Populate Survey Fields, this will pull a single record, either the earliest or the latest.
- Make Data Available for Piping - The option to Make Data Available for Piping will make the data from your selected source data field within the data extension available to pipe into answer options and/or to repeat questions or pages in your survey.
The Push action allows you to add and/or update subscribers and/or data extensions and set custom attributes.
If your action is not pulling account information check out the troubleshooting section below for some common problems.
Pull Example 1 : Use Data Salesforce Marketing Cloud Data Extension to Populate Survey Fields
Continuing with our above example, let's imagine that we want to use the data in our service ticket data extension to collect feedback on the customer's most recent service interaction. As such, we'll populate fields in our survey from the service ticket data extension so that we can display the details of the ticket to the customer to jog their memory.
We've already set up our integration so we can jump right in to adding an action to our survey. If you haven't already done so, you'll need to start by setting up the integration itself. Check out our Salesforce Marketing Cloud Tutorial for steps to setup the integration!
1. Add fields to your survey to store the data you will pull from your data extension. In our example we'll be storing each field from our Service Ticket Data Extension; as such, we created a Hidden Value action for each field on the first page of our survey.
2. Add a SF Marketing Cloud - Pull action so that it precedes the survey fields you will populate.
3. Select the SF Marketing Cloud account and the Business Unit (optional for Enterprise 2.0 accounts) you wish to pull from.
4. Check Populate from Data Extensions (you can actually pull simultaneously from both subscriber attributes, as well as, data extensions).
5. Select the Data Extension you would like to pull from.
6. At this point you'll need to save your action and edit it in order for Alchemer to access the data extension to provide you with the remaining options.
7. When you return to your action select Populate Survey Fields in the Data Extension Usage field and choose whether you would like to Populate from latest record or Populate from earliest record if multiple records exist. In our example, we'll select the Populate from latest record since we want to pull a most recent service ticket.
8. Indicate the Lookup field in the data extension from which you would like to pull. Then specify the field in the survey or URL variable where that field can be found.
9. Finally, scroll to the Map Data Extension section and map each field in the data extension that you wish to store or use in the survey to a Alchemer Question.
Now we can send out links with the email URL variable (as it is defined as the lookup field) attached...
http://survey.alchemer.com/s3/1234567/feedback?email=email@address.com
...and it will pull the most recent service ticket info.
Pull Example 2 : Use Data Salesforce Marketing Cloud Data Extension to Repeat Survey Questions
Continuing with our above example, let's imagine that we want to collect feedback on ALL of the customer's service interactions. As such, we'll use the option to make data available for piping so that we can repeat questions for each service ticket.
We've already set up our integration so we can jump right in to adding an action to our survey. If you haven't already done so, you'll need to start by setting up the integration itself. Check out our Salesforce Marketing Cloud Tutorial for steps to setup the integration!
1. Add fields to your survey to store the data you will pull from your data extension. In our example we'll be storing each field from our Service Ticket data extension; as such we created a Hidden Value action for each field on the first page of our survey.
2. Add a SF Marketing Cloud - Pull action to any non-terminal page; typically you'll want your pull actions to be on the first page of your survey so the data is available right away.
3. Select the SF Marketing Cloud account and the Business Unit (optional for Enterprise 2.0 accounts) you wish to pull from.
4. Check Populate from Data Extensions (you can actually pull simultaneously from both Subscriber Attributes, as well as, data extensions).
5. Select the Data Extension you would like to pull from.
6. At this point you'll need to save your action and edit it in order for Alchemer to access the data extension to provide you with the remaining options.
7. When you return to your action select Make Data Available for Piping in the Data Extension Usage field and choose the Piping source. The Piping source is the data you wish to use in piping, either to populate answer options in a question or repeat a question or page. In our example, we selected the closedby field so that we can use the service rep's name to jog the customer's memory.
8. Indicate the Lookup field in the data extension from which you would like to pull. Then specify the field in the survey or URL variable where that field can be found.
9. Next, we'll create the question or page we wish to pipe. Again, using piping you can use the piping source data to populate answer options (aka Option Piping) or to repeat a question (aka question piping/repeating) or page (aka page piping/repeating). On the Piping tab we'll select the SF Marketing Cloud - Pull action that we created and set up to pipe as our piping source.
10. Finally, in the case of question and page piping, you'll need to use the piping merge codes to display the piped information in your question.
Now we can send out links with the email URL variable (as it is defined as the lookup field) attached...
http://survey.alchemer.com/s3/1234567/feedback?email=email@address.com
...and it repeat the satisfaction question for each service ticket record.
Push Example 1: Send Survey Data to a Salesforce Marketing Cloud Data Extension
Finally, let's imagine that we want to send the feedback collected in the survey back to our service ticket data extension. We can setup a push action to do so!
Before we set up our push action we'll need to add fields to the data extension to store the feedback.
1. Start by adding a SF Marketing Cloud - Push action on a page that follows the fields you wish to push to SF Marketing Cloud.
2. Select the SF Marketing Cloud account and the Business Unit (optional for Enterprise 2.0 accounts) you wish to push to.
3. Check Push to Data Extensions (you can actually push to both subscriber attributes, as well as, data extensions).
4. Under Data Extensions select a Data Extensions Folder and a Data Extension.
5. At this point you need to save your SF Marketing Cloud - Push action in order to pull the available fields to push to.
6. When you return, start by choosing your Data Extension Push Type. In our example we will push to the same data extension record so we'll select If record exists update, else create new.
7. Under Fields to Pass at the bottom of the panel finish setting up your push action by select the corresponding Alchemer Question for each SF Marketing Cloud data extension field you wish to push to.
You'll notice we chose to map only the 2 new fields plus the data extension's primary key; don't forget the primary key!
Troubleshooting
Is your action not working? Below are the most sources for this trouble.
- API access is not turned on in your Salesforce Marketing Cloud account.
- Your Salesforce Marketing Account does not have Read/Write API access.
- The WSDL / E2.0 account / Subscriber Key settings are wrong.
- Your Salesforce Marketing Cloud account is using the Restrict Logins by IP Address (IP Whitelisting). If so, reach out to us for the IP that must be whitelisted to use this integration. Learn more.