How to use Formatter’s lookup table function instead of creating multiple paths/Zaps

  • 8 October 2020
  • 2 replies
  • 613 views
How to use Formatter’s lookup table function instead of creating multiple paths/Zaps
Userlevel 7
Badge +10

A common workflow that we get asked about is something along the lines of:

When someone buys Product X from my online store, I need to add them to the Bought Product X list in my email marketing app.

At first glance, you’d think that Paths would be a solution, or maybe having multiple Zaps that each have a filter. While you can do it that way, and if the number of variations is small it may not be a bad idea, there’s another way to do it.

Instead, you could try using a function of our Formatter app called a lookup table.

In a nutshell, it allows you to look at the values coming into a particular field and set up various options for “when this comes in, output this”. 

Example: When “Product X” comes in the “Item Purchased” field of your online store, output “Bought Product X”. Then in your action step, you map the output of that lookup table instead of choosing one of the options from the dropdown.

You can imagine setting up multiple input/output pairs for the various products whose purchasers you’d like to email. 

It’s really that easy?

Well, it’s not quite that simple. In theory, what I explained above is correct. But in the vast majority of cases you won’t be able to use the label for your action item (in this case, Bought Product X). You’ll need to use its corresponding ID, which is what your destination app will be able to interpret.

For example, in this case I wouldn’t use The Greatest List. Instead I would use 21bea09d13.

But where does it go? And how do you match it with the value that will come from your trigger step? This is what the lookup table step looks like:

You choose the field that will contain your value (in this case, the item purchased) then you have to use value pairs to indicate what to look for, and what to output.

NOTE: this has to be an exact match. You couldn’t type “greatest” and have it match when The Greatest Item comes through.

Now on your action step (in my case Mailchimp) you would use the custom value option and map the output of this lookup table:

Make sure you’ve got matching pairs for the incoming value and what you want to output and you’re good to go. That could be something like this, in my example:

Hope you’ve found this helpful :) 


2 replies

Userlevel 3
Badge

This is great for any instance where there’s a single action step you need to full-fill on which requires a dynamic value for a Zap.
In any scenario where there’s more than one action step that requires dynamic information based on a given variable, Paths may make more sense.

For example, 

When someone buys Product X from my online store, I need to add them to the Bought Product X list in my email marketing app AND indicate specific tag to their contact AND store their email and purchased SKU in a database AND update a particular deal in my CRM.

@nicksimard 
Does my rationale make sense?

Userlevel 7
Badge +10

Hey @JakeatGrantMe in the example you gave, it would probably make sense to use Paths or multiple Zaps with filters. 

OR, you can use something called Named Variables with a lookup table: 

I’ve done this when I need to use multiple dynamic values that all depend on a single lookup, like:

When Person X triggers a Zap, message them via Slack (I need their ID), send them an email (I need their email address), add a task and assign to them (I need the ID in the project management app).

I can add all of those into the lookup table using named variables :)

Reply