Embed Microsoft Forms in your website and get leads in Dynamics 365 CRM without writing code

 

Introduction

We come across frequent requirement where customers ask to create a custom page and embed it in their website and write logic to get leads into Dynamics 365 CRM.

In this blog, I have explained how without coding we can achieve this requirement.

Approaches

Traditional Approach

We will create custom HTML page and create custom service hosted somewhere and then using JavaScript we will make a call to the web service and create respective records in CRM.

Alternative Better Approach

We can use Microsoft Forms & Microsoft Flow and without coding we can get the lead data inserted into Dynamics 365 CRM.

How-to Steps

Pre-Requisites:

  1. You should have D365 CRM (Sales) license.
  2. You should have access to Microsoft Forms (refer References section for the same).
  3. You should have access to Microsoft Flow.

Create Microsoft Form to get Lead Information

  1. Login to https://portal.office.com and open Forms from Admin Center.

1

  1. Click on New Form

2

  1. Name the form and keep adding questions.

3

  1. This is my form

4

  1. Click on Share option and select Embed option.

5

  1. Copy the Iframe tag and include it in your web page.
  2. That’s it. Your form is ready.

Create Microsoft Flow to insert response in Dynamics 365 CRM.

  1. Go to Flow from admin center.

6

  1. Select CREATE FROM BLANK option. Give some name to Flow.
  2. Search for Microsoft Form in connector and select Microsoft Forms – When a new response is submitted

7

  1. Select your form.

8

  1. Click Next step and select Add an Action.
  2. Search for Microsoft Forms and select Microsoft Forms – Get Response Details
  3. In the configuration put below formula as per below screenshot.

first(triggerBody()?[‘value’])?[‘resourceData’]?[‘responseId’]

9

Refer this blog to understand above formula.

  1. Click on Next step and select Add an Action.
  2. Search for Dynamics 365 and select Dynamics 365 – Create a new record (V2)
  3. Select Organization.

10

  1. Select entity as Leads. It will show the fields of Lead entity as below.

11

  1. Click on Last Name textbox and select Last Name option from the right pane as per below screenshot. Repeat same steps for other fields.

12

Note: Click Show advanced options to see optional fields.

  1. That’s it. Finally click on Create Flow.

At this stage you are ready. You can start entering data in your form and it will automatically get inserted into Dynamics 365 CRM near to real time.

References

  1. Know more about Microsoft Forms

https://forms.office.com/

https://support.office.com/en-us/forms

  1. Frequently asked questions about Microsoft Forms

https://support.office.com/en-us/article/Frequently-asked-questions-about-Microsoft-Forms-495c4242-6102-40a0-add8-df05ed6af61c

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s