Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Seeing all contacts that are in a customer journey

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

  • Gemma2020 Profile Picture
    Gemma2020 155 on at
    RE: Seeing all contacts that are in a customer journey

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

  • VSalyer24 Profile Picture
    VSalyer24 110 on at
    RE: Seeing all contacts that are in a customer journey

    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.

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Seeing all contacts that are in a customer journey

    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

  • Suggested answer
    cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Seeing all contacts that are in a customer journey

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans