The ‘Mysterious’ Customer Journey Entity In Dynamics 365 Marketing

In today’s blog I am going to be talking about ‘Customer Journey’ entity in dynamics 365 for marketing app or to be specific the ‘Customer Journey Designer’ which looks like below:

customerjourney1

 

I call it ‘Mysterious’ because whatever happens in the journey ‘stays’ in the customer journey. i.e there is no way or its difficult to get the segment/contents being used in it. I am talking about Marketing Email, Marketing Page, Marketing Form etc. The question you might want to ask is why would I need that information? well, because of may be below:

  1. You might have some validations on the content you can use in the customer journey
  2. You might want to retrieve the data for reporting purpose

If you look into the relationships from customer journey to these entities, you wont find anything hence it gets difficult to retrieve these records or perform operations. In short Dynamics 365 Marketing works a little differently then our typical dynamics 365.

Whatever happens inside a customer journey designer sits in a field on this entity named as “msdyncrm_workflowdefintion“. It stores information about content added in this the journey in JSON format. 

customerjourney2

This is how it looks:
customerjourney3

 

Let’s understand what this JSON means:

  1. Each content is stored in a node called “ActivityTypeId“.
  2. The Id of the content is stored in property “Itemid“.
  3. To identify the type of content such as Marketing page form etc. refer to below table because it uses different names to each type of content:

Dynamics Entity Name Internal Name In Customer Journey
Marketing Page LandingPage
Marketing Form MarketingForm
SurveySurvey
Marketing EmailEmail
Marketing Event Event
Marketing SegmentSegment

If you debug and parse this field data into JSON, looks like something below:

customerjourney4

So when you retrieve/query this field, you have to loop through these JSON nodes and do validation using the Guids of these records like in the below example of Javascript:

 var workflowDefintion= formContext.getAttribute("msdyncrm_workflowdefinition").getValue();
 var workflowDefintionData = JSON.parse(workflowDefintion); //Parse it

                    var nodeLength = workflowDefintionData.length;
                    for (var i = 0; i < workflowDefintionData.length; i++) {
                        var node = workflowDefintionData[i];                        
                        /* Check if node is a Marketing page*/                       
                        if (node.ActivityTypeId === "LandingPage" && (i + 1) === nodeLength) {

// Perform Operations here
}

Same way you can do in the code if needed.

I hope this help!

Cheers!

Enable “Read” Auditing In Dynamics CRM 365

Let’s agree, we all have been waiting for this feature since quiet long now.

Records “Read” Audit! yes you have heard it right. This feature will let you capture details about who is reading/retrieving the data just like create/update/delete etc.

This feature is available in Dynamics CRM 365 Online  v8 and above.

1

Note : The auditing logs will be available in the Office 365 Security & Compliance Center not in the tradition record audit history in CRM which actually makes sense as it will be gigantic data and shouldn’t be kept inside CRM.

Follow below steps on how to start utilizing this feature:

  1.  To enable auditing please follow below method:
    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/enable-use-comprehensive-auditing#enable-auditing-in-dynamics-365
  2. To see the logs , follow below :
    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/enable-use-comprehensive-auditing#review-your-audit-data-using-reports-in-office-365-security-and-compliance-center

I hope this helps!