TABLE OF CONTENTS
In Znode, ERP Connectors allow integrations with ERP systems, data sources, and external systems of any type.
An ERP Connector is implemented as a C# class. Class methods are referred to as ERP Connector 'touchpoints'.
This diagram shows how touchpoints can be triggered automatically on a schedule, in response to an event, or invoked manually from the Admin UI.
TouchPoints
Touchpoints are the most important part of the ERP Connector. As mentioned, touchpoints are simply just C# methods that can be written to do anything as needed.
Touchpoints are most commonly used for:
- Integrating with external systems
- Ex: Exporting data to external systems
- Ex: Importing data from external systems
- Performing maintenance tasks
- Ex: Running a task every hour that checks for an updated product feed file
- Ex: Running a task every minute to ping an external system as part of a health check
- Ex: Running a task on demand (when manually invoked by an admin) to do other semi-automated maintenance
Creating a Custom ERP Connector
The below instructions walk through the process of creating a custom ERP connector and touchpoint.
Create an ERP Connector
To create a custom ERP Connector, use the sample MockERPConnector as a starting point.
- Copy the MockERPConnector of the Znode.Engine.ERPConnector project as a starting point.
- Rename the folder to the desired name.
- Include the new connector in the Visual Studio project.
- Rename the .cs class files (and the class names).
- Rename the config file and the occurrences of the old name inside the config file.
- Build the solution to make sure there are no errors.
- If necessary, for the Znode.Engine.API project, add a reference to the Znode.Engine.ERPConnector project.
- Run Znode from the Visual Studio solution.
- Navigate to the Admin in a browser tab (http://localhost:6766 by default).
- Under the Dev Center module, select the Commerce Connector. Click on the Commerce Connector drop-down for ERP Connector.
- On the Business System Connector / ERP Connector page, click Add New and select the new connector as the ERP Package.
- Fill in details for the new ERP Connector, make sure the new ERP Package has its status set to “Activate”, and click Save.
Create TouchPoint
With the new ERP Connector enabled, it is time to create a touchpoint that will hold the custom logic.
- In the new connector's *Connector.cs file, add a public method with any desired logic.
- Build and restart the application.
- In the Admin UI, navigate to Dev Center > <CustomERPConnector> > * TOUCH POINT LIST.
- The page reloads. No records are shown.
- Click Add New to select a touchpoint to enable.
- Click Save.
- Click under Actions the middle-check box to enable the touchpoint. The touchpoint will confirm with a green checkmark when enabled.
- Click Actions > Trigger button. If breakpoints are enabled and Visual Studio is attached to the running processes, it should hit the breakpoint.