How to manually map fields that do not appear in the sample data (aka "custom pill mapping")

  • 19 May 2021
  • 0 replies
  • 142 views
How to manually map fields that do not appear in the sample data (aka "custom pill mapping")
Userlevel 4
Badge

Hi all, this is Erin Oz from the Zapier Premier Support Team with a tip for creating custom “pills” to map fields in Zapier. 

Background Info

Some apps have a hard-coded sample that is retrieved when creating a new trigger. In apps that allow custom fields, this can lead to a situation where the custom fields you’d like to use later in the Zap’s action steps are not shown in the sample. 

This often leads to placeholder errors, because the field sent in a live call is different than the field mapped from the sample. 

Example

For example, let’s say your trigger pulls in a default sample that shows an Address field:

-XvT8ae3WEqMd6LCgp_6nA7Jyn5JMGz-vAj68-fNBgMQsDQ5K_LQ0AkJdXl2ITZd0PomEmafhagBOR6XrIMPpuQDsZ65Al0SRb7hoMzL9FBzMrGYEBV-B4VF5i1QTIbaFba6V7gW

(view larger)

You build your Zap, and you map the Address to the destination field in your action step. 

GObInFtLq9Na53gjDSplQkvhwVf8nVF1TTpjAxjB_0g3BaY7yjwLooPBwBrIMrzjnO8MXFiTIIhS53oIFpLC7BNCJ3HFHFQCGCWTtohm3soS0R1xZddnC-mzHIfRM0Ja0m91PCjV

(view larger)

But in your live form, the address field is called “Street Address”. When you turn your Zap on and it runs, you’ll see a placeholder error: 

QNtsYzkK77-d232sRXHvngvTuYatfDE06vMs80cE6HUpWj9NeX7_MWnKB21zybV1h0LeZ87dVkc-3u8rqFnAhf8OkiTEyxjcXVaLoCseg10hiqBOGKi4mT4Pr4e0bkRLB4ZMf3_7

(view larger)

This can be confusing, because the address field present in the sample was mapped! In this case, the problem is that the sample used the name “Address” for the field name, and the live run used the name “Street Address”. 

Whenever you see {{...}} curly braces around entries in the Data In of an action, this means that there is a field mapped there in the Zap Editor, but when the Zap ran live this data was not sent from a previous step.

What we can do is create a custom pill mapping with the field name we expect in the live sample.

Pill Mapping Code

If you were to copy and paste this pill showing “First Name: Steve” from the Zapier Editor into a plain text editor (or even your browser’s address bar, which will quickly remove any formatting in your pasted text), you will see code that looks like this:

{{122484559__First Name}}

kolg3QkdFsMlqC04XZn7lzwcFIB9WOXs6Bn0aAcV3FuruN9QiRnA-Jr-a3bcnqMvPoMKziRxQ1E0163QsKcG30I4X6teU0voYwJQaKjfb2_nbw3pRdt3sARm5aUFqHRu5ChuKJ7_

(view larger)

This code is made up of two pieces, the Node ID of the step where that information is received and the name of the field where the data is being sent. These two pieces are separated by two underscores.

You can get the Node ID from the URL of the Zap:

D91NR-aZsgpipmA5KBb80Y1RsyXUt-Mxvxih_SNb6X6p7jlHKQTVd_Iizp7PCz_QakAU704TGFZHdVp01qD4pp9_QjnLAewRb9jAiO-qutyxqn2EnY4Gtbfc26THTMgdAL5qycfn

(view larger)

For example, using the Zap at this URL:

https://zapier.com/app/editor/122484559/nodes/122484559

Where we are trying to retrieve the field with a name of ‘Street Address’, the construction of this code will look like this:

{{90304568__Street Address}}

If the field is a key/value pair (like First Name: Steve), the key or field name can be used after double underscores, as shown in the example. 

In a case where the field is nested under another field (or multiple fields), each nest would be separated by double underscores. 

For example, if we were trying to retrieve the response for question 3 in the detail below:

zhh19CpeEYGJtcWGJmAa_TvTZXVCZQm1xxnu61CbkDaueVPG3AvQxVYaJEPnPI6LVZQtfUAnT6xBRFzTx06xdr8DdAkfgAkemE4D17Otba657_5wagDVruOMsZHkJShOkRXZxtwA

The code would look like this:

{{83921056__questions__3}}

If you need to extract a line-item array, use square brackets to separate the name of the array and the name of the field, as seen in the example below:

TsIOWReIN7Lf3E8f2HSHs5kRBv8K3YqkR1vkRP69sVvHsfJ57Wlu7W8hKZxWRPuh5pQZ-4UsRMuHfQyRSQqENZg_yOEf-RPZhhAO8eb0HIH6nw1TjU_PeaSE1YoLvXKfJfafPLxa

To extract the value in the field total of them all, the code would look like this:

{{90317686__line_items[]total of them all}}

Tips

A few tips regarding underscores and spaces:

  • If there are spaces in the field name, include those spaces in your code.

  • If the field name includes underscores, include these in your code as well. Be sure to use the correct number of underscores - if the field name has two underscores, your code should too.


0 replies

Be the first to reply!

Reply