As part of implementing PAG-1353 we propose an addition to the In Season Catalog Customer Choice HTTP API that will permit the creation of Store Planning Management (SPM) overrides.
Things that the final implementation must permit:
- Create an SPM override-value for a SKU + location combo
- Create an SPM override-value for a CC + location combo
Adam and Jim began adding SPM override capabilities to the Catalog Service. The following example demonstrates how a user would create a a single SPM override associated with a customer choice w/id f9a45623-f427-4405-a6c7-efc7f9ffe776
:
Request:
HTTP POST
/allocation/in-season/allocated-customer-choices/ti-overrides
{
"id": "f9a45623-f427-4405-a6c7-efc7f9ffe776",
"ccOverrides": [
{
"locationId": "01d13476-793b-4220-8a57-00425d6b9af6",
"overrideValue": 24.0,
"overrideFactor": null,
"expirationDate": "2017-06-15",
"effectiveDate": "2017-01-01"
}
]
}
Response:
HTTP 200 OK "TI overrides successfully saved"
Thoughts on this design:
- It is not immediately apparent (to me) how this design would be extended to support SKU + location-level overrides
overrideFactor
can be applied by clients for purposes of effecting a newoverrideValue
- as such, it can be removed from the APIeffectiveDate
can be removed from the API ifoverrideFactor
is removed from the API- It is not clear to me if this design permits clients to remove SPM overrides from locations after they've been created (the PDM states that they expect a planner to nullify an override by setting its expiry date to sometime in the past)
- Unsure if this is a goal: It is not immediately apparent to me how this design could be extended to admit New Store overrides
This proposal addresses items #1
, #2
, #3
and #4
from above - but admits only SPM overrides (does not address #5
):
Request:
HTTP POST
/allocation/in-season/allocated-customer-choices/ti-overrides
{
"level_identifier_type": "CUSTOMER_CHOICE_ID",
"level_identifier_value": "f9a45623-f427-4405-a6c7-efc7f9ffe776",
"location_id": "01d13476-793b-4220-8a57-00425d6b9af6",
"expiry_date": "2016-06-15",
"value": 25.6
}
Response:
HTTP 204 No Content
Request:
HTTP POST
/allocation/in-season/allocated-customer-choices/ti-overrides
{
"level_identifier_type": "SKU_NBR",
"level_identifier_value": "1895510210000",
"location_id": "01d13476-793b-4220-8a57-00425d6b9af6",
"expiry_date": "2016-06-15",
"value": 15
}
Response:
HTTP 204 No Content
Notes:
- "Create SPM" is an idempotent operation; previous override matching location and customer choice id is replaced (note: overrides cannot be deleted, only replaced)
- SKU and CC-level overrides are visible in the In Season Catalog Customer Choice JSON (implementation: TBD)
- Overrides do not have identity (they are subordinate to/embedded within some other HTTP "resource")
- URL handles creation of SPM overrides only (you'll note that there's no way to specify a
version
or that the override relates to a new-location instead of location)
This proposal addresses items #1
, #2
, #3
, #4
, and #5
from above:
Request:
HTTP POST
/allocation/in-season/allocated-customer-choices/ti-overrides
{
"version": "STORE_PLANNING_MANAGEMENT",
"level_identifier_type": "CUSTOMER_CHOICE_ID",
"level_identifier_value": "f9a45623-f427-4405-a6c7-efc7f9ffe776",
"location_identifier_type": "LOCATION_ID",
"location_identifier_value": "01d13476-793b-4220-8a57-00425d6b9af6",
"expiry_date": "2016-06-15",
"value": 25.6
}
Response:
HTTP 204 No Content
Request:
HTTP POST
/allocation/in-season/allocated-customer-choices/ti-overrides
{
"version": "NEW_STORE",
"level_identifier_type": "SKU_NBR",
"level_identifier_value": "1895510210000",
"location_identifier_type": "NEW_LOCATION_ID",
"location_identifier_value": "fdbb9d86-34a8-47d2-b498-b4b5dbac82cc",
"expiry_date": "2016-06-15",
"value": 25.6
}
Response:
HTTP 204 No Content
Notes:
- Permits associating the override with either a new-location or a location (
NEW_LOCATION_ID
orLOCATION_ID
) - Permits different override "verions":
NEW_STORE
andSTORE_PLANNING_MANAGEMENT
All makes sense, thank you! No further questions.