createReplenishmentConfig
mutation · in the family Replenishment config
What it does
Create a new replenishment settings — how reorder suggestions are computed for a scope at your organization.
Create a ReplenishmentConfig — one cell of the planning parameter matrix; requires the unrestricted capability.
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Inventory operations — Receiving, counting, transferring and moving stock.
Roles that may call it:
- Owner
- Manager
- Associate Manager
- Warehouse Associate
- An API key whose scope allows
api:createReplenishmentConfig
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
input | NewReplenishmentConfigInput NewReplenishmentConfigInput! | yes | Create-input for a ReplenishmentConfig. |
Returns
ReplenishmentConfig ReplenishmentConfig! — A replenishment config — ONE cell of the multi-axis planning parameter matrix: a set of axes naming a scope (absent = all — the sparse matrix; Location = organizationId XOR logicalFacilityId · Merchandise = categoryId XOR styleId · seasonId · brandId, each singular) + a sparse block of parameters (at least one — the substance rule). Group-scoped like a Brand (parent = the org group). The axes are the cell identity — immutable at birth (re-target = create + doom); parameter values stay editable (nothing clears — removing a parameter = doom + create). the collision rule: an active sibling with the same normalized axis tuple AND an intersecting SET-parameter set refuses CONFLICT/IDENTITY_TAKEN naming the holder + the intersecting parameters (same-tuple disjoint-parameter cells are legal — per-parameter semantics; an inactive cell neither resolves nor collides, so reactivate re-runs the gate). Specificity (the.2 per-parameter resolution): count of set axes, then the locked axis order Location > Merchandise > Season > Brand. A NON-doomed cell blocks its axis targets dooms (LF/Organization/Category/Style/Season/Brand); deactivate stays free.
Example request
mutation ExampleCreateReplenishmentConfig($input: NewReplenishmentConfigInput!) {
createReplenishmentConfig(input: $input) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
organizationId
logicalFacilityId
categoryId
styleId
seasonId
brandId
replenishEnabled
minUnits
maxUnits
daysOfSupplyTarget
safetyStockUnits
reorderMultipleUnits
reviewCadenceDays
abcClassOverride
reserveFloorUnits
transferableExcess
allocationWeight
}
}Variables:
{
"input": {
"caption": "Blue jeans"
}
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"createReplenishmentConfig": {
"id": "01900000-0000-7000-8000-f62d56730000",
"sysId": "RP-EXMP-0000-000F",
"type": "ReplenishmentConfig",
"caption": "Blue jeans",
"status": "active",
"parentId": "01900000-0000-7000-8000-eacdfcfd0000",
"rootId": "01900000-0000-7000-8000-a1295a650000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 0,
"revision": "01900000-0000-7000-8000-53c6eea90000",
"organizationId": "01900000-0000-7000-8000-1971e30a0000",
"logicalFacilityId": "01900000-0000-7000-8000-10c08c590000",
"categoryId": "01900000-0000-7000-8000-afb3e5910000",
"styleId": "01900000-0000-7000-8000-5467ec760000",
"seasonId": "01900000-0000-7000-8000-14f06c780000",
"brandId": "01900000-0000-7000-8000-6d1c7e960000",
"replenishEnabled": true,
"minUnits": "<min units>",
"maxUnits": "<max units>",
"daysOfSupplyTarget": 1,
"safetyStockUnits": "<safety stock units>",
"reorderMultipleUnits": "<reorder multiple units>",
"reviewCadenceDays": 1,
"abcClassOverride": "A",
"reserveFloorUnits": "<reserve floor units>",
"transferableExcess": true,
"allocationWeight": 1
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)CONFLICT/*— The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. (CONFLICT)VALIDATION/VERSION_REQUIRED— The request did not say which app version it came from. Retry: no. (VALIDATION)
Dry run
Add dryRun: true to the request envelope (extensions.at) to rehearse this call: every check runs, the write is rehearsed against the current records and nothing is stored; the answer is the refusal a real call would give, or the record it would create. Every response to a rehearsal carries dryRun: true, so a rehearsed record is never mistaken for a saved one.