Accessing Values from Multiple Lookups

Brandon Lee
Brandon Lee
  • Updated

When you are developing a pipeline and you need a value from a Lookup Syncari Record node earlier in the pipeline you can use relative tokens or explicit tokens. Depending on what you are trying to accomplish you may be forced to use one or the other.

  • Relative Token {{previousLookup.values.<api-field-name>}}
  • Explicit Token {{Lookup From <node-name>.values.<api-field-name>}}

We are going to use a real example to show off this capability and the difference between these two. In our example, we want to send a notification to a Slack channel when a deal is closed for more than $100K.

The template for the message we want to send is:

A big deal was just closed! SALESREP's hard work led to a $AMOUNT deal. ACCOUNT signed today and they will be kicking off their onboarding on STARTDATE!

As you can see in the message above we need information from the Opportunity, the Account, and the User entity:

  1. This pipeline starts with a filter that determines the stage (Closed Won) and size ($100K+) of the deal. If it doesn't meet the criteria then it just proceeds into Syncari.
  2. If it does pass the filter then we look up the related Account. We don't do anything with the Account we found right now. But doing the lookup makes the field values of Account available later on.
  3. Then we look up the User from the Opp Owner value. So it was clear, we called this Lookup node "Sales Rep". You will see where we use this in the next step.
  4. Now, in the Slack message, we can access values from BOTH of these lookups.


The resulting message in the Send Slack Message node looks like this:

A big deal was just closed! {{Lookup From Sales Rep.values.Name}}'s hard work led to a ${{Salesforce.Opportunity.Amount}} deal. {{Lookup From Account.values.Name}} signed today and they will be kicking off their onboarding on {{Salesforce.Opportunity.Start_Date__c}}!

Why did we use each token?

  • The tokens that start with "{{Salesforce.Opportunity." reference the current record being processed. These are Synapse tokens and they are formatted like this: {{<synapse-name>.<api-source-entity>.<api-field-name>}}. We didn't have to type these because they were available from the Data Token button when configuring the message
  • {{Lookup From Account.values.Name}} - This explicit token had to be used because it wasn't the previous node so we couldn't use a relative token.
  • {{Lookup From Sales Rep.values.Name}} - This is also an explicit token BUT we didn't have to use this one. We could have used {{previousLookup.values.Name}}. We recommend using explicit tokens in this case because it makes it more clear where the data is coming from and it future proofs the token in case you were to insert another lookup in here for some reason,

You can find out more about the type of tokens you can use in our article, Using Tokens Like a Pro.

Share this

Was this article helpful?

1 out of 1 found this helpful