Dynamics 365 CE Blog

Integrate WordPress to Dynamics 365CE to capture Leads.

If you have both a WordPress website and Dynamics 365 CE, you need to be aware of the free AlexaCRM plugin.

This tool allows you to set up a simple lead capture form on your website in minutes.

For more detailed instructions on setup, please refer to the AlexaCRM documentation.

  • To get started, you’ll need to install and activate the plugin on your WordPress site.
  • Once the plugin is activated, you will need to establish the connection between your Dynamics 365 instance and the plugin. Credentials with the D365 System administrator security role are needed for this step.

Once the connection is established, you need to create a new entity form you want to expose on your website. (Tip: Create a Quick Create form for this purpose and only add the necessary fields. Don’t worry about the empty sections on your form; they will not show up on the website.)

 

  • Back in the WordPress administration panel, you can create a new page or add the form to an existing page. Switch the content editor mode to Text from Visual and insert the following code:

[msdyncrm_twig]
{% form entity=“contact” name=“WordPress Example Form” mode=“create” %}{% endform %}
[/msdyncrm_twig]

  • Click on Publish or Update depending on whether you are creating a new page or editing an existing one and your form is ready to go.
  • Test it by entering some data and checking Dynamics to see if the record was created.

That’s all there is to adding a simple data capture form to your WordPress website.

This was a high-level overview of the setup. As I mentioned, more details can be found in the AlexaCRM documentation.

Now some Pro Tips that can save you some headache down the road:

  • I recommend starting this process in a DEV or TEST Dynamics CE environment and setting up the WordPress connection there until everything is finalized. When you are ready to go live, simply change the connection in the WordPress administration panel.
  • Speaking of going live, another recommendation is to create a new page in WordPress that is not part of the site navigation and can only be reached by a direct URL. This way you can safely test your form without exposing it to the public before it is ready.
  • Bundling your Dynamics CE changes into a solution also makes it easier to move the website integration between environments.
  • If you’ve made changes on the CE side, make sure to hit the ‘Regenerate Metadata Cache’ button in the WordPress administration panel under the Dynamics 365 tab’s Connection section. This will keep your D365 CE instance and your website in sync.

You can add hidden fields to your form in WordPress and set a default value for them. This way you can pass pre-defined values to Dynamics. 

To find the value of the field you want to pass, go to Dynamics and find the field in your Default Solution:

In the above example, I created a field on the Contact entity to indicate whether a person has been contacted yet or not. The website passes the ‘No’ value with each entry. I can then utilize this field to create a view in Dynamics that lists Contacts that came from the website and need to be reached out to.

Consider other scenarios for which you could utilize a simple form like this.

AlexaCRM offers a premium product as well, which allows you to further customize the webforms and can even act as a portal to external users.

If you are interested to learn more about this topic, please feel free to Contact Us.