Trouble with Zap failure due to state name format in Givebutter
After setting up a few custom fields in Givebutter, a few of which would combine for an Address type field in Salesforce, I found that when a user would spell out the state name, i.e. "Florida" instead of "FL", the Zap would fail. So, as I could not change a field type in Givebutter, I created a new drop-down field (with the 50 state codes) and archived the original text field. A few transactions failed on the Get Custom Fields webhook step and I can't get them to re-run successfully.
From what I can see, the transactions have all the necessary data in the custom fields, but they are in status “Scheduled” and if I try forcing one, it fails on the “Get Custom Fields” webhook.
For us to have more info about what you are referring to, post screenshots showing:
how your Zap steps are outlined
how your Zap steps are configured in EDIT mode in the CONFIGURE tab with the field mappings visible
the DATA IN for the Zap step with the error
the Zap step error
Thanks for your suggestion Troy - I really appreciate it.
I’m just not seeing how to edit the Zap data before re-running it. I do see how I should be able to do that in testing, but not “for real”. I’m attaching the screen shots you mentioned.
Step 4 is actually independent from Step 3. Input data for Step 4 actually comes from Step 1.
I initially believed the error was due to the custom “State Code” field being renamed to “State”…
...but after further reflection and digging, and noticing the “Check previous step output” on the troubleshooting tab, and looking at the data records that failed and continue to fail, I believe when there is no Team Member ID for webhook in step 3, step 4 ends up with a 414 error.
I’m working on a new draft where I’ve added an error handler on steps 2 and 3, but this has made the zap MUCH bigger. Is there a way to only run a webhook step if the data is there?
Thank you for your assistance!
Hi @Troy Tessalone
Doing further testing with the error handler, it seems that because the error occurs in the GET Custom Fields step, which is the step FOLLOWING the error, the error handler never catches it.
With further investigation I came across </> Code by Zapier, where AI helped me write this bit of JavaScript:
// Prepare the output object with the appropriate values output = { TeamID: teamID, MemberID: memberID }; ...which should substitute “000000” if TeamID or MemberID have no data coming from Givebutter.
Unfortunately, that hasn’t fixed anything.
@Scott_HANT
Instead of a Code step, you can use this Formatter step: Formatter > Text > Default Value
Formatter steps count as 0 Tasks in Zap Runs.
You would need a separate Formatter step for each:
So, I’m trying to re-think how I do this, which brings up another question: When I’m assigning something (see arrow below) to a text field, can I use logic? e.g. If MemberID is null, “None”, else MemberName.
I’ve scoured the support site and haven’t seen anything that.
Thanks!
@Scott_HANT
When I’m assigning something (see arrow below) to a text field, can I use logic? e.g. If MemberID is null, “None”, else MemberName.
Here’s what I ended up doing -- because some donations end up with a Team but not a Team Member, and I was getting a 414 error when there was no Team Member, I had to handle the different scenarios -- usually Team+Member, but sometimes Team+NoMember, and possibly NoTeam+NoMember.
Because the transaction comes from Givebutter with TeamID and TeamMemberID, but not the names, I had to use webhooks to go get the Team Name and the Team Member Name. When TeamMemberID was blank I’d end up with a 414 error in a following step. So, by splitting into 3 paths -- Team+Member, Team+NoMember, and NoTeam+NoMember, I was able to only run the webhooks that would be successful, then further down, only fill the Salesforce donation fields that I had valid data for.