Looking for a starting point to have Epicor communicate with 3rd party API

Hello,
My client is now looking at further integration between their systems. Having Epicor to be able to call a 3rd party application they use to create records in it will free up a full time staff member so they want to proceed.

The 3rd party application runs on a different server on their local network, and will accept SOAP 1.1, SOAP 1.2, HTTP GET and HTTP POST calls to it’s end point. I’m trying to figure out how to trigger the call in Epicor and how to get Epicor to connect to the end point.

Has anyone implemented something like this before? This should be a very simple call, after we run a customization that assigns serial numbers to each order line. I’m thinking maybe a BPM Data directive on the OrderDtl table?

Thanks in advance for your time and effort.
Greg

We do this type of thing quite often. We prefer REST endpoints but here is an example you can use in custom code - after adding your own endpoint information and methods - and this uses SOAP. This can of course be streamlined and simplified but we use it for some basic training around SOAP. We do quite a few calls like this around Customer Shipment that when “Shipped” we lookup using the Shipping Company API for info like earliest pickup date and submitting pickup requests (eliminate a lot of calls and/or web site submissions)

        string StagingId = string.Empty;
        string SessionId = string.Empty;
        System.Net.HttpWebRequest request = null;
        System.Net.HttpWebResponse response = null;
        string url = "http://myurl.com/B2BServices.asmx?op=GetSessionID";
        request = System.Net.WebRequest.Create(url) as System.Net.HttpWebRequest;
        request.Method = "POST";
        //SOAPAction  
        request.Headers.Add(@ "SOAPAction", "http://myurl.com/GetSessionID");
        //Content_type  
        request.ContentType = "text/xml;charset=\"utf-8\"";
        request.Accept = "text/xml";

        System.Xml.XmlDocument SOAPReqBody = new System.Xml.XmlDocument();
        //SOAP Body Request    

        SOAPReqBody.LoadXml(@ "<?xml version="
          "1.0"
          " encoding="
          "utf-8"
          "?> <
          soap: Envelope xmlns: xsi = ""
          http: //www.w3.org/2001/XMLSchema-instance"" xmlns:xsd = ""http://www.w3.org/2001/XMLSchema"" xmlns:soap = ""http://schemas.xmlsoap.org/soap/envelope/"" >  
          <
          soap: Body >
          <
          GetSessionID xmlns = ""
          http: //myurl.com/"">  
          <
          emailAddress > " + "
          username@test.com " + @" < /emailAddress>   <
          password > " + "
          password" + @" < /password>   <
          /GetSessionID>   <
          /soap:Body>   <
          /soap:Envelope>");
          using(System.IO.Stream stream = request.GetRequestStream()) {
           SOAPReqBody.Save(stream);
          }
          //Geting response from request  

          using(response = request.GetResponse() as System.Net.HttpWebResponse) {
           System.Data.DataSet dsResponse = new System.Data.DataSet();
           dsResponse.ReadXml(response.GetResponseStream());
           foreach(System.Data.DataRow dr in dsResponse.Tables["GetSessionIDResult"].Rows) {
            SessionId = dr["Result"].ToString();
            //InfoMessage.Publish(SessionId);
           }
          }
2 Likes

What systems are you trying to communicate with?