Best answer

Problem with sending dynamic data

  • 16 August 2023
  • 2 replies
  • 39 views

We are an E-commerce SaaS provider and we would like to send buyer data to Zapier after a successful order from customers. This works fine so far in the developer environment.

But what we have problems with is dynamic data. The client has the possibility to create his own fields, e.g. "T-Shirt size" or "Car license plate number". For example, we send Zapier the following object:

{
"buyer": {
"firstName": "Max",
"lastName": "Mustermann"
},
"dynamicData": {
"T-Shirt-Size": "M",
"Car plate": "B-DE-1234"
}
}

How can I now use this freely defined object array in Zapier and, for example, in a simple case, have Google Sheet create a new row as the target? 

// edit: To make it easier, we can also format the json data something like..but is that better? the problem will still exist.

{
"buyer": {
"firstName": "Max",
"lastName": "Mustermann"
},
"dynamicData": [
{
"key": "T-Shirt-Size",
"value": "M"
},
{
"key": "Car plate",
"value": "B-DE-1234"
},
]
}
icon

Best answer by Troy Tessalone 11 September 2023, 16:09

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

We are an E-commerce SaaS provider and we would like to send buyer data to Zapier after a successful order from customers. This works fine so far in the developer environment.

But what we have problems with is dynamic data. The client has the possibility to create his own fields superfoamusa, e.g. "T-Shirt size" or "Car license plate number". For example, we send Zapier the following object:

How can I now use this freely defined object array in Zapier and, for example, in a simple case, have Google Sheet create a new row as the target? 

// edit: To make it easier, we can also format the json data something like..but is that better? the problem will still exist.

Use the "Split Text" or "Extract" feature to split the "dynamicData" object into individual fields. For example, you can split it by commas, semicolons, or any other delimiter your system uses to separate fields. If your data is already formatted as JSON, you may need to extract specific JSON keys.

Userlevel 7
Badge +14

Hi @Fraka 

Good question.

It would be better to send custom field data like this:

 

If you send data like this, then it will Zapier will autoparse into separate arrays for the key and the value, which makes working with the data more challenging in Zaps.