Skip to main content

Hi all, this is a similar post to

I have a Shopify Integration with our CRM that posts the completed Purchases.

example data coming from Shopify:

  • Customer id: 0001
  • Receipt No: RCP001
  • Total Price: 100
  • Line Items Name: Item1 Name, Item2 Name
  • Customer id: 0002
  • Receipt No: RCP002
  • Total Price: 100
  • Line Items Name: Item1 Name, 250grams, Item2, 50grams

With the data above, I will post the purchase with the Line Item Names. Since Zapier automatically creates the comma separation, I will just use the .split(',') function to convert them into an array. But on this case, I will have a problem with Customer 0002 since the split function will recognize 4 records instead of 2. We do not have control over how our clients name their products so this is something we can’t avoid.

Is it possible to change the line items’ separator from comma to another reserved character?

example:

  • Line Items Name: Item1 Name, 250grams | Item2, 50grams

so that I’ll use .split('|') instead.

 

 

Hi @ZapEm 

Good question.

Yeah nested line items are troublesome to deal with in Zaps.

The trick requires an advanced approach to get the raw JSON, then work with Code or AI to parse and prep the data.