Exercise – Create a survey invitation

Completed

Exercise 1: Send a survey

In this exercise, you will use Microsoft Power Automate to send a Dynamics 365 Customer Voice survey.

Task 1: Select a Power Automate template

In this task, you will use Power Automate to send the survey that you created in the Work with Dynamics 365 Customer Voice projects module.

  1. Go to Customer Voice and sign in with your credentials.

  2. Select the environment where you have Dynamics 365 Customer Engagement installed. The Dynamics 365 Customer Voice survey should have been created in the same environment.

  3. Locate the Customer Support Feedback project that you created previously and select its name.

    My projects with Customer Support Feedback selected, and an arrow pointing to the ellipsis button next to it.

  4. Select the Premium Support Survey that was created previously and then select the Send tab.

    Premium Support Survey with an arrow pointing to the Send tab.

  5. Select Automate.

    Premium Support Survey with the Send tab open. Under Choose how to send the survey, an arrow points to Automate.

  6. Select Send a survey when a case is resolved in Dynamics 365.

    Send survey automated template - screenshot.

  7. Follow the subsequent steps if this is your first time creating a flow. If you are not prompted to select a region, move on to the next step.

    a. Select your Country/Region and then select Get started, if prompted.

    Get started with power automate - > screenshot.

    b. Select Sign in or Update, if prompted to sign in to your Microsoft Forms environment.

    c. Select Accept. Permission dialog - > screenshot shows a checkbox for Consent on behalf of your organization.

    d. Select Continue.

  8. If you see the following screen (depending on if this is the first time you've signed in), select Try it now.

    Send a survey when a case is resolved in Dynamics 365 Try it now dialog - screenshot.

  9. Select the environment where you have Dynamics 365 Customer Engagement installed and then select Create.

    Select environment dialog - screenshot shows the Dataverse Environment selected.

    The flow will open in a new tab.

    Flow steps - screenshot shows the survey if yes and if no flow steps.

  10. Do not navigate away from this page.

Task 2: Examine and edit the flow

In this task, you will examine the flow that was created by the template and add a filter to the trigger. This filter will ensure that the flow is triggered only when the Status Reason column changes instead of running on every change that is made to the case record.

  1. You should already be in edit mode for the flow that was created in Task 1. If not, and you are viewing the Details screen for the flow, select Edit.

    Edit flow - screenshot shows an arrow pointing to the Edit button.

  2. The flow should open in edit mode. Expand the trigger by selecting the header.

    Flow trigger - screenshot shows an arrow pointing to the "When a record is updated" header that expands to show the "Check if case is resolved" header.

  3. Select Show advanced options.

    Show advanced - screenshot shows an arrow pointing to the Show advanced options dropdown.

  4. Select status code for Attribute filter. This action will make sure that the flow is triggered only when the status of the case changes.

    Trigger attribute filter - screenshot shows an arrow pointing to the statuscode option under Attribute Filters Item - 1.

  5. Select Hide advanced options.

    Hide advanced options - screenshot shows an arrow pointing to Hide advanced options.

  6. Collapse the trigger by selecting the header again.

  7. Expand the condition.

    Flow condition -screenshot shows an arrow pointing to the expanded condition.

  8. Select Expand condition.

    Expand condition - screenshot shows an arrow pointing to the Expand condition command.

    The first condition checks if the Status Reason value is 5 (Resolved).

    Flow condition - screenshot shows the expanded Check if case resolved condition set to Status Reason is equal to 5.

  9. You will only take actions if the case was resolved. Expand the condition inside the If yes branch.

    Condition - screenshot shows an arrow pointing to Check if customer is of type accounts.

  10. Select Expand condition.

    Expand condition - screenshot shows an arrow pointing to Expand condition.

    This condition checks if the customer type of the case is an account.

    Expanded flow condition - screenshot shows the expanded Check if customer is of type accounts condition set to Customer Type is equal to accounts.

  11. Evaluate both branches of the flow (you are not making changes, just viewing what has been created).

    If the customer type of the case is an account:

    • The flow will get the account record.
    • Add the Send survey action.
    • Use the information from the prior actions to fill out the send survey columns.
    • Select the correct survey and email template.

    If the customer type of the case is not an account:

    • The flow will get the contact record.
    • Add the Send survey action.
    • Use the information from the prior actions to fill out the send survey columns.
    • Select the correct survey and email template.

Survey email templates - screenshot shows the If yes flow and the If no flow.

  1. Collapse all actions and then select Save.

    Save flow - screenshot shows collapsed headings and an arrow pointing to the Save button.

  2. Do not navigate away from this page.

Task 3: Test the flow

In this task, you will test the flow and see what the flow will send to the customer.

  1. Start a new browser tab and navigate to your Dynamics 365 Sales Hub application.

    Sales hub application -screenshot shows the Sales Activity Social Dashboard.

  2. Select Cases.

    Cases - screenshot shows an arrow pointing to Cases under Service.

  3. Select + New.

    New case - screenshot shows an arrow pointing to New Case.

  4. Enter Missing parts for Case Title, select the Customer column, and then select + New Record.

    Case customer - screenshot shows the Summary tab with case details and the Customer dropdown with an arrow pointing to New Record.

  5. Select Contacts.

    Case contact - screenshot shows the Customer dropdown with an arrow pointing to Contacts.

  6. Provide the first name, last name, and your organization user's email.

    New contact record - screenshot shows Details and Contact Information.

  7. Select Save and Close to save the form.

  8. Select Save to save the case record.

    Save case - screenshot shows New Case with an arrow pointing to Save.

  9. Select Resolve Case.

    Resolve case - screenshot shows the Missing Parts case with an arrow pointing to Resolve Case.

  10. Enter Sent replacement for Resolution, select 15 minutes for Billable Time, and then select Resolve.

    Resolve case dialog - screenshot shows required columns Resolution Type, Resolution, and Billable Time.

  11. Go to Power Automate and select the back button.

    Back to flow details - screenshot shows an arrow pointing to the back button.

  12. You should have at least one flow run, and it should have succeeded. Select to open the run.

    Flow run status - screenshot shows an arrow pointing to the date and time listing for a run.

    Your flow should take the If no path and run successfully.

    Succeeded flow - screenshot shows a flow chart taking the If no path.

  13. Start a new browser tab/window.

  14. Go to Outlook and sign in with your credentials.

    You should receive an email similar to the following image.

    Email for flow - screenshot shows the email with title Please fill the survey: 'Case Resolution Survey' and the body with a link to the survey.

  15. Select Start Survey.

    The survey should open.

    Survey form - screenshotshows the open survey.

  16. Close the survey browser window or tab.

  17. Return to the case and select Reactivate Case.

    Reactivate case - screenshot shows an arrow pointing to Reactivate Case.

  18. Select Reactivate to confirm.

Exercise 2: Create and send a survey invitation

The current flow uses the email template that you selected to send the survey. In this exercise, you will add more variables to the survey, create an invitation, and then send it in an email.

Task 1: Replace the Send survey action

In this task, you will delete the Send survey action that came with the Power Automate template and replace it with Create invitation action.

  1. Return to the flow in Power Automate that was created in Task 1.

  2. Select Edit.

    Edit flow - screenshot shows an arrow pointing to Edit.

  3. Expand the conditions and select the ellipsis (...) button of the Send survey action located in the If no branch.

    Send survey menu button - screenshot shows an arrow pointing to the ellipsis button next to the send survey action.

  4. Select Delete.

    Delete step - screenshot shows the ellipsis button dropped down with an arrow pointing to Delete.

  5. Select OK.

  6. It is a good idea to name your flow actions. Select the ellipsis (...) button of Get record 2 and then select Rename.

    Rename step - screenshot shows an arrow pointing to Rename.

  7. Rename the action Get contact.

    Rename step - screenshot shows the Get contact action under If no.

  8. Select Add an action.

    Add an action - screenshot shows an arrow pointing to the Add an action command.

  9. Search for invitation and select Create an invitation.

  10. Rename the invitation Create contact invitation.

    Rename step - screenshot shows name as Create contact invitation.

  11. Select Case Resolution Survey for Survey and select the Email column.

    Select survey - screenshot shows an arrow pointing to the email address to identify the survey invite.

  12. Search for email and select Email from the Get contact action.

    Contact email - screenshot shows the Get contact action searching for email with an arrow pointing to Email in the results.

  13. Select Show advanced options.

    Show advanced option - screenshot shows an arrow pointing to Show advanced options on the Create contact invitation.

  14. Select the First Name column and select First Name from the Dynamic content pane.

    Contact first name - screenshot shows an arrow pointing to First Name in the Dynamic content search results.

  15. Select the Last Name column and select Last Name from the Dynamic content pane.

    Contact last name - screenshot shows an arrow pointing to Last Name in the Dynamic content search results.

  16. Type Incident in the Regarding column and select Case from the Dynamic content pane.

    Regarding case - screenshot shows an arrow pointing to Case in the Dynamic content search results.

  17. Type Contact in the Recipient details column and select Contact from the Dynamic content pane.

    Recipient details - screenshot shows an arrow pointing to Contact in the Dynamic content search results.

    The invitation should now look like the following image.

    Completed contact invitation step - screenshot.

  18. Save your progress by selecting the Save button.

    Save flow - screenshot shows an arrow pointing to the Save button.

  19. Do not navigate away from this page.

Task 2: Send email

In this task, you will create a Send email action that will send the survey invitation.

  1. Return to the If no path and select Add an action.

    Add an action - screenshot shows an arrow pointing to Add an action.

  2. Search for send an email and select Send an email (v2). If this is the first time that you have used this action, you might need to authenticate. If this connection doesn't work for you, check your user license.

    Send email action - screenshot shows an arrow pointing to Send an email (V2).

  3. Rename the action Send contact invitation.

    Rename step - screenshot shows the name changed to Send contact invitation.

  4. Select the To column and select Email from the Dynamic content pane.

    Contact email - screenshot shows an arrow pointing to Email in the Dynamic content search results.

  5. Type Resolved: and select Case Title from the Dynamic content pane.

    Email subject - screenshot shows an arrow pointing to Case Title in the Dynamic content search results.

  6. Type Hello in the Body column and select First Name from the Dynamic content pane.

  7. Add a comma after the first name and press the Enter key twice.

  8. Type We recently resolved the following case for you: and then press the Enter key.

  9. Type Case Number: and select Case Number from the Dynamic content pane. Press the Enter key.

  10. Type Case Title: and select Case Title from the Dynamic content pane. Press the Enter key twice.

  11. Enter In order to provide the best quality service to you, please take few moments to let us know how we did. Press the Enter key twice.

  12. Switch to Code View by selecting the </> button.

    Email body -screenshot shows an arrow pointing to the code view button.

  13. Enter <a href="">Complete Feedback Survey</a> and then place your cursor between the two double quotation marks.

    Invitation link - screenshot shows an arrow pointing to the place in the markup where the hyperlink is plugged in.

  14. Select Invitation link from the Dynamic content pane.

    Invitation link - screenshot shows an arrow pointing to Invitation link in the Dynamic content search results.

  15. Type <br> <br> and then press the Enter key.

  16. Type Thanks for your business <br><br>.

    Your email should now look like the following image.

    Completed email - screenshot shows the contact invitation with values supplied for To, Subject, and Body sections.

  17. Select Save.

Task 3: Test the send survey invitation

In this task, you will test the send survey invitation flow.

  1. Go to your Dynamics 365 Sales Hub application.

  2. Select Cases and select to open the case that you created.

    Open case record - screenshot shows an arrow pointing to Missing Parts.

  3. Select Resolve Case.

    Resolve case - screenshot shows an arrow pointing to Resolve Case.

  4. Enter Sent replacement parts for Resolution, select 30 minutes for Billable Time, and select Resolve.

    Resolve case dialog - screenshot shows the Resolve Case dialog with values supplied for required columns: Resolution Type, Resolution, and Billable Time.

    You should get an email from the flow.

  5. Select to open the email.

    Email from flow - screenshot shows an arrow pointing to Resolved: Missing Parts email title.

  6. Your survey invitation email should look like the following image. Select the survey link.

    Invitation link - screenshot shows an arrow pointing to the link to Completed Feedback Survey.

    The survey should load.

    Survey - screenshot shows the Case Resolution Survey page in a browser.

  7. Close the survey browser window or tab.