Catalog Views Import - API Connector - Overview

This documentation describes the process of importing Catalog Views via the API Connector. It covers the available fields, business rules, and possible errors.

⚙️ Introduction

This job allows the creation and update of Catalog Views via API import using the API Connector.

You can:

  • Create new Catalog Views.
  • Update existing Catalog Views.
  • Define filtering rules (MAD Rules) to control product assortment visibility per Account.
  • Replace the entire set of rules applied to a Catalog View.

The import payload can contain one or multiple Catalog Views.


📂 Accepted Payload Structure

The accepted payload format specifies the structure required for successful data transmission through the API Connector. Ensuring the payload adheres to this format guarantees efficient integration of Catalog Views within DJUST platform.

Payload structure example
{
 "elements":[
    {
       "catalogExternalId":"1234",
       "catalogName":"VIP",
       "catalogDescription":"Lorem Ipsum",
       "allowedAssortmentExternalId":["2345","3456"],
       "accountExternalId":["7890","5678"],
       "excludedAssortmentExternalId":["54321","65432"],
       "delete":false,
       "active":true,
       "emptyRules":false
    }
 ],
 "paging":{
    "pageNumber":0,
    "pageSize":0,
    "totalPages":0,
    "totalRecords":0
 }
}
💡

The JSON must always be a list of objects


📋 Fields

FieldDefinitionRequiredEditableDefault value
catalogExternalIdUnique external identifier for the Catalog View
catalogNameDisplay name of the Catalog View
catalogDescriptionOptional description of the Catalog ViewEmpty string
allowedAssortmentExternalIdList of Assortment External IDs to include in the view
excludedAssortmentExternalIdList of Assortment External IDs to explicitly exclude from the view
accountExternalIdList of Account External IDs that will see this Catalog View
deleteSet to true to delete the Catalog View identified by catalogExternalIdfalse
activeIndicates whether the Catalog View is activetrue
emptyRulesIf true, clears existing rules associated with the viewfalse

❌ Error Handling

Failure behavior

  • The import job will be marked as COMPLETED_WITH_ERRORS if any invalid element is detected.
  • Each Catalog View is processed independently. If an error occurs on a specific element, other Catalog Views in the same payload are still processed.
  • An error report will be generated with functional error codes.

Potential Functional Errors

Error code

Description

When it occurs

F-E-001

Missing required field

  • catalogExternalId is missing
  • catalogName is missing

F-E-033

Referenced entity does not exist

  • accountExternalId does not exist
  • excludedAssortmentExternalId does not exist
  • allowedAssortmentExternalId does not exist

🧠 Key Business Rules & Notes

  • If catalogExternalId matches an existing Catalog View, the view will be updated with the provided values.

  • If catalogExternalId does not exist, a new view will be created.

  • If delete is set to true, the Catalog View will be deleted, and all other fields will be ignored.

  • If emptyRules is set to true, any existing rules with the view will be cleared. It does not remove the association between the Catalog View and the linked Accounts.

  • The active flag controls the visibility of the view. If set to false, the view will not be applied, but it remains available for update or reactivation.

  • Catalog Views can be linked to multiple accounts via accountExternalId. This controls which buyers can access them.

📌

Best Practices

✔️ Follow data formatting guidelines for optimal import results