Introduction
Microsoft comes with an exciting release that helps its customers to improve and advance their business. In recent times, Microsoft Forms Pro is replaced with Dynamics 365 Customer Voice which easily captures customer thoughts and suggestions. The Dynamics 365 Customer Voice helps in collecting feedback from the customer and helps in applying suggestions to expand their business. In today’s blog, we will explore how to send Survey Invitation to Dynamics 365 CE “Contacts” using Customer Voice from Canvas App.
Let’s consider a scenario where the user wants to send Covid 19 survey to the Dynamics 365 CE contacts to collect the information from the contacts associated with their business. To achieve the above you need to purchase or start the trial of Dynamics 365 Customer Voice by logging in here.
Please follow the below steps to send a survey invitation of Customer Voice from Canvas App easily:
1. We have created a sample Project in Dynamics 365 Customer Voice which contains a sample Covid 19 Survey with simple questions as below. To know how to create a project in Customer Voice, you can refer to this link.
2. Create a default canvas app for the Contact entity of Dynamics365 CE by following the below steps:
- Login to https://make.powerapps.com/ and select your environment. Now click on “+New App” and then “Canvas” as shown in the below screenshot:
- Click on “Phone Layout” for “Common Data Service” as shown in the below screenshot:
- Now select Contact table and click on Connect as shown in the below screenshot:
- As you can see below “Contact” data source has been added in Canvas App:
3. As you can see below screenshot, the “BrowseScreen” will contain a list of all the contacts records from the CRM:
4. We have removed the Image of the Contact to add a checkbox for selecting the contacts to whom we need to send the survey invitation. Click on “Input” and then on “Checkbox” as shown in the below screenshot to add a checkbox in the browse screen of the canvas app:
5. On “onCheck” property of the Checkbox lets create a contact collection with the below formula:
Collect(
ContactCollection,
{
Email: ThisItem.Email,
FirstName: ThisItem.’First Name’,
LastName: ThisItem.’Last Name’,
ContactID: ThisItem.Contact
}
)
The above formula will add the contacts in the ContactCollection from selected Contacts from the BrowseScreen using a checkbox.
6. Now on “onUnCheck” property of the Checkbox, let’s remove the contact from Contact collection with the below formula:
If(
LookUp(
ContactCollection,
ContactID = ThisItem.Contact,
true
),
Remove(
ContactCollection,
First(
Filter(
ContactCollection,
ContactID = ThisItem.Contact
)
)
)
)
7. In your canvas app, add “Dynamics 365 Customer Voice” Connector to use the connection as shown in the below screenshot:
8. Add the mail icon on the top of the canvas app by clicking on the “Icons” and then “Mail” as shown in the below screenshot to send the survey invitation from the list of contacts.
The header of the Browse Screen will be displayed as below after adding Mail Icon:
9. On select property of the mail icon add the below formula to send the Survey Invitation link and create a “Customer Voice survey Invite record” in Dynamics365 CE which will be related to all the selected contacts from the Browse Screen.
ForAll(
ContactCollection,
Dynamics365CustomerVoice.sendSurvey(
Email,
“IYZ6dQTjN0-1v1pS72oUFqXQdDZWVYxChFlL5RB9fgdURFlGU1NOUjRYUVEyQ1ZTVU5TSjhJMjhZUS4u”,
“2f3a6624-aea0-4da4-b1db-1bd06d6d4014”,
“b64153f0-d056-4c3c-853e-e90d810fd8df”,
{
Regarding: Concatenate(“contact,”, ContactID),
RecipientInfo: Concatenate(“contact,”, ContactID),
firstName: FirstName,
lastName: LastName
}
)
)
The above formula will loop the ContactCollection which contains the list of contacts checked using checkbox and send the Survey Invitation using Dynamics365 Customer Voice connector.
Please see the below description for each parameter for the above formula:
- Email: This is the first parameter which is the email address of the contact in ContactCollection.
- Form Id: This is the second parameter and you can find the “Form Id” in the Survey link on Dynamics365 Customer Voice as shown in below screenshot:
- Project ID: This is the third parameter and you can find the “Project ID” in the “Customer Voice Project” entity in Dynamics365 CE as shown in below screenshot:
- Email TemplateId: This is the fourth parameter and you can find the “Email TemplateId” in the “Customer Voice survey email template” entity in Dynamics365 CE as shown in below screenshot:
Note: While creating your survey in Dynamics 365 Customer Voice, please select appropriate email template.
10. Now let’s run the Canvas App and send the Survey Invitation to selected contacts from the gallery.
11. You will see the Survey Invitation link is been sent to selected contacts as shown in the below screenshot:
Also, a “Customer Voice survey Invite” record is created for selected contacts in Dynamics 365 CE. Using these entity records you can track the survey invitation sent to the contacts.
Conclusion
You can send survey invitation to Dynamics 365 CE Contacts using Customer Voice from Canvas App.