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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Seeing all contacts that are in a customer journey

(1) ShareShare
ReportReport
Posted on by 110

I need to be able to see all the contacts that are or have been a part of a customer journey. While the insights will should be aggregate stats on the contact interactions within the Customer Journey. I would think that the related entity "Contacts" an Contact Associated View would should the Contacts associated with the Customer Journey, but no contacts appear in the view:

Customer-journey-9102020.pngCustomer-journey_5F00_2_5F00_9102020.png

Is there something I am missing?

Best,

Valerie

I have the same question (0)
  • Suggested answer
    cloflyMao Profile Picture
    25,210 on at

    Hi Valerie,

    Contacts Associated View is only applicable for contacts whose source journey field equals to current customer journey.

    For example, run a workflow after contact submits form. In the workflow, set the source journey field to a specific journey record.

    (For Lead entity, the source journey field will be automatically populated if the lead is created by Create a lead tile.)

    Actually, it could be said that there is no direct relationship between Customer Journey and Contact, and Segment could be regarded as an intermediate entity connecting two entities.

    Customer Journey <-> Segment <-> Contact.

    Therefore, even though we can't see which contacts are involved in customer journey in form, but we can still get involved segments in General -> Segments used.

    However, in the General tab, only leads subgrid is the real associated view(source journey), while records inside Segments used and Marketing emails used subgrids are retrieved by a special action called 

    "msdyncrm_EntityDependenciesRetrieve".(In other word, Segment and Marketing email aren't directly associated with Customer Journey too.)

    Below is sample code to retrieve all associated segments of a specific customer journey.

    queryRelatedEntities("e43540ce-18ec-ea11-a815-000d3aa08990","msdyncrm_segment");
    
    function queryRelatedEntities(mainEntityId, relatedEntityName) {
      var serverURL = Xrm.Page.context.getClientUrl();
      var data = {
        EntityDependenciesRequest: '{"EntityId": "'   mainEntityId   '",'  
          '"page": 1,'  
          '"IsBidirectionalRetrieval": true,'  
          '"TargetEntityTypeFilter": "'   relatedEntityName   '",'  
          '"TargetEntityLiveFilter": false'  
          '}'
      };
    
      var req = new XMLHttpRequest();
      req.open("POST", serverURL   "/api/data/v9.0/msdyncrm_EntityDependenciesRetrieve", true);
      req.setRequestHeader("Accept", "application/json");
      req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
      req.setRequestHeader("OData-MaxVersion", "4.0");
      req.setRequestHeader("OData-Version", "4.0");
      req.onreadystatechange = function () {
        if (this.readyState == 4 /* complete */) {
          req.onreadystatechange = null;
          if (this.status == 200) {
            var result = JSON.parse(this.response);
            var relatedRecords = JSON.parse((result.EntityDependenciesResponse)).Dependencies;
            console.log(relatedRecords);
          } else {
            var error = JSON.parse(this.response).error;
            alert(error.message);
          }
        }
      };
      req.send(JSON.stringify(data));
    }

    pastedimage1599791684223v1.png

    Finally, in summary, to see all engaged contacts of customer journey in the customer journey form, you need to insert a HTML web resource:

    1. Call the action to get related segment name.

    2. Use the retrieved segment name to get members of the segment with segment API:

     https://docs.microsoft.com/en-us/dynamics365/marketing/developer/extend-segments#addremove-contacts-to-static-segments

    pastedimage1599791895972v2.png

    3. Render result in a table.

    Regards,

    Clofly

  • cloflyMao Profile Picture
    25,210 on at

    Hi Valerie,

    Do not hesitate to ask question if you still had any doubt.

    Regards,

    Clofly

    If you had found any answer helped, please kindly mark as verified to close the thread, it would be really appreciated

  • VSalyer24 Profile Picture
    110 on at

    Hi Clofly:

    Thank you so much for this very thorough response. I am going to discuss the possibility with my team to determine next steps.

  • Gemma2020 Profile Picture
    61 on at

    Hi, is this still the case? That we can't see contacts in a customer journey? Seems like a functionality that should be available.

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 171 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 83

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans