Open APIs

Expand all | Collapse all

How to express changes to a product using TMF622

  • 1.  How to express changes to a product using TMF622

    TM Forum Member
    Posted Jul 02, 2021 09:01
    This is a variation on the old programming "null vs not present" issue.

    If I have a product with characteristics:
    colour : red
    speed : medium
    size : large

    and I want to change the speed from "medium" to "fast", then we would express this using TMF622(assuming characteristics not extended schema) as an productOrderitem like this
    {"action" : "modify",
     "product" : {"characteristic" : [{"name" : "speed"
                                                             "value" : "fast"}]}}

    My question: does TMF622 expect all the other characteristics and product details to be included? Or would it be reasonable to interpret omission as no change?
    My assumption/constraint would be that the order management system has access to product inventory if needed.

    Is this defined anywhere, or is it down to implementation-specific policy?

    ------------------------------
    Alasdair MacLeod
    BT Group plc
    ------------------------------


  • 2.  RE: How to express changes to a product using TMF622

    TM Forum Member
    Posted Jul 04, 2021 01:36
    Hi Alasdair
    What you are seeking is the ability to PATCH a product - JSON-Patch style (i.e. operation/path/value). But of course you can't PATCH a product, you need an order, so the question is how to express that within the order. Same is true for Service or Resource, of course.

    I don't think that we have defined the behavior here in TMF622 and similar APIs. But maybe @Ludovic Robert, @Kamal Maghsoudlou, @Johanne Mayer have more concrete thoughts on this.

    P.S. See Carlos Portela's post on a related issue here.

    ​​​

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
    ------------------------------



  • 3.  RE: How to express changes to a product using TMF622

    Posted Jul 05, 2021 08:19
    Ideally, Omission should mean "no change".
    Because when the change Quote / Change order was being configured, the Cart Item Action Type is associated to the changes.
    And it is not necessary that all items need to have an action type associated.

    Regards,

    ------------------------------
    Sri Jagadish Baddukonda
    CSGI
    ------------------------------



  • 4.  RE: How to express changes to a product using TMF622

    TM Forum Member
    Posted Jul 09, 2021 14:18
    Edited by Alasdair MacLeod Jul 09, 2021 14:21
    Jag,

    yes - see my other reply, you can use "Omission == no change" for the core of the problem, it breaks down with the various arrays.
    (edit) - brain caught up with my typing - maybe I am over-thinking, see (edited) reply to Jonathon.



    ------------------------------
    Alasdair MacLeod
    BT Group plc
    ------------------------------



  • 5.  RE: How to express changes to a product using TMF622

    TM Forum Member
    Posted Jul 09, 2021 14:13
    Edited by Alasdair MacLeod Jul 09, 2021 14:19
    Jonathon,

    Yes, a change order. Provide and Delete are easy (relatively speaking), change is the tricky one.

    Carlos Portela's thread sums up the issue.
    A "make the world like this approach" is easy to encode but can result in large payloads and possibly overlapping orders with ambiguous outcomes.
    A "send deltas" approach is much more precise and explicit about the intent of the order and allows parallel orders on related products.
    But the schema doesn't really support it for all changes.

    The issue with "send deltas" is the schema doesn't fully support it.
    We are ok for characteristics and single-valued fields - null can be used to signify delete (and that is rare in my experience anyway).
    We are ok (mostly) for relations - so long as we don't need Carlos' example of deleting a relation without deleting the ends. In most cases the relation behaviour is implicit.

    The gap is for the various references stored in arrays - how to encode delete in those cases? I think there the only thing is to add an action.
    But maybe I am over-thinking this, maybe the answer is we just treat the whole array a value like the other fields and encode removing a entry with an array sans that entry. I am guessing that in most cases it won't be that large. I think I need to try some real world examples.

    has this been discussed anywhere? I am guessing the Carlos' thread is it?

    ------------------------------
    Alasdair MacLeod
    BT Group plc
    ------------------------------