Register a Webhook in Dynamics 365 using power platform CLI and plugin registration tool

Webhooks allow external systems, such as, Verint adapter to receive notifications for specific events occurring within Dynamics 365. Follow these steps to register a Webhook in Microsoft Dynamics 365 using the Power Platform Command Line Interface (CLI) and the Plugin Registration Tool (PRT).

Before you begin

  • You have administrator access to your Dynamics 365 environment.

  • You have a valid HTTPS endpoint for the Webhook.

  • .NET SDK is installed

  • Power Platform CLI is downloaded.

Procedure 

  1. Install Power Platform CLI

    1. After downloading, locate the installer file: powerapps-cli-1.0.msi

    2. Run the installer to complete the installation.

  2. Authenticate to your Dynamics 365 environment

    1. Open a command prompt.

    2. Run the following command:

      pac auth create --url https://yourorg.crm.dynamics.com

    3. Sign in with you credentials when prompted.

  3. Launch the plugin registration tool.

    1. In the command prompt, run:

      pac tool prt

    2. This opens the Plugin Registration Tool interface.

    3. In the tool, go to Register and select Register New WebHook.

  4. Configure the Webhook

    1. Enter the Endpoint URL where the Verint adapter is listening.

      When you configure the webhook for screen recording in Dynamics Omnichannel, you must enter the endpoint URL where the Verint adapter receives recording events.

      Endpoint URL format:

      • Replace <server-name> with the Fully Qualified Domain Name (FQDN) of the server hosting the Verint Recording Integration Service (RIS).

      • The /api/recording/cti/v1/MicrosoftDynamicsOmnichannelAdapter path is required and must be included.

      Example:  

      https://ris01.contoso.com/api/recording/cti/v1/MicrosoftDynamicsOmnichannelAdapter

      This URL must be accessible over HTTPS and secured with a valid SSL certificate.

    2. Select the appropriate Authentication Type.

      For this integration, choose HttpHeader.

    3. Add a custom header:

      • Header name: Verint-Header

      • Header value: Test

      Webhook events will not be triggered without authentication.The receiving adapter must validate both the authentication header and the organization information.

  5. Validate incoming events headers

    The Verint adapter verifies the following headers in each incoming event:

    Authentication header:

    Verint-Header: Test

    If either header is missing or does not match the expected values, the event should be discarded.

  6. Define Webhook steps

    Add steps to specify which entity operations should trigger notifications.

    Entity

    Operation

    msdyn_ocliveworkitem

    Create, Update

    msdyn_ocsession

    Create, Update

    msdyn_sessionparticipant Create, Update

    These steps ensure the Verint adapter receives relevant data from screen recording.

  7. Apply attribute-level filters

    To reduce unneccessary events traffic, apply filters to limit notifications to specific attributes.

    Entity

    Operation

    Filtering Attributes

    msdyn_ocsession

    Create

    All Attributes

    msdyn_ocsession

    Update

    activityid, msdyn_agentacceptedon, msdyn_agentassignedon, msdyn_closurereason, msdyn_liveworkitemid, ownerid, owningteam, msdyn_sessionid, msdyn_stateignedon_ mydyn_state

    msdyn_ocliveworki

    Create

    All Attributes

    msdyn_ocliveworki

    Update

    msdyn_activeagentid, actualend, actualstart, msdyn_createdon, msdyn_ocliveworkitemid, msdyn_initiatedon, msdyn_isabandoned, msdyn_isagentaccepted, msdyn_isagentsession, msdyn_lastsessionid, ownerid, statecode, msdyn_liveworkstreamid, msdyn_wrapupinitiatedon
    msdyn_sessionparticipant Create All Attributes
    msdyn_sessionparticipant Update All Attributes

    You can modify the filtering attributes as needed to support additional integration requirements.

What to do next 

Set up the Recorders for Microsoft Dynamics Omnichannel

Register OAuth App on the Microsoft Entra Portal