# Connecting Autodesk & ERP ERP systems that provide an [OData]() interface can be directly connected to applications such as Vault Client, Inventor or AutoCAD.\ But also ERP systems which doesn’t expose a web API can be connected using [powerGateServer](), who then acts as a middleman and translator. ```{image} /img/powergate_workflow.png :width: 600px ``` ## ERP integrations Vault Clients and CAD applications can be easily connected to ERP systems using the powerGate [Cmdlets]() or the [.NET library]().\ Depending on whether data synchronizations must be fully automated, partially automated or performed manually, an ERP integration can be realized using [powerJobs Processor](), [powerEvents]() and [Autodesk Vault Data Standard]() (see e.g. [powerGateTemplate]()). ### Modules The *powerGate_Connections.psm1* module is delivered in the commandlets installation directory *%ProgramFiles%\coolOrange\Modules\powerGate*.\ It gets automatically imported with the *powerGate* module and provides a global **$sapConnect** variable for [connecting to SAP systems]().\ The **$global:Host.PrivateData.OnNonTerminatingError** extension ensures that Vault users are notified about [connection problems](<#errors>) and can better understand whether the problem is caused by their client-machine, by powerGateServer or directly triggered by the ERP system. ## Errors Powershell hosting applications inform scripting guys and Vault users in different ways about [Terminating Errors]() that arise during script or module executions : * [Autodesk Vault Data Standard]() shows Message Boxes and writes to the Log File * The [BOM Window]() displays Error Dialogs during Check- and Transfer operations or failure Icons while loading the BOM tree * [powerEvents]() displays Error Message Boxes * [powerJobs Processor]() jobs fail * PowerShell IDE's display the error message and its stack trace with red text in the terminal when the script execution stops When **connection problems** occur, [ERP cmdlets]() do not terminate by default (see `-ErrorAction:Continue` parameter) and provide [WebRequestException]() details in the `$Error` variable instead.\ By default, with the *powerGate_Connections.psm1* module, powerGate also takes care of handling such [Non-Terminating Errors]() and informs Vault users about the connection troubles.\ This behavior is available in all types of ERP integrations and helps to understand whether the connection problem was raised by the client-machine (no request was send), the powerGateServer or directly by the ERP system (error response): * in applications such as the Vault Client, Inventor or AutoCAD a Connection Error Dialog will be displayed. ```{image} /img/connection_errordialog.png :width: 300px ``` * within BOM Window [Check- and Transfer functions]() where problems with ERP cmdlets occur, the currently processed [$bom](), [$bomRow]() and [$item]() objects are automatically assigned with an [Error Status]() and corresponding `_StatusDetails`. ```{image} /img/bomwindow_connections_errors.png :width: 410px ``` * all [Vault Restriction events]() that encounter ERP connection problems are automatically [restricted](). ```{image} /img/pe_restriction_dialog_pgs_license_expired.png :width: 400px ``` The same Error details are logged and can be found in the [logfile]().