Hope this message find you well in these cold times. I’m having an issue with an API integration i have with the Kinetic Rest Service where i sometimes find the error of maximum user licenses reached because of a peak of user using the system at some point of the day.
Is there a way to make the session that the api uses for the integration to be persistent and to not expire in order to avoid this issue?
Contacted my CAM as i read in a few documents the existence of Web Service only licenses but it responded that those licenses are no longer being sold.
Basically we have an integration between Odoo and Epicor that does the following:
Reads inventory every 5 minutes
A few times a day reads the part master and creates new parts on Odoo.
Sales orders on Odoo create a new sale order on Epicor.
Shipments on Odoo between warehouses make inventory transfers on Epicor.
We use the ecommerce and POS modules on Odoo. Doing the mentioned actions sometimes we run out of licenses which makes us do the manual inventory transfers in Epicor as from a 200 SKU transfer for example, 67 might fail because of the maximum user error.
What happens when Kinetic is down? Does Odoo retransmit every so often until successful?
That certainly is a lot of activity over the wire. Are both systems on prem?
Instead of hitting Epicor directly, you cloud put an intermediary system in there. That system would receive the connections from Odoo and save the transactions in a queue of some kind. If Kinetic is down, this would still work. If you had to restore Kinetic to a previous state, you could still rerun transactions to get back up to date.
The intermediary would open one connection to Kinetic and stay logged in, so you wouldn’t run out of licenses. New parts in Kinetic could be added (via method directive) to a queue going to Odoo and Odoo could grab them the next time it connected.
Inventory is trickier. Most eCommerce sites don’t have exact inventory all the time. They may start with some quantity and then offer a percentage for online sale. They may also keep an internal count remaining by subtracting sales from the available amount. Later, a new quantity from the ERP system would update the available balance. The other option is to look up the quantity live, but through the intermediary.
You can change the time-out settings for a user in User Account Security. I’m not sure how you’re doing your API integration, but maybe you can increase the time-out for the user that you’re using to create the session. Assuming that session is being reused, then you could have some kind of keep-alive process that would refresh the session being used so it doesn’t time out. If you are not reusing the session, then you’d need to create a system to be able to do that. Some kind of service factory that gives you the appropriate session when needed.
Thank you for your kind answer. Odoo is cloud and Kinetic is on-prem.
To avoid having an intermediary system is why we are looking for a way to keep the session open coming from Odoo as it would become a potentially point of failure.
I can see the benefits in a solution like that being Async and have the intermediate make sure data is replicated both ways.
What happens when the connection is broken or one or the other system is otherwise unavailable. Having a highly coupled connection is a point of failure too, and a very likely one as well.
I haven’t needed to do something like that yet, and it also depends on your architecture. I s Oodo connecting directly to Kinetic through rest, or you have some middle layer somewhere that is doing that integration?
I would say @josecgomez is probably one of the experts on this as he created the Epicor Rest Helper package which I have used. In there you have to set up a session, so you can just keep that one around if you’re doing something like a .net core web/minimal api for your integration.
Sounds like a good place to start. The integration was made in Odoo directly looking at Epicor App Server for Rest calls and handling errors directly on the code which is python.
I hope you have at least restricted your firewall to inbound connections only from the Oodo IP address your integration is calling from.
I would personally have done the integration on an internal app that calls out to Oodo to get information then push that to Epicor, but I don’t know what your on-prem resources are.
Do you have any MES licences? From memory the data access licences could access and interact with all the ERP system from WCF/REST even though the GUI restricts what a human could do