Variable as Parameter in survey URL Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/tag/variable-as-parameter-in-survey-url/ Microsoft Dynamics CRM . Microsoft Power Platform Wed, 03 Jun 2020 06:33:47 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32 Variable as Parameter in survey URL Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/tag/variable-as-parameter-in-survey-url/ 32 32 176351444 Pass Session ID in anonymous survey – add variable in forms pro survey URL as Parameter Microsoft dynamics 365 http://microsoftdynamics.in/2020/06/01/pass-session-id-in-anonymous-survey-add-variable-in-forms-pro-survey-url-as-parameter-microsoft-dynamics-365/ Mon, 01 Jun 2020 16:28:27 +0000 http://microsoftdynamics.in/?p=3307 The post Pass Session ID in anonymous survey – add variable in forms pro survey URL as Parameter Microsoft dynamics 365 appeared first on Microsoft Dynamics 365 Blog.

]]>

In our previous video, we passed Variable to a question and when the recipient opens Survey he sees his case number with Surevey

  1. setting our custom variable “CaseNumber” created in part 1st in Subtitle i.e Welcome to Dvmske customer experience survey  – Created for {{Casenumber}}
  2. It should look like below when creator preview the survey or when we send this survey as anonymous though the link
  3. When the survey is sent to the recipient on case resolution, it Variable will have a case number of the recipient.

Click here to see full post

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5ed4ac4814152.png?fit=1581%2C596

In This post, we have a scenario where 3rd party Marketing tool which is fully integrated with CRM has a list of emails where they need to distribute Anonymous surveys but there is 1 condition.

Requirement: The survey recipient example abc@dvmske.com receives an Anonymous survey of 50% discount and while filling up the survey he enters different email 123@dvmske.com

  1. The requirement is to get Recipient Email ID along which Survey Response question email id.
  2. So there will be 2 Question response
    Question 1: Recipient Email (Hidden Question on survey)
    Question 2: Email ID

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5ed52b73cf8fd.png?fit=1257%2C768

Step 1: Add a hidden text question to the survey.

  • As Per the Requirement, we will have 2 Email question in our form
  • 1 of recipient email id that will be hidden, 2nd will be visible email id, that will be filled by Recipient
  • As we have also embedded survey on our website, we will add 1 more hidden field “Survey Source”
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5ed4b53ba5688.png?fit=1755%2C756

Step 2: For Testing adding a variable in Question and passing Parameter in the survey URL

  1. For the testing, we will add Variable Source and Recipient Variable in Source and Recipient Question on Survey
  2. Then passing both the variable in Survey URL parameter
    &ctx={“Recipient“:”abc@dvmske.com”,”Source“:”Email”}
  3. When Recipient submit the Survey we will receive these value with each Response and we can map these Variables with “Survey response questions Responses” in Dynamics 365 crm

In Below example, we are using Source as Email, We can set Source as Website for embedded Survey in our Website

NOTE: THESE 2 FIELDS WILL BE HIDDEN IN ORIGNAL SURVEY

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5ed4bac94e49a.png?fit=1705%2C726

Step 3: Mapping variable to Question Response in Dynamics 365 Once Recipient submits the survey

  • Once Recipient Submits the Survey, Power automate trigger will Generate a Question Response on Receive of Survey Response in Dynamics 365, NOTE: THESE QUESTIONS WERE HIDDEN SO QUESTION RESPONSE  WILL NOT BE AUTOGENERATED.

1. Create new automated flow

  • Create New automated flow
  • Select Common Data service and Action as when a record is created
  • Fill in Environment and entity

3. Get form pro survey Question "Recipient" and "Source"

  1. Add new step List  Records -> Renaming it Get Recipient Question
  2. Add new step List Rec-> Rename it Get Source Question

2. Parse JSON using Survey Response context

  • Selecting Action as Parse JSON
  • Selecting Context Data

  • Now we will generate a schema from the sample , Going to an already received Response record in Dynamics 365
  • Then copy the context and Generate Schema

Step 4: Create New forms pro Survey Question Response to store Recipient and Source Variable Value

  1. Now we have our Received survey Response
  2. Survey Question = Recipient
  3. Survey Question = Source
  4. As our question was hidden and there was no answer, there will not be any Recipient and source Survey Question Response
  5. We will create Recipient and source Question response and associate it with received survey response
  6. To get Source Question identifier and Question for Recipient and Source(replace name) use below expression, As we have used fetch list of record where Question = recipient, we need to take 1 record only otherwise we have to use Apply to all (loop)

body(‘Get_Recipient_question’)?[‘value’]?[0]?.msfp_sourcequestionidentifier

body(‘Get_Recipient_question’)?[‘value’]?[0]?.msfp_questionid

NOTE: &ctx={“Recipient“:”abc@dvmske.com”,”Source“:”Email”} Values inside these are not static, if there are 50 recipients while sending the survey link its marketing team responsibility to attach parameters.

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5ed4e72a6a9cf.png?fit=1392%2C920

Testing above scenario -> Recipient ABC@DVMSKE.COM and Email Enter is 123@gmail.com , Source = Email

  1. Email Sent ABC@DVMSKE.com so Variable Recipient will be = ABC@DVMSKE.COM
  2. SOURCE = EMAIL
https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/Pass-parameter-to-Forms-pro-Surevey-URL.gif?fit=1280%2C720

Full Power Automate Flow.

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/06/img_5ed73ee13da04.png?fit=1636%2C2481

Click here for More Article on Forms Pro

The post Pass Session ID in anonymous survey – add variable in forms pro survey URL as Parameter Microsoft dynamics 365 appeared first on Microsoft Dynamics 365 Blog.

]]>
3307