Question

Is there a way to update a POST webhook (XML) request to get the specific data in an array?

  • 2 September 2021
  • 2 replies
  • 636 views

Hi all

I’ve been struggling with one particular webhook for a week now and really need some help. Worth mentioning that I’m not a developer but work with webhooks daily, just not familiar with this particular format.

I’ve been working with the Zapier support team but am going to see if anyone has any ideas how I might get this working correctly.

I’m raising a Custom Request (POST) webhook that is testing quite successfully. The trouble is that when I try to pull the results through in the next action step, the data isn’t actually pulling through as an array which is what I need it to do.

It looks like the data is nested in an array when testing the webhook (see screenshot below):
 

 

But this issue happens in the following step in that Payment, Payment2, Payment3, and 4-6 are not grouped together.
 
For example, we'd expect that since each of your payments have a PaymentReference field, that the Reference data for each of the three payments would be group together in a line-itemized field. But instead, we see 6 separate PaymentReference fields, one for each payment:

 

The webhook info is here:

Custom Request

Method: POST

URL: https://api.demo.ezidebit.com.au/v3-5/nonpci

---------------------


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:px="https://px.ezidebit.com.au/">
<soapenv:Header />
<soapenv:Body>
<px:GetPayments>
<px:DigitalKey>{DIGITALKEY}</px:DigitalKey>
<px:PaymentType>ALL</px:PaymentType>
<px:PaymentMethod>ALL</px:PaymentMethod>
<px:PaymentSource>ALL</px:PaymentSource>
<px:PaymentReference></px:PaymentReference>
<px:DateFrom>{DateFrom}</px:DateFrom>
<px:DateTo></px:DateTo>
<px:DateField>PAYMENT</px:DateField>
<px:EziDebitCustomerID></px:EziDebitCustomerID>
<px:YourSystemReference></px:YourSystemReference>
</px:GetPayments>
</soapenv:Body>
</soapenv:Envelope>


----------------------------

Headers
SOAPAction: https://px.ezidebit.com.au/INonPCIService/GetPayments

Content-Type: text/xml

 

Any ideas how to approach the next step? I really just want to create new row(s) in a Google Sheet for every new payment request. But the trouble is that for this to work I need line items and I can’t find a robust solution to account for the variation in payments each day when this webhook runs (it’s triggering on a Schedule).

Obviously the amount of payments is going to change from day to day so I need a solution that can cope with a variation in payment results.

Any help would be most appreciated.


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

Userlevel 7
Badge +11

Hey @RussStephens

I can see that you’d also reached out to our Support Team about this and they’ve been assisting you on this. It seems a Formatter (Utilities > Line Itemizer) step was added to create the desired line items, but as the number of items can vary for each then there would be instances where some are missed. And they also noted that even if a Code step were to be used instead it would likely have the same result of some items not being parsed from the webhook. :(

That said, I see that they recommended creating a custom CLI integration to parse the payment data in the desired format. Have you been able to give this a try and get it working as hoped? :)

Thanks @SamB. Unfortunately that was looking a little over my head. I was just hoping there was an action to group results in those instances. I was only able to achieve the result using another application.