"""Constants and attribute definitions for Cisco Commerce Catalog API.
Based on Cisco Commerce Catalog Web Service Implementation Guidelines V17.
See Appendix B of the documentation for full attribute descriptions.
"""
# All available item attributes that can be requested from Get Item Information API
# Reference: Appendix B of Commerce_Catalog_Web_Services_IG.pdf
ITEM_ATTRIBUTES = [
# Ordering & Availability
"MajorLineOrderable", # Whether item can be ordered as a major line
"Configurable", # Whether item is configurable
"Serialized", # Whether item is serialized
"LeadTime", # Lead time for the item
"PriceProtection", # Price protection status
"WebOrderable", # Whether item can be ordered online
"Stockable", # Whether item is stockable
"OEA", # Orderability Environment Availability (CCW, PRE-CCW, CCW-ONLY, BOTH)
"HoldStatus", # Lead time status
"PQDP", # Product Quantity Delivery Preference
"FulfillmentRestriction", # Fulfillment restriction (Yes, No, Block, No Stock)
# Delivery & Licensing
"DeliveryMethod", # Available means to deliver the item
"SmartAccount", # Smart Account requirement (Mandatory, Optional, Blank/Not Enabled)
"SmartLicensingEnabled", # Smart Licensing availability (Yes, No)
"LicenseType", # License type (Term, Perpetual)
# End of Life Milestones
"EoX", # All EoL milestones - returns multiple dates:
# EOLExternalAnnounceDate, EndofSaleDate,
# EndofServiceContractRenewalDate, LastDateofSupport,
# EndofSWAvailability, EndofNewServiceAttachmentDate,
# EndofSWMaintenanceReleases, EndofVulnerabilityOrSecuritySupport
# Software Subscription Attributes
"SWSubscription", # Returns multiple fields:
# SWSubscriptionMinQty, SWSubscriptionMaxQty,
# SWSubscriptionBandUOM, SWSubscriptionMinDuration,
# SWSubscriptionMaxDuration, SWSubscriptionDefaultDuration,
# SWSubscriptionDurationUOM
# Pricing
"ListPrice", # List price of the item
"PriceListShortName", # Price list code
"BaseDiscountCategory", # Base discount category (Core, Market, Compute)
# Product Classification
"ItemType", # Item type (REFURBISHED, CONFIG SUB, PRODUCT LIST>$0,
# ATO MODEL, SPARE, CONFIG SPARE, BUNDLE, INSTALL,
# FEATURE PACK, MAIN)
"ItemClassification", # Type of item (hardware or software)
"ProductType", # Product type classification
"ProductSubGroup", # Product sub group
"ERPFamily", # ERP Family
"ProductMajorFamily", # Major family of product
"ProductMinorFamily", # Minor family of product
"InternalBusinessEntity", # Organizational groupings (Enterprise Routing, Collaboration, etc.)
"UNSPSCCode", # United Nations Standard Products and Services Code
# Service Related
"ServiceIndicator", # Whether item is a service (Yes, No)
"UserSpecifiedStartDate", # Service end-date alignment with existing contract (Yes, No)
"RelatedHardwareProduct", # Hardware product mapped to service SKU
"ServiceProgram", # Name of the service program
"ServiceLevel", # Name of the service level
"ServiceLevelDescription", # Service level description
"ServiceDiscountCategory", # Category for Service Discount (A, B, C, D, S, N/A)
"ServiceDuration", # Service Duration for List Price display
# Physical Specifications
"ProductDimension", # Returns: WidthMeasure, LengthMeasure, HeightMeasure, GrossWeightMeasure
"Weight", # Average weight of hardware product
"FullCartonQty", # Quantity of units in a master carton
"FullPalletQty", # Quantity of units in a full pallet
"MinUnitWeight", # Minimum unit weight (for configurable products)
"MaxUnitWeight", # Maximum unit weight (for configurable products)
# Identifiers
"UPCID", # UPC Code
"PBURL", # Product Bulletin URL
# Export Control (Authorized users only)
"USECCN", # Export Control Classification Number for US
"EUECCN", # Export Control Classification Number for EU
"USHSTariff", # Harmonized Tariff Schedule for US
"EUHSTariff", # Harmonized Tariff Schedule for EU
"USCCATS", # Commodity Classification Automated Tracking System
"CCATSRevisionDate", # CCATS revision date
"ANSSI", # ANSSI security certification
"DangerousGoodUNCode", # Hazardous material codes by UN/IATA
"EncryptionLength", # Bit strength of symmetric encryption algorithms
"EncryptionStatus", # US Gov classification (Restricted, Unrestricted, Mass Market)
# Software Attributes
"SoftwareType", # Type of software (Hybrid, On-Premise, SaaS, System SW)
"SoftwareStack", # Software stack (Platform, Application, Infrastructure)
# Subscription & Tracking
"RecurringOfferFlag", # Whether item is recurring for booking & revenue (Y, N)
"SubscriptionMandatoryAttachFlag", # Mandatory subscriptions flag (Y, N)
"SubscriptionMandatoryAttachMapping", # Mandatory attached subscription items
"IBTrackable", # Install base trackable flag (Y, N)
"ISServiceable", # Serviceable flag (Y, N)
# Warranty
"Warranty", # Warranty item names
# Price Visibility
"ListPriceViewable", # Whether list price is visible in CCW UI (Yes, No)
"NetPriceOnly", # Whether item is net price only (Y, N)
]
# Commonly used attribute groups for convenience
BASIC_ATTRIBUTES = [
"ListPrice",
"PriceListShortName",
"ProductType",
"ERPFamily",
"ItemClassification",
]
PRICING_ATTRIBUTES = [
"ListPrice",
"PriceListShortName",
"BaseDiscountCategory",
"ServiceDiscountCategory",
"ListPriceViewable",
"NetPriceOnly",
]
AVAILABILITY_ATTRIBUTES = [
"MajorLineOrderable",
"WebOrderable",
"Stockable",
"OEA",
"LeadTime",
"HoldStatus",
"FulfillmentRestriction",
]
EOL_ATTRIBUTES = [
"EoX",
]
SERVICE_ATTRIBUTES = [
"ServiceIndicator",
"ServiceProgram",
"ServiceLevel",
"ServiceLevelDescription",
"RelatedHardwareProduct",
"ServiceDiscountCategory",
"ServiceDuration",
]
PHYSICAL_ATTRIBUTES = [
"ProductDimension",
"Weight",
"FullCartonQty",
"FullPalletQty",
"MinUnitWeight",
"MaxUnitWeight",
]
# Price list codes and their descriptions
# Reference: Appendix C of Commerce_Catalog_Web_Services_IG.pdf
PRICE_LISTS = {
"GLUS": {"id": "1109", "description": "Global Price List US Availability", "currency": "USD"},
"GLEMEA": {"id": "1110", "description": "Global Price List EMEA Availability", "currency": "USD"},
"GLEURO": {"id": "1341", "description": "Global EMEA Price List in Euros", "currency": "EUR"},
"GLGB": {"id": "1131", "description": "Global United Kingdom Price List in Pounds Sterling", "currency": "GBP"},
"GLCA": {"id": "1129", "description": "Global Canada Price List in CANADIAN Dollars", "currency": "CAD"},
"GLASIA": {"id": "1441", "description": "Global Asia-Pac Price List in US dollars", "currency": "USD"},
"AUST": {"id": "1027", "description": "Australia Price List in AUDs Ex-Tax", "currency": "AUD"},
"CHINA": {"id": "1220", "description": "CHINA Price List in US Dollars", "currency": "USD"},
"GLCH": {"id": "999999115", "description": "Global Price List China in CNY", "currency": "CNY"},
"GLIN": {"id": "13022", "description": "Global Price List - INDIA", "currency": "USD"},
"GLICON": {"id": "1111", "description": "Global Price List Latin America Availability", "currency": "USD"},
"GLBRL": {"id": "801001111", "description": "Global Brazil Price List in BRL", "currency": "BRL"},
"GLEMKT": {"id": "800030156", "description": "Global Price List Emerging", "currency": "USD"},
"GLKW": {"id": "1300", "description": "Global Korean Price List in Korean Wons", "currency": "KRW"},
"GLRUS": {"id": "800030157", "description": "Global Price List Russia", "currency": "USD"},
"GLRU2": {"id": "999999111", "description": "Global Russia DDP PriceList in USD", "currency": "USD"},
"JPN": {"id": "1004", "description": "JAPAN Price List in US Dollars", "currency": "USD"},
"NH": {"id": "1007", "description": "NIHON Price List in Japanese Yen", "currency": "JPY"},
"NIHONUSD": {"id": "1501", "description": "Nihon Price List in US Dollars", "currency": "USD"},
"S4JY": {"id": "1382", "description": "Summa Four Price List in Japanese Yens", "currency": "JPY"},
"S4US": {"id": "1381", "description": "Summa Four Price List in US Dollars", "currency": "USD"},
}
# Error codes from the API
# Reference: Section 4 of Commerce_Catalog_Web_Services_IG.pdf
ERROR_CODES = {
# Message-level codes
"CC001H": "Success",
"CC002H": "Partial Success - Service cannot provide some requested data",
"CC003H": "Failure - Service cannot provide any requested data",
"CC004H": "Error - Price List is required",
"CC005H": "Error - CCO ID is not entitled to the Price List",
"CC006H": "Error - Requested data exceeds limit of PIDs",
"CC007H": "Error - Mandatory tag or parameter is missing from the request",
"CC008H": "Error - CCO ID is invalid",
"CC009H": "Error - Price List is invalid",
"CC010H": "Error - Item attribute name is invalid",
"CC011H": "Error - Service Program does not exist",
"CC012H": "Error - Service Level does not exist",
"CC017H": "Failure - There are no matching items",
"CC018H": "Failure - More than one search criterion found",
"CC019H": "Error - Sender has no access to the business data for the CCO ID",
"SYS01H": "Failure - Service cannot generate a response. Please retry.",
# Line-level codes
"CC002L": "Error - Item ID or expression is invalid",
"CC003L": "Error - Item is unavailable for pricelist",
"CC004L": "Warning - Duplicate Item",
"CC005L": "Warning - There is no data",
"CC006L": "Error - Item is not available online",
}