Best answer

How to convert values in Zapier

  • 31 December 2020
  • 5 replies
  • 287 views

Hi All,

New to Zapier and I am trying to figure out how I can convert values within the workflow?

So for instance, I want to change the value “Canada” on the Country field that I received from Wordpress and convert it to “Ca”?

Does anyone know how to do this?

icon

Best answer by Troy Tessalone 31 December 2020, 03:22

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Userlevel 7
Badge +14

You can use a Formatter step: https://zapier.com/help/doc/how-use-formatter-functions

Specifically try the Lookup Table option: https://zapier.com/help/doc/how-use-formatter-functions#using-the-lookup-table

Userlevel 3
Badge +2

Hey @SeanF ,

 

You can use “Code by Zapier” as well, there you can put your JS logic for this.

@Troy Tessalone this looks perfect the lookup table should work a treat.
If the key is Canada then the value is Ca?

One last question; Would this work if the record being passed from Wordpress looked like this?

The lookup table would then convert the Country value to “Ca” and the workflow would push it to Salesforce.

ID Name Country City
Sean   Canada Vancouver
Userlevel 7
Badge +14

If the key is Canada then the value is Ca?

Yes, left column is the lookup value, right column is the value to return.

Userlevel 7
Badge +14

Would this work if the record being passed from WordPress looked like this?

You’d have to map the Country value from the data points returned from the trigger to the Formatter Lookup Table step, then map the desired fields to the Salesforce step.