I currently have a nested IF schema in a HTTP request model, and I recently updated it to account for UK tax.
Even though all values are present and true to output the desired "taxes":["uk_tax_20_sales"]
, I’m still getting it returned as "tax":20
— which equates to the last value output in the sequence.
Relevant code from the HTTP module;
{{if(124.total_tax = 0 & 124.source_name = emptystring | 124.source_name = "web"; replace(substring(106.json; 1; length(106.json) - 1); """tax"":0"; """taxes"":[""s_iva_export""]"); if(124.billing_address.country = "United Kingdom" & 124.source_name = emptystring | 124.source_name = "web"; replace(substring(106.json; 1; length(106.json) - 1); """tax"":20"; """taxes"":[""uk_tax_20_sales""]"); substring(106.json; 1; length(106.json) - 1)))}}