Webhook Usage in Dynamics 365 CRMWebhook Usage in Dynamics 365 CRM

Webhooks are a lightweight HTTP pattern for connecting Web APIs and services with a publish/subscribe model. Webhook senders notify receivers about events by making requests to receiver endpoints with some information about the events.

Webhooks can be used to integrate Dynamics 365 CRM with a variety of external systems and services. For example, you could use a webhook to notify a third-party marketing automation system when a new lead is created in Dynamics 365 CRM. Or, you could use a webhook to send a notification to a team of salespeople when a new opportunity is created.

To register and configure webhooks in Dynamics 365 CRM, you can use the plug-in registration tool.

Registering a Webhook

To register a webhook, follow these steps:

  1. Open the plug-in registration tool and connect to your Dynamics 365 CRM environment.
  2. Click the Register menu and select Register New WebHook.
  3. Enter a unique name for the webhook and the URL of the endpoint that will receive the webhook notifications.
  4. Select the authentication type for the webhook. You can choose from the following options:
    • No authentication: The webhook will be accessible to anyone who knows the URL.
    • Header: The webhook will require a specific header value to be present in the request.
    • Query string: The webhook will require a specific query string parameter to be present in the request.
    • WebHookKey: The webhook will require a specific value for the code query string parameter.
  5. If you are using header or query string authentication, enter the required key and value.
  6. Click Register to create the webhook.

Configuring a Webhook

Once the webhook is registered, you can configure it to be triggered by specific events in Dynamics 365 CRM. To do this, follow these steps:

  1. In the plug-in registration tool, expand the node for the webhook that you just registered.
  2. Click the Register New Step button.
  3. Select the entity and event that you want to trigger the webhook.
  4. Click Register to create the step.

Now, whenever the selected event occurs, Dynamics 365 CRM will send a webhook notification to the specified endpoint.

Example:

Here is an example of how to register and configure a webhook to be triggered when a new contact is created in Dynamics 365 CRM:

  1. Open the plug-in registration tool and connect to your Dynamics 365 CRM environment.
  2. Click the Register menu and select Register New WebHook.
  3. Enter a unique name for the webhook, such as “New Contact WebHook”, and the URL of the endpoint that will receive the webhook notifications.
  4. Select the No Authentication option.
  5. Click Register to create the webhook.
  6. Expand the node for the webhook that you just registered and click the Register New Step button.
  7. Select the Contact entity and the Create event.
  8. Click Register to create the step.

Now, whenever a new contact is created in Dynamics 365 CRM, a webhook notification will be sent to the specified endpoint. The notification will contain information about the new contact, such as their name, email address, and phone number.

You can use this webhook to notify a third-party marketing automation system when a new lead is created in Dynamics 365 CRM. The marketing automation system can then send an automated email to the new lead or add them to a marketing campaign.

Tips for Using the Plugin Registration Tool

Here are some tips for using the plugin registration tool to register and configure webhooks:

  • Make sure that the URL of the webhook endpoint is accessible from the web.
  • If you are using authentication, make sure that the key and value are correct.
  • When configuring a webhook step, make sure that you select the correct entity and event.
  • Test the webhook by triggering the event that you configured it to respond to.

Conclusion

The plugin registration tool is a powerful tool for registering and configuring webhooks in Dynamics 365 CRM. By using the plugin registration tool, you can easily integrate Dynamics 365 CRM with a variety of external systems and services.

Leave a Reply

Your email address will not be published. Required fields are marked *