Streaming live at 10am (PST)

Discount Code in Order Data

Hi Guys,

Trying to push data from Webflow to Airtable and requires to get the discount code (if entered) used in orders.

I couldn’t find on the API reference any field linked to discount code…

Any idea were I can find this data ?

Here is my site Read-Only: LINK
(how to share your site Read-Only link)

From my understanding there is currently no API available for discount codes. Probably in the pipe line, but nothing yet.

I fear you are right…
I assume they should be passed with the extra fields (tax, shipping and so on), hope it will be implemented soon

Actually, the discount is passed through the Totals Collection as shown below.
The API documentation don’t mention it but I got this data for an order using a discount…

1 Like

Interesting. Must have been a recent addition. That is good to hear. Probably more coming with discounts in the future then.

Thanks for that!

1 Like

Would love to know how you pulled this with Integromat!! :fire:

It is a bit tricky at the first place because the data needs to be properly extracted from the Webflow call. I had to use 2 “set multiple variable” modules to get data from the “extra” fields and the “checkout” fields.

Here is an example how to set those modules properly:

You need to use a combination of get() and map() functions to target the specific data you require.
Here is the example for the discount code

I pulled this a year ago so I would need some time to understand the concept but basically, you need to tell Integromat to get the piece of data you need within the Extras array by setting there path and parameters to match.