I am trying to correct a workflow error where a customer is not created if the phone number is already taken. This is the JSON response I get back from the API. I currently have the API response for successfully creating the customer writing that data back to Bubble. But I want to have a conditional in the workflow that if the “message”:“Phone has already been taken” appears, create the record without the phone.
This is the JSON error data
{
“data”: {
“customerCreate”: {
“customer”: null,
“userErrors”: [
{
“field”: [
“phone”
],
“message”: “Phone has already been taken”
}
]
}
},
“extensions”: {
“cost”: {
“requestedQueryCost”: 10,
“actualQueryCost”: 10,
“throttleStatus”: {
“maximumAvailable”: 2000,
“currentlyAvailable”: 1990,
“restoreRate”: 100
}
}
}
}
and this is my attempt to see if “message”: “Phone has already been taken” is present in the raw body text. My first conditional is if the previous step does not have an id, then repeat the step if the message is present.