Search code examples
restsharepoint-onlineepicorerp

What is the easiest way to keep a Sharepoint and Epicor database in sync?


I have a programming internship at a small manufacturing company, and I have been tasked with adding customizations to the company's Epicor ERP and Sharepoint online platforms that will link databases from both platforms to each other.

I believe the best way forward would be to build a customization for one of the platforms using Odata REST API, and set it to sync the databases daily. Unfortunately, while I have built basic Sharepoint webparts already, I have not worked with Epicor ERP before, and it seems to be difficult to find documentation for the platform.

I think it may be preferable to use an Epicor customization, since we don't host our Sharepoint site directly, and the company does not have a permanent developer who can make sure a webpart keeps up with Sharepoint online's automatic updates.

All that being said, how should I proceed with this task?


Solution

  • This is more of a broad integration question between SharePoint and Epicor ERP, but here is one possible approach breaking down the components of your issue. What is "Easiest" will be subjective based on your skillset and experience with configuring security certificates, but I'll assume both your SharePoint and Epicor ERP REST APIs are readily accessible.

    Problem Statement:

    Push part data in one-direction from SharePoint into Epicor ERP.

    Components of Solution:

    1. Create component to gather SharePoint Source Data
    2. Create component to write Epicor ERP data
    3. Create scheduling or real time monitoring component.

    One possible solution:

    1. Write a class or program which reads new SharePoint data via the SharePoint REST endpoint and writes that information into a row in a database.

    2. Write a class or program which reads information from your database row and writes it to your Epicor ERP system through your Epicor ERP REST endpoint.

    3. Write a class or program to execute your other two classes/programs and provide status updates or failure notifications to a configurable distribution list. Schedule this program to run nightly.

    Suggestion Additional Info:

    1. SharePoint has a REST API that can be used to access documents and metadata. If this is insufficient to gather the data you need in order to write to Epicor ERP, you may need to perform further processing based on records retrieved using the SharePoint API.
    2. Epicor ERP uses encapsulated business logic to write to the database. If your REST API service has been configured, you will find it at a swagger endpoint similar to the following: https://[YourServer]/[YourAppServer]/api/help This will give you a full searchable service listing. You will need Erp.BO.PartSvc as the primary service for your work. However, if you also need to configure Bill of Materials, you will need Erp.BO.EngWorkBenchSvc. If you are unaware of the steps that need to be performed in order to create the part in Epicor, you can perform a trace within the application by enabling server side tracing in order to obtain the service calls so that you can replicate the functionality by passing data in JSON objects over the REST API. Business object and customization documentation is not in the public domain, though as an Epicor customer, they are accessible via your EpicWeb portal. The following documents will provide additional information to you:

      • EpicorApplication_UserGuide - Explains how to perform part-related activities using the normal application logic
      • EpicorCustomization_UserGuide - Explains how to perform any customizations within the application as well as how to enable tracing
      • EpicorICETools_UserGuide - Explains how to use Epicor proprietary query and server-side customization tools.
      • ERP_BO_Ref.chm - Provides a full Epicor ERP BO Service Listing and details on what each method does
    3. You should be able to run a program on a trigger as a SharePoint object is modified, but I would recommend decoupling the systems and performing the data integration asynchronously on a schedule during off-hours just in case the number of parts puts a heavy load on your ERP system and could potentially impact MES users and your manufacturing work floor.