web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Can't Find Channel Definition ID for new custom channel solution

(5) ShareShare
ReportReport
Posted on by 15
Hi all,
I'm trying to set up a custom channel solution and am currently at step 3, "Define the message parts" (https://learn.microsoft.com/en-us/dynamics365/customer-insights/journeys/real-time-marketing-custom-channel-message-parts). However, this requires that I know the msdyn_channeldefinitionid, which from what I understand isn't created until I actually create the channel in Dynamics. How do I get this id for a brand new channel solution?
Categories:
I have the same question (0)
  • Suggested answer
    Holly Huffman Profile Picture
    6,538 Super User 2025 Season 2 on at
    Hi there! Good morning, evening, or afternoon - depending on where you are :) Hope you are well today! 
     
    To retrieve the msdyn_channeldefinitionid for your new custom channel solution, follow these steps:
    1. Create the Channel Definition
    • First, define the channel in Dynamics 365 Customer Insights - Journeys. This involves creating a record in the Channel Definition entity (msdyn_channeldefinition).
    • You can do this manually through the Dynamics 365 interface or programmatically using the Web API.
    2. Retrieve the Channel Definition ID
    • Once the channel definition is created, the msdyn_channeldefinitionid is automatically generated as the primary key for the record.
    • To retrieve it:
      • Use the Advanced Find feature in Dynamics 365 to search for records in the Channel Definition entity.
      • Alternatively, query the msdyn_channeldefinition table using the Web API or SDK. For example:
        GET /api/data/v9.0/msdyn_channeldefinitions

        This will return all channel definitions, including their IDs.
    3. Use the ID in Your Solution
    • After retrieving the msdyn_channeldefinitionid, you can use it in your customizations, such as defining message parts or configuring metadata.
  • AM-26031703-0 Profile Picture
    15 on at
    Hi, 
    Thank you so much for the response, there was much that is helpful here. 
    Apologies for my ignorance: where in Dynamics are you creating the channel? I have been going through the Custom Channel creation process, and my custom channel solution is not appearing in the selection, which I'm assuming is because the channel definition isn't in the solution. 
    Am I missing a place to define a channel by GUI?
    Thank you again!
  • Verified answer
    Daivat Vartak (v-9davar) Profile Picture
    7,835 Super User 2025 Season 2 on at
    Hello AM-26031703-0,
     

    You've encountered a common chicken-and-egg problem when setting up custom channels in Dynamics 365 Customer Insights - Journeys (CI-J): you need the msdyn_channeldefinitionid to define message parts, but that ID isn't generated until the channel is created.

    Here's how to resolve this and obtain the msdyn_channeldefinitionid for your brand new custom channel solution:

    Understanding the Process:

    1. Initial Channel Creation: You need to create a basic, placeholder channel definition first. This will generate the msdyn_channeldefinitionid.

    2. Retrieve the ID: Once the channel is created, you can retrieve the msdyn_channeldefinitionid.

    3. Define Message Parts: Use the retrieved ID to define your message parts.

    4. Update the Channel Definition: Update the channel definition with the complete configuration.


    5.  

    Steps to Obtain the msdyn_channeldefinitionid:

    1. Create a Minimal Channel Definition (Temporary):

      • Using the UI:

        • Go to Settings > Channels > Custom channels.
        • Click New.
        • Fill in the Name and other required fields.
        • You can leave most fields with placeholder values for now.
        • Save the channel definition. 

      • Using the Web API (Alternative):

        • You can create a minimal channel definition using the Dynamics 365 Web API.
        • This is useful if you want to automate the process. 

    2. Retrieve the msdyn_channeldefinitionid:

      • Using the UI:

        • Go to Settings > Channels > Custom channels.
        • Open the channel definition you just created.
        • The msdyn_channeldefinitionid will be in the URL of the record.
        • You can also use the form to display the msdyn_channeldefinitionid field (if it's not already visible).

      • Using the Web API:

        • Use the Dynamics 365 Web API to retrieve the channel definition record.

             
        • The msdyn_channeldefinitionid will be in the response.

        • // Example JavaScript Web API call (replace with your channel definition name)

        Xrm.WebApi.retrieveMultipleRecords("msdyn_channeldefinition", "?$filter=name eq 'Your Channel Name'").then(
            function success(result) {
                if (result.entities.length > 0) {
                    var channelDefinitionId = result.entities[0].msdyn_channeldefinitionid;
                    console.log("Channel Definition ID: " + channelDefinitionId);
                    // Use the channelDefinitionId in your message part definition
                } else {
                    console.error("Channel definition not found.");
                }
            },
            function (error) {
                console.error("Error retrieving channel definition: " + error.message);
            }
         );

    3. Define Message Parts (Using the Retrieved ID):

      • Now that you have the msdyn_channeldefinitionid, you can proceed with defining your message parts as described in the Microsoft documentation.
      • Use the retrieved ID in the msdyn_channeldefinitionid field of your message part definitions. 

    4. Update the Channel Definition (Complete Configuration):

      • After defining your message parts, you can update the channel definition with the complete configuration.
      • This includes setting up the endpoints, capabilities, and other required settings. 

    5.  

    Important Notes:

    • Temporary Channel: The initial channel definition you create is temporary. You'll update it with the complete configuration later.
    • Web API: Using the Web API is recommended for automation and for scenarios where you need to retrieve the ID programmatically.
    • Testing: Thoroughly test your custom channel solution after completing the configuration.

    •  

    By following these steps, you can obtain the msdyn_channeldefinitionid and proceed with defining your message parts for your custom channel solution.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 51

#2
Martin Dráb Profile Picture

Martin Dráb 39 Most Valuable Professional

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 26 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans