In this post, we’re going to look at how to take a survey response in CRM 2011 and update or populate a field on the respondant’s CRM record. We are going to do this using the PowerSurvey add-on and Microsoft Dynamics CRM.
For this example, I’m going to be sending out a survey to contacts in my CRM, asking them for their business phone number, using a survey. I then want that information to come back into CRM, and update their contact record with this new information. To accomplish this, I’m going to use a workflow.
- Before we start creating the workflow, we need to add a hidden field to the survey activity. We will use this field to copy the survey response to, and then copy from that field to the contact record. To create this hidden field:1
- Navigate to Settings > Customizations > Customize the system. Find the survey activity entity, and click on Forms. Then double click on the “Information” form (the main form) to open it.
- Click on “New” to create a new field. Name the field, and make sure it is a text field. Click Save & Close.
- Find the field we just created in the list of fields on the right. Drag it somewhere onto the form, then double click on the field. Uncheck the box that says “Visible by default”. This will ensure that this field is a hidden field. Click Ok.
- Save & Publish your customizations.
Now that we have created this hidden field, we are going to create the workflow.
- To start building this workflow, navigate to the settings area of CRM, click on Processes and New. Create a workflow based on the survey response entity.
- Make sure the workflow starts when the record is created.
- First add a step to change the status of the survey activity. In order to update the survey activity once it is completed, we need to reopen it.
- Next, we are going to add a check condition, to make sure the survey question is the “Phone number” survey question. Add a step > Check condition, and check for the phone number survey question.
- Next, we want to copy the response to the “Phone Number” question to the field that we created earlier – the “Survey Response – Phone Number” field on the survey activity record, so that we can copy that onto the contact record. To add this, we’re going to add an Update step to our workflow. We’re then going to click on Set Properties, and fill in the “Survey Response – Phone Number” field using the dynamic values form assistant on the right hand side.
- To give the workflow a chance to run, we’re going to add a wait step, and wait two minutes after the process has started. To set the properties of the wait condition, we are going to again use the dynamic values form assistant on the right-hand side of the page.
- Now we’re going to set this workflow aside for a minute, while we create another workflow. This is the workflow that’s going to update the contact record. We’re going to go back to our CRM, under Settings, Processes, and click on New. Base this new workflow off of the survey activity entity.
- For this workflow, we are going to activate it as a child process. Also make sure all of the “Start when” options are unchecked.
- Add a step to the workflow, to update the contact record. Set the properties using the dynamics values form assistant on the right-hand side of the properties section. Choose that you’d like the “Survey Response – Phone Number” field from the survey activity to populate the business phone field on the contact form. Save & close. Then Activate that Child workflow, and close the window.
- Navigate back to the first workflow you were creating. Add a step to start a child workflow, based on the survey activity entity. Then choose the workflow you just created.
- Lastly, we want to close the survey activity again. To do this, we add a Change Status step to change the status of the survey activity record back to completed.
- Save & Activate your workflow.
You have now created a workflow that automatically updates the Business Phone field on the Contact record, when someone submits a PowerSurvey with the “What is your phone number” question on it. This workflow can be modified or repeated for as many survey questions and as many record types as you’d like. Feel like giving it a try yourself? Visit the PowerSurvey website to download your free 30 day trial.