We are in the process of setting up an online parts store and working on ironing out the final details of how the orders hit our ERP. We have some product groups that can be sold out of multiple sites… and their “primary” site isn’t the Aftermarket site. Consequently, when the order comes in from the web, it’s in the wrong site. What do you recommend I do to force all web orders to come in to the Aftermarket site? I have dabbled with a BPM and it sort of works… but it’s superficial. The release is saved in the correct site and warehouse but the demand qty shows up in the primary sales site. So our PartWhse records are getting all out of whack. Thankfully, we’re still in Pilot… but it’s a problem that needs solved and I am reaching out to see if there is a more obvious or easy solution besides trying to force things using BPMs.
According to the Swagger page:
Both endpoint types support additional Kinetic specific query parameters:
erp.plant - Site (or Plant) ID to be used as current
language - 3 letters Kinetic language code (for example, eng, rus, etc.)
locale - standard Windows NLS language code (for example, en-us, de-DE, etc.)
So if I’m understanding correctly, you should be able to add “erp.plant” with “Aftermarket” as a query parameter. This could make it work in the context of your “Aftermarket” site. This works in the context of some Business Objects but this process could be different.
I did notice that there is a Default Site assigned to our company. I wonder if the web app is initiating the API call by establishing which company (and consequently site) that the transaction needs to go to… I wonder if it’s at that point we can change the site.
I have sorted this out and can offer some suggestions:
- In our case, we only want to use our Aftermarket site. I can restrict the user that the API is using to only have access to that one site on their User Account Security Maintenance. This is the fastest and easiest way to solve the issue.
- If the use case requires multiple sites can be selected, then you simply need to make sure that when you create your session at the beginning of the API calls, you need to also call the SetPlant method in the SessionModSvc and tell it which site you want to use. I believe the SetCompany method returns the default site set on the Company Config but it also might be returning the site that the user was last logged into… I can’t confirm which.
Hey Dan, Which API call to use Ice.LIB.SessionModSvc/SetPlant ?? I am try to set newSite input parameters to the default site i want to, but still no luck…any steps i am missing??
In V2, you can pass the plant (and company) in on the URL:

or through CallSettings Headers.
It’s one of the few places where we don’t have to follow the trace.
Details in the REST v2 guide on EpicCare.
I see Mark, thanks for the quick assist, i was able to use that erp.plant to post it for testing…

