How to dynamically pick different code lists using Zapier
There are cases where you want to assign a code from different code lists depending on some value of the recipient. You can use Zapier to create a lookup table and, based on a differentiator, select different code lists in Coupon Carrier.
In this example, we're going to use ActiveCampaing, Zapier, and Coupon Carrier to assign a code to a custom field when a tag is applied in ActiveCampaign. But we also want to select different code lists in Coupon Carrier depending on a value of a field on the contact. So we'll refer to this as the differentiator.
In ActiveCampaign, we've added two contact fields:
- Coupon (Text input)
- Differentiator (Text input)
We've also created a new tag called "add_code".
In Coupon Carrier, we've created two manual code lists where we've added a few sample codes:
- Dynamic demo A
- Dynamic demo B
What we want is that when a contact in ActiveCampaign receives the tag "add_code" and they have the value "value1" in the differentiator field, then they should get a code from "Dynamic demo A", and if it's "value2" it should use the list "Dynamic demo B".
Let's create a new Zap in Zapier that has the following steps:
- The Zap should trigger when the tag "add_code" is added to a contact in ActiveCampaign.
- Using the lookup table in "Formatter by Zapier", we're creating a table of values in the differentiator field in ActiveCampaign and the Code List ID in Coupon Carrier. You can find the Code List ID in Coupon Carrier by viewing a code list and then looking at the browser URL where the ID is shown.
- We then "Assign a code" from Coupon Carrier using the Code List ID from the lookup table by selecting to use a Custom value for the code list.
- Finally, we'll update the contact's Coupon field using the code we received from Coupon Carrier.