We have an integration I am trying to get live and troubleshooting has been a pain.
It works fine one week, the next week it doesn’t, etc… You know how external APIs go if you have an integration.
For those of you that wrote your own API calls, are you logging those payloads and responses from the API somewhere so you can review them? Or do you do that only if logging is turned on in your app, etc… FWIW we are making the calls from a form within Epicor.
Looking for a little help in how best to do this whole thing…
Thank you, okay. I like the function call too. Last I checked though if I want to do it on a form I have to make a rest call since I don’t have a business object that I can use.
I chose the database so that I can put the onus back on the users if it’s something they can act upon. Like–errors of the integration is something I will have to deal with, but if it’s something like a line shipped short–that’s on them. They can then make a dashboard and work from that vs having to go look up a log file on the server and deal with that.
I would avoid anything client-based as it makes it hard to debug if you don’t have access to the file and have to ask someone for it.
So @utaylor it is fairly common for JSON based APIs to ommit null fields you should use a serializer that supports that behavior and always null check your objects
I have a serverless function in the Azure cloud which sits in the middle. The external systems calls that and then the function calls Epicor. It’s for sales orders and shipments. It has a log enabled by default and you can write there whatever you want. Very handy during the set-up & test process. Even now I always go and check the logs there first whenever I suspect something is wrong. I was reluctant doing this at first but I can say it was definitely worth it.
The first thing I do there is send the payload to an UD table in Epicor. Then, I do as much validation as I can before sending the call to Epicor. Probably too late for you as you’re almost live but it’s worth having a look.
It’s not too late, we are not live yet, it’s all still in a testing environment.
Thanks for the comment.
@hmwillett I was going to ask you about the payload of the rest call, do you have that in your UD table too, like Dragos is doing? And the response from the API?