HI Alex, Ludovic,
I tend to disagree with the statement that product.status should be mandatory for a POST. In principle a POST will use the input values and default values to create a product in inventory. An implementation should therefore have sensible default values instead of making all fields mandatory. Some values could even be enforced by business logic.
Example default values:
product.status='created'; /* forcing the start of lifecycle; should only be overwritten by migration processes */
product.orderDate=now() /* forcing the orderDate to be the date of the POST: should only be overwritten by migration processes */
product.isBundle=false /* sensible default value; if it is a bundle POST should override default */
product.isCustomerVisible=true /* sensible default value; if it is to be hidden on invoices, POST should override default */
product.startDate= null /* set to now() when status is changed to 'active' */
product.terminationDate= null /* set to now() when status is changed to 'terminated' */
Regards
------------------------------
Koen Peeters
Ciminko Luxembourg
------------------------------
Original Message:
Sent: May 10, 2021 03:36
From: Ludovic Robert
Subject: The TMF 637 status is mandatory in the POST?
Hello Alex,
First, thanks for the catch - we need to fix this inconsistency in the documentation.
For me, this product state should me mandatory in the POST request. A product in the inventory must always have a state. A product creation in the inventory is not a delivery process by itself, but it reflects a process done in order delivery (nominal case) or an inventory correction by an administrator (exception case). In both cases POST submitter must specify the state.
I took a look on Service Inventory API for consistency: state is mandatory in the POST.
Hope it helps,
Ludovic
------------------------------
Ludovic Robert
Orange
My answer are my own & don't represent necessarily my company or the TMF
Original Message:
Sent: May 06, 2021 05:28
From: alex sunny
Subject: The TMF 637 status is mandatory in the POST?
Hello,
I have been going through TMF 637 documentations and playing with Postman collections for POST /product. I noticed "status" is marked as mandatory in swagger and sample Post request are not working unless we specify "status" for create product. But at the same time "status" field is non mandatory in conformance document TMF637B.
Can anyone clarify if this is mandatory or not?If it is mandatory, which seems odd, how will a client determine "status" at the time of product creation in inventory?
thanks
alexsunny
------------------------------
alex sunny
TO BE VERIFIED
------------------------------