Uploading Hierarchies

The MLAC service offers a REST endpoint for uploading entire hierarchies using a CSV file. Uploading data requires an OIEP for a single hierarchy with the required output format to publish the data.

To upload hierarchies, perform all steps in the following sections:

  1. Prerequisites
  2. Configure a Hierarchy OIEP
  3. Publish Hierarchy Data to MLAC

Important: Repeat all of the steps in this topic for each hierarchy being uploaded.

Prerequisites

Complete the following setup to successfully configure the OIEP and publish data.

  1. In the 'workarea' directory shared between the application servers, edit the sharedconfig.properties file. Add or modify the case-sensitive RestDirectDeliveryURL property to identify the hierarchy-specific URL for the MLAC service hierarchy upload resource. The URL is used to supply values for the REST Direct Delivery Method in the OIEP. The URL uses the format: https://app.stibosystems.com/ds/mlac/v1/hierarchies/[hierarchyId]

Note: The hierarchy identifier ([hierarchyId]) is also used when uploading classified products.

RestDirectDeliveryURL=1=https://app.stibosystems.com/ds/mlac/v1/hierarchies/primary

In this example, the hierarchy ID of 'primary' has replaced the placeholder text '[hierarchyId]'.

  1. Restart the server to implement the properties file changes.
  1. Confirm your username and a password to get a token.
  2. Use the service token endpoint (https://app.stibosystems.com/ds/mlac/v1/token) to obtain a token. See the Swagger UI available at https://app.stibosystems.com/ds/mlac/v1/. By default, tokens are valid for one (1) month.

Make note of the token for use in configuring the REST Direct Delivery Method Headers.

Configure a Hierarchy OIEP

Use the following steps to configure the necessary OIEP. For more general information on OIEPs, see the Outbound Integration Endpoints topic in the Data Exchange documentation here.

  1. Create an event-based OIEP (as defined in the Creating an Event-Based Outbound Integration Endpoint topic of the Data Exchange documentation here) with the following settings in the wizard:
  1. Open the OIEP's Event Triggering Definitions tab, open the Triggering Object Types flipper, and click the Add Object Type link to add the hierarchy object types. Leave the other settings as their default values.

  1. On the Configuration tab, open the Configuration flipper and set the 'Schedule' parameter to Never and click the OK button.

  1. On the Configuration tab, open the Output Templates flipper, and set the following for the Object-Eventtype column:

  1. On the Output Templates flipper set the following for the Format column:

  1. On the Delivery Method flipper, click the Edit Delivery link to open the 'Edit Delivery Configuration' dialog.

Note: To validate the configuration, instead of setting the REST Direct method, first use the 'Copy to directory' or 'Email' delivery method and check the generated CSV file. See the OIEP Delivery Methods topic (here) in the Data Exchange documentation for details.

  1. Repeat this setup for each hierarchy that will hold the newly classified products.

Publish Hierarchy Data to MLAC

Publishing hierarchy data to the MLAC service requires invoking an OIEP with unread events. For details about these steps, see the Running an Outbound Integration Endpoint topic (here) and the Event-Based OIEP Forward, Rewind, Purge, and Republish topic (here), both in the Data Exchange documentation.

Important: Before publishing data to the MLAC service, it can be useful to first validate the configuration by using either the 'Copy to directory' or 'Email' delivery method and checking the generated CSV file. See the OIEP Delivery Methods topic (here) in the Data Exchange documentation for details.

Use the following steps to publish hierarchy data to the MLAC service.

  1. On System Setup, right-click the configured OIEP and click the Enable Integration Endpoint option.
  2. On the OIEP's Configuration tab, open the Event Queue Configuration flipper and set the Queue Status parameter to Read Events.
  3. Click the Republish button to display the Republish dialog.

  1. On the Republish dialog:

  1. Verify that the republish background process finishes successfully.
  2. Right-click the OIEP and click the Invoke option to manually publish the hierarchy data.
  3. Right-click the OIEP and click the Disable Integration Endpoint option.
  4. On the OIEP's Configuration tab, open the Event Queue Configuration flipper and set the Queue Status parameter to Discard Events.