Classifications

Assign custom classifications to clients via CSV.


Assign multiple custom classifications (portfolio segmentation and commercial segmentation) to clients.

Dependency: Requires loading Customers first.

Endpoint

POST /full-csv-integration/upload-classifications

  • Form Field: classificationsFile

Behavior

  • Replaces per type: When uploading classifications for a client, that client’s previous classifications of the types present in the file are removed and replaced with the new ones. Types absent from the file are left untouched — a file holding only PORTFOLIO_SEGMENTATION rows will not disturb the client’s COMMERCIAL_SEGMENTATION labels. Send all of a client’s classifications for a given type together.
  • Auto-creates: If a classification name doesn’t exist in the system, it is created automatically.
  • Multiple per type: A client can have multiple classifications of the same type (multiple rows with the same erp_customer_id and classification_type).
  • Rows referencing a client that does not exist: they are dropped while the file is processed and this is not reflected in the response, which had already confirmed the upload. If no client in the file exists, nothing is processed.
  • Repeated identical rows (same client, type and name) are loaded only once.

Required Fields

FieldTypeDescriptionValidations
erp_customer_idStringCustomer ID in ERPCannot be empty. Must exist in Customers — see above
classification_typeStringClassification typePORTFOLIO_SEGMENTATION or COMMERCIAL_SEGMENTATION, matched case-insensitively
classification_nameStringClassification nameCannot be empty

Classification Types

ValueUI Name
PORTFOLIO_SEGMENTATIONPortfolio Segmentation
COMMERCIAL_SEGMENTATIONCommercial Segmentation

CSV Example

erp_customer_id,classification_type,classification_name
CUST001,PORTFOLIO_SEGMENTATION,Retail
CUST001,PORTFOLIO_SEGMENTATION,VIP
CUST001,COMMERCIAL_SEGMENTATION,Colombia
CUST002,COMMERCIAL_SEGMENTATION,Enterprise
CUST002,PORTFOLIO_SEGMENTATION,Wholesale

In this example:

  • CUST001 will have two portfolio segmentations (“Retail” and “VIP”) and one commercial segmentation (“Colombia”).
  • CUST002 will have one portfolio segmentation (“Wholesale”) and one commercial segmentation (“Enterprise”).