CrossupsellCreateInput
Input data for creating a new cross-sell or upsell recommendation.
Contains all necessary information to establish a product recommendation relationship including source products, target products, recommendation type, and optional categorization. Either product-to-product or cluster-to-cluster relationships can be created.
Validation ensures that exactly one source (productIdFrom or clusterIdFrom) and one target (productIdTo or clusterIdTo) are specified.
input CrossupsellCreateInput {
type: CrossupsellType!
subType: String
productIdFrom: Int
productIdTo: Int
clusterIdFrom: Int
clusterIdTo: Int
}
Fields
CrossupsellCreateInput.type
● CrossupsellType!
non-null enum
The type of cross-sell or upsell recommendation relationship to create.
Determines how the recommendation will be presented and used in the commerce experience:
- ACCESSORIES: Complementary products that enhance the main product
- ALTERNATIVES: Substitute products for comparison or when main product unavailable
- OPTIONS: Upgrades, variations, or enhanced versions of the main product
- PARTS: Replacement components, spare parts, or consumables
- RELATED: Products commonly purchased together with the main product
This field is required and must be one of: [accessories, alternatives, options, parts, related]
CrossupsellCreateInput.subType
● String
scalar
Custom subtype classification for more granular categorization within the main recommendation type.
Provides additional context for recommendation logic and presentation. Common examples include:
- For ALTERNATIVES: "CHEAPER_ALTERNATIVE", "PREMIUM_ALTERNATIVE", "SIMILAR_FEATURES"
- For ACCESSORIES: "ESSENTIAL", "OPTIONAL", "PREMIUM_ADDON"
- For OPTIONS: "SIZE_VARIANT", "COLOR_VARIANT", "FEATURE_UPGRADE"
- For PARTS: "REPLACEMENT", "CONSUMABLE", "MAINTENANCE"
This field is optional and has a maximum length of 64 characters.
CrossupsellCreateInput.productIdFrom
● Int
scalar
The source product identifier that triggers this recommendation.
When customers view or add this product to their cart, the recommendation system will suggest the target product. This creates a directional relationship where viewing/purchasing the source product leads to suggesting the target product.
Either productIdFrom or clusterIdFrom must be specified, but not both. Must be a positive integer representing an existing product in the system.
CrossupsellCreateInput.productIdTo
● Int
scalar
The target product identifier that will be recommended.
This is the product that will be suggested to customers when they interact with the source product. The target product should complement, substitute, or enhance the source product based on the recommendation type.
Either productIdTo or clusterIdTo must be specified, but not both. Must be a positive integer representing an existing product in the system.
CrossupsellCreateInput.clusterIdFrom
● Int
scalar
The source product cluster identifier that triggers this recommendation.
When customers view or add any product from this cluster to their cart, the recommendation system will suggest the target product or cluster. This enables scalable recommendations across multiple related products.
Either productIdFrom or clusterIdFrom must be specified, but not both. Must be a positive integer representing an existing product cluster in the system.
CrossupsellCreateInput.clusterIdTo
● Int
scalar
The target product cluster identifier that will be recommended.
This represents a group of related products that will be suggested to customers. When a cluster is recommended, the system can intelligently select the most appropriate product(s) from that cluster based on customer preferences and availability.
Either productIdTo or clusterIdTo must be specified, but not both. Must be a positive integer representing an existing product cluster in the system.
Member Of
crossupsellCreate
mutation