Quick Integration - Suppliers Help
The Suppliers quick integration import allows Hiperos 3PM users to directly upload spreadsheets via the HTTPS protocol.  This allows customers to perform inbound imports in an automated manner without the need of a user interface.  The various code snippets below provide working examples of how this is performed using a variety of popular programming languages.

The first row of the worksheet must include the field names as the column headers.  Hiperos 3PM Quick Integration reads this text to import the data to the appropriate fields.  NOTE: When importing setup data values, the setup code must be used rather than the display name.


Note: Required fields are marked with an asterisk (*).

Field Description
ParentExternalReference Enter the unique reference key of the supplier parent to link to external systems (ERP system, etc).
ExternalReference (*) Enter the unique reference key to link to external systems (ERP system, etc). NOTE: this field is required but can be left blank if the SupplierName is populated.
SupplierNumber Enter the unique reference number.
SupplierName (*) Enter the name of the supplier . NOTE: this field is required but can be left blank if the ExternalReference is populated.
Status Enter the status of the supplier.
SupplierMgrUserName (*) Enter the username of the internal Client supplier manager.
SupplierMgrFirstName Enter the first name of the internal Client supplier manager. NOTE: this field is required only when SupplierMgrUsername does not exist in the system.
SupplierMgrLastName Enter the last name of the internal Client supplier manager. NOTE: this field is required only when SupplierMgrUsername does not exist in the system.
AccountMgrEmail (*) Enter the email address of external supplier account manager .
AlternateAccountMgrEmail Enter the alternate email address of the external user.
AccountMgrFirstName (*) Enter the first name of external supplier account manager.
AccountMgrLastName (*) Enter the last name of external supplier account manager.
ShortName Enter the supplier short name.
ParentName Enter the supplier parent name.
LegalName Enter the supplier legal name.
DUNSNumber Enter the unique nine digit number for identifying and tracking.
TickerSymbol Enter the supplier ticker symbol.
IndustryClassification Enter the industry type. Must match an existing industry classification code defined under Setup Data Management.
Classification Enter the classification type. Must match an existing classification defined under Setup Data Management.
MinorityType Enter the minority type.
RiskRating Enter the level of risk associated with the supplier. Must match an existing risk rating defined under Setup Data Management.
TaxIDNumber Enter the US tax exempt ID number.
VATNumber Enter the European VAT number.
OnExclusionList [Yes or No] Enter Yes to indicate the supplier is on the US State Department's Terrorist Exclusion List.
SupplierGroup Enter the name of the supplier group.
AutoApproveCompliance [Yes or No] Enter Yes to indicate the supplier program responses for all compliance programs are automatically approved (if compliant). NOTE: setting the Auto Approve Compliance flag to 'Yes' indicates that all compliance programs for this supplier are configured as auto approval programs. This setting defaults to 'No' and overrides the program definition.
Phone Enter the supplier phone number.
Fax Enter the supplier fax number.
Website Enter the supplier web site.
BusinessType Enter the business type. Must match an existing business type defined under Setup Data Management.
SupplierType Enter the supplier type. Must match an existing supplier type defined under Setup Data Management.
YearEstablished Enter the year the supplier was founded.
EDIEnabled Enter the EDI enabled type.
LifeCycleStatus Enter the life cycle status of the supplier. Must match an existing life cycle status. See Supplier Life Cycle Status Management.
UltimateCountry Enter the default country of origin.
DefaultLanguage Enter the default culture.
WorkspaceList Enter the name of the workspace the supplier should be included. Multiple values must be separated with the pipe character (|). If the workspace does not exist, the import creates it and adds the supplier. If the workspace does exist, the import adds the supplier to that workspace. NOTE: all suppliers are added to the main workspace (Hiperos 3PM ). See Your Active Workspaces.
OnHold [Yes or No] Enter Yes to indicate the supplier is on hold.
HoldReason Enter the reason the supplier is on hold.
Description Enter a brief description of the supplier. NOTE: this is the Products and/or Services field on the Supplier Management page.

The rest of the columns can be populated with client-created user defined data located under User Defined Data Management. NOTE: use the Field Name not the Display Name as the column names.

NOTES:

  • The syntax for populating parent-child UDFs is to separate the 2 values with an @.
  • The syntax for populating Multi-select setup data UDFs is to separate the values with an @.
  • The syntax for populating Multi-select UDFs is to separate the values with a | (pipe character).
  • The syntax for populating Money and Currency UDFs is to separate the 2 values with a (space).
  • Use the setup data code or set up data type code for UDFs of type Setup Data and Setup Data Type.
  • The syntax for populating Table UDFs is: Row1Col1|Row1Col2|Row1Col~Row2Col1|Row2Col2|Row2Col3. Separate values for each column in a given row using the | (pipe character) and separate rows with the ~.
  • The syntax for populating the Unit of Measure UDF is: value|uom string i.e. (15.0|each). NOTE: the uom string must be an exact match to the configuration in the component.
  • Use the username field to populate UDFs of type User Selector.
  • Enter true to populate a Checkbox UDF with a check. NOTE: all letters must be lower case.
  • The syntax for populating Date Range UDFs is to separate the 2 values with a | (pipe); for example: 01/01/2012|12/31/2012.

Authentication

Valid credentials must be supplied for each Hiperos 3PM Quick Integration request issued in order to succeed.

The 3PM user supplied must be a member of either the 'QuickIntegration' group or the 'QuickIntegration-Suppliers' group.  The QuickIntegration group allows an account to access all Quick Integration resources.  The QuickIntegration-Suppliers group limits access to only the Quick Integration Suppliers resource.  If these groups currently do not exist in your Hiperos 3PM instance, please contact your local 3PM administrator or your Hiperos Customer Services representative to have them created.


HTTP Header Description
username Valid Hiperos 3PM Username
password Valid Hiperos 3PM Password

Content Type

The content type header must contain one of the following types listed below.  This is used to identify the file format that is being uploaded.  Note: If sending data as an octet-stream, filename is required in the Content-Disposition header.


Content Type Header File Type
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Excel 2007 or later versions (xlsx)
application/vnd.ms-excel Excel 2003 or earlier versions (xls)
text/csv Comma separated values (csv)
application/octet-stream File format determined by filename value in Content-Disposition
e.g. Content-Disposition: form-data; name="file"; filename="user_import.xlsx"
The following HTTP response status codes are utilized by quick integration to communicate import status back to the caller.  They are as follows...
Status Code Result Description
201 Created New objects succesfully created.
202 Accepted Data has been queued for import (system-generated e-mail confirmation to follow).
204 No Content No new or updated data to import was found or the file was not in the correct format.
400 Bad Request Problem rows and/or columns were found. Review returned validation message in response.
401 Unauthorized Username & password http headers were not found in the request.
403 Forbidden Login failed, was not found or not authorized.
500 Server Error Failed to save import data to database.

Java

package httpPostExample;

import java.io.File;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.mime.HttpMultipartMode;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.entity.mime.content.FileBody;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.protocol.BasicHttpContext;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.EntityUtils;

public class uploadFile
{
    public static void main(String[] args)
    {
        try
        {
            String url = "https://rportal.hiperos.com/QuickIntegration/Suppliers";
            String filePath = "c:\\hiperos\\outbox\\Suppliers_import.xlsx";

            HttpClient httpClient = HttpClientBuilder.create().build();
            HttpContext httpContext = new BasicHttpContext();

            HttpPost httpPost = new HttpPost(url);
            httpPost.setHeader("username""Your_3PM_Username_Here");
            httpPost.setHeader("password""Your_3PM_Password_Here");

            httpPost.setHeader("Connection""close");

            MultipartEntityBuilder builder = MultipartEntityBuilder.create();
            builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);

            final File file = new File(filePath);
            FileBody fb = new FileBody(file, "text/csv");

            builder.addPart("file", fb);

            final HttpEntity entity = builder.build();
            httpPost.setEntity(entity);

            HttpResponse postResponse = httpClient.execute(httpPost, httpContext);

            HttpEntity responseEntity = postResponse.getEntity();
            System.out.println(EntityUtils.toString(responseEntity));
        }
        catch(Exception ex)
        {
            ex.printStackTrace();
        }
    }
}

C#

using System;
using System.Net;

namespace QuickIntegration_Sample
{
    class Program
    {
        static void Main()
        {
            const string uriString = "https://rportal.hiperos.com/QuickIntegration/Suppliers";
            const string fileName = @"c:\\hiperos\\outbox\\Suppliers_import.xlsx";

            // Create a new WebClient instance.
            WebClient client = new WebClient();

            // Add authentication headers to request.
            client.Headers.Add("username""Your_3PM_Username_Here");
            client.Headers.Add("password""Your_3PM_Password_Here");

            // Upload the file to the URI.
            // The 'UploadFile(uriString,fileName)' method implicitly uses HTTP POST method.
            byte[] responseArray = client.UploadFile(uriString, fileName);

            string response = System.Text.Encoding.ASCII.GetString(responseArray);

            // Decode and display the response.
            Console.WriteLine("\nResponse Received.  The contents of the file uploaded are:\n{0}", response);
        }
    }
}