Skip to main content

saveCopilotSupplierRule

Requires permission catalog:copilot:chat.

Saves the import rules for one supplier: a column map, a price rule and a minimum order quantity rule. There is one rule per supplier, and saving again for the same supplier replaces it. Supplier names that differ only in case or punctuation are the same supplier. Limited to 20 requests a minute. Needs the catalog copilot feature on the plan and permission to chat with the copilot.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation SaveCopilotSupplierRule($input: SaveCopilotSupplierRuleInput!) {
saveCopilotSupplierRule(input: $input) {
supplierName
columnMap
moqRule
priceRule
savedAt
savedBy
}
}

Variables:

{
"input": {
"supplierName": "string"
}
}

Response:

{
"data": {
"saveCopilotSupplierRule": {
"supplierName": "string",
"columnMap": {},
"moqRule": "string",
"priceRule": "string",
"savedAt": "string",
"savedBy": "string"
}
}
}
saveCopilotSupplierRule(
input: SaveCopilotSupplierRuleInput!
): SupplierRuleType!

Arguments​

saveCopilotSupplierRule.input ● SaveCopilotSupplierRuleInput! non-null input​

The supplier name and the optional column map, price rule and minimum order quantity rule.

Type​

SupplierRuleType object​

A saved way of reading one supplier's price list.