• Justin Kitagawa 11
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies

I have a flow that is used for lead assignment that uses other, existing leads as the basis for assignment. As such, there is a Record Lookup that finds another lead with the same website and grabs the LeadOwnerID. However, for some reason it keeps failing and saying that there are no leads found, even though there are definitely leads that meet that criteria. 

The issue only happens intermittently, and I cannot figure out why. 

RECORD QUERY: Find_Existing_Owner
Find one Lead record where:
OwnerId Does not equal 005d0000005BQ42
Website Equals {!WebsiteFormatter} (juniper.net)
Id Does not equal {!thisLead.Id} (00Qd000000nSdjcEAC)
Result
Failed to find record.

Has anybody had an issue like this? I tried contacting support but they said that they did not have expertise in Flows... 

I have a class that does a callout to which returns JSON like this: 
{
	"personMatchResponse": {
		"inputParameters": {
			"parameter": {
				"name": "outputFieldOptions",
				"value": "jobFunction,managementLevel"
			}
		},
		"matchResults": {
			"personMatchResults": {
				"personMatchResult": {
					"matchPersonInput": {
						"uniqueInputId": "Zoom-1"
					},
					"personMatches": {
						"personMatch": {
							"firstName": "First",
							"lastName": "Last",
							"phone": "number",
							"currentEmployment": {
								"jobTitle": "Title",
								"jobFunction": "Function",
								"managementLevel": "C-Level",
								"company": {
									"companyId": 002400,
								}
							},
							"industry": ["Software Development & Design", "Software", "Engineering Software"]
						}
					}
				}
			}
		}
	}
}

and my code to parse is: 
//Parse JSON 
        JSONParser parser = JSON.createParser(res.getbody());
        System.JSONToken token;
        string text;

            parser.nextToken();     // 
            parser.nextToken();     // 
            parser.nextToken();     //
            parser.nextToken();     //

        while((token = parser.nextToken()) != null) {
            // Parse the object
            if ((token = parser.getCurrentToken()) != JSONToken.END_OBJECT) {
                text = parser.getText();
                if (token == JSONToken.FIELD_Name && text == 'personId' ) {
                    token=parser.nextToken();
                    thisLead.Zoom_Info_ID__c = parser.getText();
                    thisLead.zisf__zoom_id__c = parser.getText();
                    
                
                } else if (token == JSONToken.FIELD_Name && text == 'companyId') {
                    token=parser.nextToken();
                    thisLead.Zoom_Info_Company_ID__c = parser.getText();
                    
                
                }  else if (token == JSONToken.FIELD_Name && text == 'phone') {
                    token=parser.nextToken();
                    thisLead.Zoom_Info_Direct_Line__c = parser.getText();
                    
                
                }  else if (token == JSONToken.FIELD_Name && text == 'jobTitle') {
                    token=parser.nextToken();
                    thisLead.title = parser.getText();
                    
                
                } 
            } 
                                    
                // advance to next object
                //token = parser.nextToken();
                if (token == JSONToken.END_ARRAY) {             // we reached end of array 
                        break;
                }
            }


It was working fine before I added something to the request that caused the "inputParameters": { section to be returned. Is there a way to make it skip that section and just go the match results? 

Help is greatly appreciated! 

I have a class that does a callout to which returns JSON like this: 
{
	"personMatchResponse": {
		"inputParameters": {
			"parameter": {
				"name": "outputFieldOptions",
				"value": "jobFunction,managementLevel"
			}
		},
		"matchResults": {
			"personMatchResults": {
				"personMatchResult": {
					"matchPersonInput": {
						"uniqueInputId": "Zoom-1"
					},
					"personMatches": {
						"personMatch": {
							"firstName": "First",
							"lastName": "Last",
							"phone": "number",
							"currentEmployment": {
								"jobTitle": "Title",
								"jobFunction": "Function",
								"managementLevel": "C-Level",
								"company": {
									"companyId": 002400,
								}
							},
							"industry": ["Software Development & Design", "Software", "Engineering Software"]
						}
					}
				}
			}
		}
	}
}

and my code to parse is: 
//Parse JSON 
        JSONParser parser = JSON.createParser(res.getbody());
        System.JSONToken token;
        string text;

            parser.nextToken();     // 
            parser.nextToken();     // 
            parser.nextToken();     //
            parser.nextToken();     //

        while((token = parser.nextToken()) != null) {
            // Parse the object
            if ((token = parser.getCurrentToken()) != JSONToken.END_OBJECT) {
                text = parser.getText();
                if (token == JSONToken.FIELD_Name && text == 'personId' ) {
                    token=parser.nextToken();
                    thisLead.Zoom_Info_ID__c = parser.getText();
                    thisLead.zisf__zoom_id__c = parser.getText();
                    
                
                } else if (token == JSONToken.FIELD_Name && text == 'companyId') {
                    token=parser.nextToken();
                    thisLead.Zoom_Info_Company_ID__c = parser.getText();
                    
                
                }  else if (token == JSONToken.FIELD_Name && text == 'phone') {
                    token=parser.nextToken();
                    thisLead.Zoom_Info_Direct_Line__c = parser.getText();
                    
                
                }  else if (token == JSONToken.FIELD_Name && text == 'jobTitle') {
                    token=parser.nextToken();
                    thisLead.title = parser.getText();
                    
                
                } 
            } 
                                    
                // advance to next object
                //token = parser.nextToken();
                if (token == JSONToken.END_ARRAY) {             // we reached end of array 
                        break;
                }
            }


It was working fine before I added something to the request that caused the "inputParameters": { section to be returned. Is there a way to make it skip that section and just go the match results? 

Help is greatly appreciated! 

I have a class that does a callout to which returns JSON like this: 
{
	"personMatchResponse": {
		"inputParameters": {
			"parameter": {
				"name": "outputFieldOptions",
				"value": "jobFunction,managementLevel"
			}
		},
		"matchResults": {
			"personMatchResults": {
				"personMatchResult": {
					"matchPersonInput": {
						"uniqueInputId": "Zoom-1"
					},
					"personMatches": {
						"personMatch": {
							"firstName": "First",
							"lastName": "Last",
							"phone": "number",
							"currentEmployment": {
								"jobTitle": "Title",
								"jobFunction": "Function",
								"managementLevel": "C-Level",
								"company": {
									"companyId": 002400,
								}
							},
							"industry": ["Software Development & Design", "Software", "Engineering Software"]
						}
					}
				}
			}
		}
	}
}

and my code to parse is: 
//Parse JSON 
        JSONParser parser = JSON.createParser(res.getbody());
        System.JSONToken token;
        string text;

            parser.nextToken();     // 
            parser.nextToken();     // 
            parser.nextToken();     //
            parser.nextToken();     //

        while((token = parser.nextToken()) != null) {
            // Parse the object
            if ((token = parser.getCurrentToken()) != JSONToken.END_OBJECT) {
                text = parser.getText();
                if (token == JSONToken.FIELD_Name && text == 'personId' ) {
                    token=parser.nextToken();
                    thisLead.Zoom_Info_ID__c = parser.getText();
                    thisLead.zisf__zoom_id__c = parser.getText();
                    
                
                } else if (token == JSONToken.FIELD_Name && text == 'companyId') {
                    token=parser.nextToken();
                    thisLead.Zoom_Info_Company_ID__c = parser.getText();
                    
                
                }  else if (token == JSONToken.FIELD_Name && text == 'phone') {
                    token=parser.nextToken();
                    thisLead.Zoom_Info_Direct_Line__c = parser.getText();
                    
                
                }  else if (token == JSONToken.FIELD_Name && text == 'jobTitle') {
                    token=parser.nextToken();
                    thisLead.title = parser.getText();
                    
                
                } 
            } 
                                    
                // advance to next object
                //token = parser.nextToken();
                if (token == JSONToken.END_ARRAY) {             // we reached end of array 
                        break;
                }
            }


It was working fine before I added something to the request that caused the "inputParameters": { section to be returned. Is there a way to make it skip that section and just go the match results? 

Help is greatly appreciated! 

An error occurred at element LookUP_Leads_Meeting_criteria (FlowRecordLookup).
UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1933636742-59967 (-548403183)
This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.
Flow Details
Flow Name: Add_Memebrs_for_Working_Campaign_Object_Modified
Type: Autolaunched Flow
Version: 1
Status: Active
Flow Interview Details
Interview Label: Add Memebrs for Working Campaign Object Modified 2/22/2016 2:42 PM
Current User: J.D. Dooley (00540000000oGwT)
Start time: 2/22/2016 2:42 PM
Duration: 0 seconds
How the Interview Started
J.D. Dooley (00540000000oGwT) started the flow interview.
Some of this flow's variables were set when the interview started.
VarT_LeadStatus = Working
VarT_CampaignID = 70140000001PowKAAS
VarN_LEadAgeLessThan = 8
VarT_Location = AICH
VarN_LeadAgeGreatThan = 3
FAST LOOKUP: LookUP_Leads_Meeting_criteria
Find all Lead records where:
Status Equals {!VarT_LeadStatus} (Working)
Preferred_Location__c Equals {!VarT_Location} (AICH)
Lead_Age__c Greater than {!VarN_LeadAgeGreatThan} (3)
Lead_Age__c Equals {!VarN_LEadAgeLessThan} (8)
Assign those records to {!CollectionofLeadsMeeting}.
Save these field values in the variable: Id
Result
Failed to find records.
Error Occurred: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1933636742-59967 (-548403183)

There are at leads 10 records meeting the lead look up criteria