Any celigo / handlebar experts here? I’m trying to...
# integrations
m
Any celigo / handlebar experts here? I’m trying to map over a item fulfillment carrier information from Netsuite to Shopify, and I need to replace “USPS Pitney Bowes” with just “USPS” because Shopify doesn’t identify the USPS tracking number correctly (matches it to DHL)… Is this correct code? It doesn’t seem to be getting the information over, (or shopify is rejecting it, cause we are still getting USPS tracking numbers ID’d as DHL)
{{#compare {{Carrier Name (Shiphawk)}}  "==" "USPS Pitney Bowes"}}"USPS"{{else}}{{Carrier Name (Shiphawk)}}{{/compare}}
m
@micah that doesn’t look right. Have you tested this handlebar in the developer playground? https://integrator.io/playground. You need to be in Developer Mode to see this
Copy code
{{#compare [Carrier Name (Shiphawk)] "===" "USPS Pitney Bowes"}}USPS{{else}}{{[Carrier Name (Shiphawk)]}}{{/compare}}
The above should work. Note that the spaces in the field name means we need to enclose it in square brackets. [ ]
see https://docs.celigo.com/hc/en-us/articles/360039326071#compare that you don’t need to add braces to the field name inside the compare clause because it’s expecting see a field name.
message has been deleted
m
thanks @matt.graney — I did not know about the playground, and was coming to the conclusion that the field name wasn’t working… those square brackets are so helpful!
👍 1
m
You can find more Celigo experts on our community. https://docs.celigo.com/hc/en-us/community/topics
also @micah we’ll be adding some more preview/debug capabilities in the first half of this year to make it even easier to track these things down
m
oh nice. it would definitely be cool to have a recent history of transactions… (like maybe 10) — maybe have it be a toggle, just to capture live data… though the playground was pretty decent at getting me some stuff to play with.
m
Wow two years of using celigo and I've never seen this dev playground.
m
Noted @mightyd3, we’ll do better to make it more obvious