Loading

Parse debug logs when Salesforce Data does not inject into Journey

Дата публикации: Dec 9, 2022
Описание
Here are the steps and examples for parsing Debug Logs for Salesforce Data Event issues.
Решение
Before parsing the Debug Logs, they will need to be set up, and a test record created or updated to meet criteria (from not meeting criteria). Please follow the steps below to setup the Logs if you're unsure how to do so.
 

1. Turn on Debug Logs

Once logged into the Sales/Service Cloud
  • Select Setup
  • In the Quick Find, search for Debug Logs 
  • Select Debug Logs
  • Next to User Trace Flag click New
  • Set Traced Entity Type = User
  • Set Traced Entity Name to the user that will be creating/updating the record
  • Start and Expiration Dates should be fine as long as you are able to create/update the record within 30 minutes
  • Click New Debug Level
  • Give it a name, just make sure there are no spaces
  • Set Workflow = Finer
  • Set Callouts = Finest
  • Click Save
Make sure your new Debug Level shows up in the Debug Level field, then click Save.

2. Create/Update your record

Based on the Action (Created and/or Updated) of the Object, create and/or Update the record so that it meets the entry criteria of the Journey using the user selected in the User Trace Flag.

3. Document the date/time

Note down the Date/Time (to the second, if possible) and the TimeZone in which the record was created or updated, and also the ID of the record.


Access the Debug Logs in your Salesforce Org

  1. Log in to your Salesforce Org.
  2. Click Setup.
  3. In the Quick Find box, type Debug Logs and click Debug Logs.
  4. The Debug Logs will be below the User Trace Flags.


The User Trace Flag will generate several logs, depending on the actions of the user, and so can make it difficult to track down which file you need. Having the timestamp that the record was created or updated will help narrow it down. Sometimes you can also narrow it down by Operation, depending on how the record was created. Here are some common scenarios:
 
  • A record created manually in the UI in Classic typically has an Operation of /(object prefix)/e - i.e. /003/e for a Contact
  • A record updated manually in the UI in Classic typically has an Operation of /(objectid)/e - i.e. /00Q3600000pPMUAEA4/e
  • A record created or updated manually in the UI in Lightning typically has an operation of /aura

Please note that these are generalizations, and it could be under a different Operation if there are different processes that affect the creation or update of the record.

Use the View link to open the log(s) in a new tab. Search for JBSystemFlow_(object name) (i.e. JBSystemFlow_Contact). If you get a result, check the subsequent line with new_object in it to see if the Id lines up with the record that should be injected. If so, you have found the correct log.

Example Debug Logs with injection:
 
16:10:45.227 (10435740855)|FLOW_START_INTERVIEW_BEGIN|182862a181293703ebb335d7e272162d5c1e3f0-6750|JBSystemFlow_Lead
16:10:45.227 (10436387607)|FLOW_VALUE_ASSIGNMENT|182862a181293703ebb335d7e272162d5c1e3f0-6750|new_object|{Id=00Q3600000pPMUAEA4, IsDeleted=false, MasterRecordId=null, Salutation=null, FirstName=Linton, LastName=Jolly...
16:10:45.227 (10436436053)|FLOW_VALUE_ASSIGNMENT|182862a181293703ebb335d7e272162d5c1e3f0-6750|old_object|
16:10:45.227 (10436533318)|FLOW_ELEMENT_BEGIN|182862a181293703ebb335d7e272162d5c1e3f0-6750|FlowDecision|JB_Decision_Null_Check_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a
16:10:45.227 (10436643559)|FLOW_RULE_DETAIL|182862a181293703ebb335d7e272162d5c1e3f0-6750|JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Parameters_Null|true
16:10:45.227 (10436665742)|FLOW_VALUE_ASSIGNMENT|182862a181293703ebb335d7e272162d5c1e3f0-6750|JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Parameters_Null|true
16:10:45.227 (10436683102)|FLOW_ELEMENT_END|182862a181293703ebb335d7e272162d5c1e3f0-6750|FlowDecision|JB_Decision_Null_Check_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a
16:10:45.227 (10436714155)|FLOW_ELEMENT_BEGIN|182862a181293703ebb335d7e272162d5c1e3f0-6750|FlowDecision|JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Decision
16:10:45.227 (10437025821)|FLOW_RULE_DETAIL|182862a181293703ebb335d7e272162d5c1e3f0-6750|SalesforceObj2d95094362a61233d7e7d05c70c5bd3a|true
16:10:45.227 (10437040173)|FLOW_VALUE_ASSIGNMENT|182862a181293703ebb335d7e272162d5c1e3f0-6750|SalesforceObj2d95094362a61233d7e7d05c70c5bd3a|true
16:10:45.227 (10437051183)|FLOW_ELEMENT_END|182862a181293703ebb335d7e272162d5c1e3f0-6750|FlowDecision|JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Decision
16:10:45.227 (10437069054)|FLOW_ELEMENT_BEGIN|182862a181293703ebb335d7e272162d5c1e3f0-6750|FlowActionCall|SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_FireJBTrigger
16:10:45.227 (10437082949)|FLOW_ELEMENT_DEFERRED|FlowActionCall|SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_FireJBTrigger
16:10:45.227 (10437092411)|FLOW_ELEMENT_END|182862a181293703ebb335d7e272162d5c1e3f0-6750|FlowActionCall|SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_FireJBTrigger
16:10:45.227 (10437103366)|FLOW_START_INTERVIEW_END|182862a181293703ebb335d7e272162d5c1e3f0-6750|JBSystemFlow_Lead
16:10:45.227 (10437125704)|FLOW_BULK_ELEMENT_BEGIN|FlowActionCall|SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_FireJBTrigger
16:10:45.515 (10515320435)|DML_BEGIN|[10]|Op:Insert|Type:et4ae5__JB_Event__e|Rows:1
16:10:45.515 (10594780271)|DML_END|[10]
16:10:45.227 (10596695006)|FLOW_ACTIONCALL_DETAIL|182762a181293703ebb335d7e272162d5c1e3f0-674f|myRule_1_A1|Flows|JBSystemFlow_Lead|true|
16:10:45.227 (10596717837)|FLOW_VALUE_ASSIGNMENT|182762a181293703ebb335d7e272162d5c1e3f0-674f|myRule_1_A1|true
16:10:45.227 (10596731366)|FLOW_BULK_ELEMENT_END|FlowActionCall|myRule_1_A1|0|346


Once you have found the correct Debug Log, search for JBSystemFlow_(name of the object being injected). In this example, it's JBSystemFlow_Lead. Find the line that starts with FLOW_START_INTERVIEW_BEGIN and has JBSystemFlow_(Object). The lines between this and FLOW_START_INTERVIEW_END...JBSystemFlow_(Object) will give you all of the data in the fields for the new and old objects (old objects will only have data if a record is updated), plus all of the Decisions that the record went through in the associated Flow, plus the results for each outcome. We'll get more into that below. Under the FLOW_START_INTERVIEW_END...JBSystemFlow(Object) line, if everything went well with the Flow, you will see a line for FLOW_BULK_ELEMENT_BEGIN...FireJBTrigger. If you see this line, unless there are several errors directly below (see section on Platform Events), then Salesforce ran the APEX job to fire the Entry Event. At this point, you would check the Marketing Cloud Connect logs to see if there was an issue with the call completing. Click here for how to parse the Marketing Cloud Connect logs. 

Let's look at a Debug Log where the fire event did not happen:
 
16:23:37.142 (150821372)|FLOW_START_INTERVIEW_BEGIN|8557980ff96eae468bac8498796162d5d1cd65-6ef6|JBSystemFlow_Lead
16:23:37.142 (151372948)|FLOW_VALUE_ASSIGNMENT|8557980ff96eae468bac8498796162d5d1cd65-6ef6|new_object|{Id=00Q3600000pPMW0EAO, IsDeleted=false, MasterRecordId=null, Salutation=null, FirstName=Linton, LastName=Brown...
16:23:37.142 (151412658)|FLOW_VALUE_ASSIGNMENT|8557980ff96eae468bac8498796162d5d1cd65-6ef6|old_object|
16:23:37.142 (151464421)|FLOW_ELEMENT_BEGIN|8557980ff96eae468bac8498796162d5d1cd65-6ef6|FlowDecision|JB_Decision_Null_Check_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a
16:23:37.142 (151537430)|FLOW_RULE_DETAIL|8557980ff96eae468bac8498796162d5d1cd65-6ef6|JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Parameters_Null|true
16:23:37.142 (151550943)|FLOW_VALUE_ASSIGNMENT|8557980ff96eae468bac8498796162d5d1cd65-6ef6|JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Parameters_Null|true
16:23:37.142 (151561631)|FLOW_ELEMENT_END|8557980ff96eae468bac8498796162d5d1cd65-6ef6|FlowDecision|JB_Decision_Null_Check_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a
16:23:37.142 (151572909)|FLOW_ELEMENT_BEGIN|8557980ff96eae468bac8498796162d5d1cd65-6ef6|FlowDecision|JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Decision
16:23:37.142 (151749528)|FLOW_RULE_DETAIL|8557980ff96eae468bac8498796162d5d1cd65-6ef6|SalesforceObj2d95094362a61233d7e7d05c70c5bd3a|false
16:23:37.142 (151762490)|FLOW_VALUE_ASSIGNMENT|8557980ff96eae468bac8498796162d5d1cd65-6ef6|SalesforceObj2d95094362a61233d7e7d05c70c5bd3a|false
16:23:37.142 (151771387)|FLOW_ELEMENT_END|8557980ff96eae468bac8498796162d5d1cd65-6ef6|FlowDecision|JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Decision
16:23:37.142 (151839236)|FLOW_START_INTERVIEW_END|8557980ff96eae468bac8498796162d5d1cd65-6ef6|JBSystemFlow_Lead

Again, we start at the FLOW_START_INTERVIEW_BEGIN...JBSystemFlow_(Object) line. Underneath there we have two FLOW_VALUE_ASSIGNMENT rows, one for new_object and one for old_object. Whenever a record is created, new_object will be the only one that has data. If doing an update, new_object holds the updated data, while the old_object holds the data for the record before it was updated. Once we find the Decision in the Flow that the record did not pass, we'll be able to look at the logic of the outcome and data in these rows to see what from the data was incorrect.

Each FLOW_ELEMENT_BEGIN/FLOW_ELEMENT_END and rows in between will show information about specific Decisions in the Flow, their Outcomes, and the results of those Outcomes. Note: You will need read access to Flows to be able to view these Decisions.

Steps to find the Flow associated to your Journey

  1. Log into your Salesforce org.
  2. Click Setup.
  3. Search for Flows in the Quick Find box and click Flows.
  4. Click Open next to the name of the Flow from the Debug Log (i.e. JBSystemFlow_Lead).

Once the page loads, you can drag the different nodes out to see the flow of the Decisions and Jobs. The arrows show you the direction of the flow. There will be a green icon in the upper right when you click on a node; however, once dragging all of the nodes out, if you click anywhere on the canvas, the node that retains a green icon in the upper right is the top node, where the Flow starts. The arrows show the direction different Outcomes will go; the text on the arrows shows the name of the Outcome. If you hover over a node, you can see its full name. When you double click on a node, you can see its properties. Let's go back to the first FLOW_ELEMENT_BEGIN in our Debug Logs and compare to the first Decision in our Flow.
 
16:23:37.142 (151464421)|FLOW_ELEMENT_BEGIN|8557980ff96eae468bac8498796162d5d1cd65-6ef6|FlowDecision|JB_Decision_Null_Check_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a
16:23:37.142 (151537430)|FLOW_RULE_DETAIL|8557980ff96eae468bac8498796162d5d1cd65-6ef6|JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Parameters_Null|true
16:23:37.142 (151550943)|FLOW_VALUE_ASSIGNMENT|8557980ff96eae468bac8498796162d5d1cd65-6ef6|JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Parameters_Null|true
16:23:37.142 (151561631)|FLOW_ELEMENT_END|8557980ff96eae468bac8498796162d5d1cd65-6ef6|FlowDecision|JB_Decision_Null_Check_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a
Decision properties:

Name: JB_Decision_Null_Check_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a
Name (outcome): JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Parameters_Null
Criteria: (old_object is null) = True

You can see the Name in the Decision lines up with the name at the end of the FLOW_ELEMENT_BEGIN. The second line, FLOW_RULE_DETAIL, will give you the name of the Outcome, and the results. The details of the Outcomes show up in the lower half of the Decision properties. FLOW_VALUE_ASSIGNMENT confirms the assignment of the value. You can click under EDITABLE OUTCOMES on the left in the Decision to see the logic for each Outcome. In this case, we are looking at JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Parameters_Null:

The Logic will show you logical operators (such as AND, OR, and ! [NOT]), and the combination of such if there are multiple lines. In this case, old_object is null, per the FLOW_VALUE_ASSIGNMENT line, so this outcome passes. This is checking to see if the record was just created, and if so, it goes down this path. We can see that it passes as well since the lines in the Debug Log show true. This means the record will move to the next Decision based on the arrow for this Outcome. In this example, you can see that it goes to the Decision to the right of the top Decision.

Here is the next FLOW_ELEMENT_BEGIN in our Debug Logs:
 
16:23:37.142 (151572909)|FLOW_ELEMENT_BEGIN|8557980ff96eae468bac8498796162d5d1cd65-6ef6|FlowDecision|JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Decision
16:23:37.142 (151749528)|FLOW_RULE_DETAIL|8557980ff96eae468bac8498796162d5d1cd65-6ef6|SalesforceObj2d95094362a61233d7e7d05c70c5bd3a|false
16:23:37.142 (151762490)|FLOW_VALUE_ASSIGNMENT|8557980ff96eae468bac8498796162d5d1cd65-6ef6|SalesforceObj2d95094362a61233d7e7d05c70c5bd3a|false
16:23:37.142 (151771387)|FLOW_ELEMENT_END|8557980ff96eae468bac8498796162d5d1cd65-6ef6|FlowDecision|JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Decision

Decision properties:

Name: JB_SalesforceObj2d95094362a61233d7e7d05c70c5bd3a_Decision
Name (outcome): SalesforceObj2d95094362a61233d7e7d05c70c5bd3a
Criteria: (new_object equals Jolly)

Here, you can see that the name of the FLOW_ELEMENT_BEGIN lines up with the name of the Decision. It checks the LastName of the new_object to see if is equals Jolly. You can check the FLOW_VALUE_ASSIGNMENT for new_object in the Debug Log to see the value of LastName: LastName=Brown. This Outcome is false. Since there are no further Outcomes to evaluate, the Flow stops without injecting the Lead. In this case, you would want to create a Lead with the Last Name of Jolly for the record to be injected.

Please note: There is one Flow per Object that has at least one active Journey, which means there can be multiple Journeys referenced in one flow, if more than one are activate on that Object. So if you have two different Journeys using Lead as the Object, you will have Decisions for the separate criteria. Sometimes a record may not pass the criteria for the Journey you are looking at, but will continue through the Flow to see if it meets the criteria of other Journeys.
 
Номер статьи базы знаний

000382222

 
Загрузка
Salesforce Help | Article