The actual SKU based on the current attribute combination. If no attributes are selected, this will be the same as the product SKU. This value reflects the specific configuration of the product being priced.
var configuredSku = Item.ActualSku;
Additional shipping charge for this specific product variant. This value is added to the base shipping cost and represents any extra shipping fees specific to this item.
var totalShipping = baseShippingCost + Item.AdditionalShippingCharge;
Array of attributes with Key, Value, IsRequired, Prompt, PriceAdjustment, etc.
Array of batch tiers (same as PricingTiers but for batch tier table)
Indicates whether the weight can be set or modified for this item. Some products may have fixed weights that cannot be changed, while others allow weight adjustments based on attributes or custom settings.
if (Item.CanSetWeight) {
// Allow weight adjustments in the UI
}
Index of this item in the other order item array (-1 if not in array)
Alias of OtherOrderItems
Array of category names that this product belongs to. Categories are used for product organization, filtering, and category-specific pricing rules.
if (Item.Categories.includes("Premium")) {
return Item.Price * 1.1; // 10% premium markup
}
Array of customer role system names
Department name of user
Value of the currently used discount code
User email
The height of the item in the configured dimension unit (typically inches or centimeters). This value is used for packaging calculations and dimensional pricing.
var packagingCost = calculatePackagingCost(Item.Width, Item.Height, Item.Length);
Whether this is a batch job
Whether this item is in the other order item array
Whether this is a version of a job
The length of the item in the configured dimension unit (typically inches or centimeters). This value is used for packaging calculations and dimensional pricing.
var packagingCost = calculatePackagingCost(Item.Width, Item.Height, Item.Length);
Number of pages (-1 if not valid)
Number of records (-1 if not valid)
Number of versions
The old price from the product variant, typically used for displaying price comparisons or discounts. This value represents the previous price before any recent price changes.
if (Item.OldPrice > Item.Price) {
var discount = Item.OldPrice - Item.Price;
return "Save $" + discount.toFixed(2);
}
Index of this item in the other order item array (0 if not in array)
Array of other order items using the same custom pricing script
The pack quantity, calculated as the order quantity divided by the product variant's OrderPackQuantity. This represents how many packs are being ordered.
var packPrice = Item.Price * Item.PackQuantity;
The standard product variant price in the base currency. This is the base price before any attribute adjustments, tier pricing, or special pricing is applied.
var basePrice = Item.Price;
var adjustedPrice = basePrice * 1.2; // 20% markup
Price per record (-1 if not valid)
Array of pricing tiers with Price, Quantity, and CustomerRole
The product cost, representing the actual cost to produce or acquire the product. This value is used for margin calculations and profit analysis.
var margin = Item.Price - Item.ProductCost;
var marginPercentage = (margin / Item.Price) * 100;
The name of the product as displayed to customers. This is the human-readable product name used in the user interface and order confirmations.
var displayName = Item.ProductName;
The order quantity for this item. This represents how many units of this product variant are being ordered. Used for quantity-based pricing and tier calculations.
var tier = HelperMethods.FindTier(Item.Quantity, Item.PricingTiers);
The quantity selector mode for this product. This determines how quantity selection is handled in the user interface and affects pricing calculations.
switch (Item.QuantitySelectorMode) {
case 1: // Individual units
return Item.Price * Item.Quantity;
case 2: // Packs
return Item.Price * Item.PackQuantity;
}
The Stock Keeping Unit (SKU) of the product variant. This is the unique identifier for the product variant and is used for inventory management and order processing.
var productIdentifier = Item.Sku;
The special price for the product variant, if applicable. This value is null if no special pricing is currently active. Special pricing typically overrides the standard price for promotional periods.
var finalPrice = Item.SpecialPrice || Item.Price;
The end date for special pricing, if applicable. This value is null if no special pricing is currently active. Used to determine if special pricing should be applied based on current date.
var now = new Date();
if (Item.SpecialPriceEndDate && now <= Item.SpecialPriceEndDate) {
return Item.SpecialPrice;
}
The start date for special pricing, if applicable. This value is null if no special pricing is currently active. Used to determine if special pricing should be applied based on current date.
var now = new Date();
if (Item.SpecialPriceStartDate && now >= Item.SpecialPriceStartDate) {
return Item.SpecialPrice;
}
Array of versions with JobId, CustomName, and Quantity
Sum of all quantities of all versions
The weight of the item in the configured weight unit (typically grams or ounces). This value is used for shipping calculations and weight-based pricing.
var shippingCost = calculateShippingByWeight(Item.Weight);
The width of the item in the configured dimension unit (typically inches or centimeters). This value is used for packaging calculations and dimensional pricing.
var packagingCost = calculatePackagingCost(Item.Width, Item.Height, Item.Length);
Generated using TypeDoc
The main item object available in pricing scripts. Represents the product variant being priced and provides access to all product information, attributes, pricing data, and methods for file handling and attribute management.
This object is the primary interface for accessing product data and performing pricing calculations in pricing scripts.