CommodityTag
Introduction
CommodityTag is a junction entity that enables tagging of commodities with custom labels for categorization, filtering, and organization. This many-to-many relationship allows multiple tags to be assigned to a single commodity and the same tag to be used across multiple commodities.
Entity Structure
Properties
| Property Name | Type | Required | Description |
|---|---|---|---|
| CommodityTagId | int | Yes | Primary key |
| CommodityId | int | Yes | Foreign key to Commodity |
| TagId | int | Yes | Foreign key to Tag |
| Created | DateTime | Yes | Creation timestamp |
| CreatedBy | string | Yes | User who created the record |
| LastModified | DateTime | Yes | Last modification timestamp |
| LastModifiedBy | string | Yes | User who last modified |
Relationships
| Relationship | Type | Description |
|---|---|---|
| Commodity | Commodity | Parent commodity |
| Tag | Tag | Associated tag |
YAML Configuration
Tags are typically managed through Commodity methods:
# Create commodity with tags
- task: Commodity/Create@1
name: createCommodity
inputs:
organizationId: ${organizationId}
commodity:
description: "Electronics - Laptops"
pieces: 10
tags:
- "fragile"
- "high-value"
- "electronics"
Usage
This junction entity is managed automatically when tags are assigned to commodities. Tags enable powerful filtering and reporting capabilities across commodity inventory.
Related Topics
- Commodity Entity - Parent commodity entity
- Tag Entity - Tag definitions
- OrderTag Entity - Similar junction pattern for orders