Open APIs

 View Only
  • 1.  Amend Product/Service/Resource Order

    TM Forum Member
    Posted Jul 21, 2021 05:18
    The TMF API documentation for Product/Service/Resource order recommend using the 'PATCH' operation to amend an order. This pattern works very well if the amend order is a synchronous operation.

    However if the amend operation is long running wherein the system processing the order needs time to assess the amend, execute/reject the amend is the recommended option 
    1) Implement a Task resource similar to the CancelServiceOrder Task resource that encapsulates the amend request. This has the advantage of having a distinct resource to capture any Amend specific information
    2) Implement the 'PATCH' operation as an async operation using the Monitor pattern

    What are the pros/cons of the two approaches? 


    ------------------------------
    Lancy Mendonca
    ------------------------------


  • 2.  RE: Amend Product/Service/Resource Order

    TM Forum Member
    Posted Jul 21, 2021 10:21
    In my view, we should have task resources for Amend PO/SO/RO, for the same reasons as we have tasks for cancel. Apart from anything else there might be financial considerations to the Amend, which could be returned in an initial response to POST of this task resource, at least for product order amendment.

    ------------------------------
    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: Amend Product/Service/Resource Order

    TM Forum Member
    Posted Jul 22, 2021 01:51
    I agree with Jonathan. In-flight Revisions or Amendments can drive very complex compensation plans in an ongoing order and therefore needs to be treated with respect :). In my opinion, there is a clear pattern here that is established by the implementation of Cancel use case. Any complex operation on an ongoing Order should be driven via Task Resource Pattern described in TMF630 REST API Guidelines Part 1 which is defined as follows

    Task Resource Pattern 


    This section describes the use of Task resources to expose complex operations that are not easily or not decomposable to CRUD Entity based operations. 

    Apart from Cancel and Amend, other Order operations that qualifies for this pattern are Abort Order, Suspend/Resume an ongoing Order (different from Suspend/Resume of Service) etc.

    ------------------------------
    Kinshuk Kulshreshtha
    Oracle Corporation
    ------------------------------



  • 4.  RE: Amend Product/Service/Resource Order

    TM Forum Member
    Posted Jul 22, 2021 10:28
    Many thanks Kinshuk for confirming that we are proceeding in the right direction

    ------------------------------
    Lancy Mendonca
    ------------------------------



  • 5.  RE: Amend Product/Service/Resource Order

    TM Forum Member
    Posted Mar 11, 2022 08:50
    Just being curious, is it still the plan within the TMF Open API working group to treat amend (product|service|resource) orders as task resources (instead of a PATCH /productOrder)?

    Anticipating this (according to the similar use case of a CancelProductOrder task resource in TMF622 v19) the 2nd question is how to mark the changed parts of the revised order in such a task resource:
    1. One could send the complete order in the new version to the provider (and hence leave it to the provider to find out what has been changed).
    2. Or the consumer sends only the changed parts of the order.
    ad b:
    This is fairly easy for attributes on top level (like requestedCompletionDate), so a POST /amendProductOrder would look like
    {
      "productOrder": {
        "id": "4711",
        "href": "/some/url/and/version/productOrder/4711",
        "name": "myOrder"
      },
      "reason": "some reason",
      "requestedCompletionDate": "2022-03-11T15:00:00.000Z" // some postponed date
    }
    but it will become somewhat tricky if some attribute somewhere deep in a productOrderItem has changed e.g. replacing some product by another product or changing a product characteristic. --> how to tell the provider the exact "path" within the order tree,  e.g. in which productOrderItem which part is to be changed?

    Kind regards
    Thomas

    ------------------------------
    Thomas Dupré
    Deutsche Telekom AG
    ------------------------------



  • 6.  RE: Amend Product/Service/Resource Order

    TM Forum Member
    Posted Mar 13, 2022 08:28
    Hi Thomas

    We definitely want to introduce task resource for amendment, for the reasons explained earlier in this thread, it's just a question of timing and capacity.

    Regarding your question about the semantics of the nature of the amendment, it's a more general concern. You could say the same for a regular change order; should the order have just the delta (i.e. what needs to be changed from the current inventory), or rather the full picture.
    Seemingly, this could be achieved by sending the full structure of order and its order item hierarchy, but only with essential attributes populated, i.e. those that allow the navigation and those that represent the change.
    @Ludovic Robert what do you think?
    Hope it helps.​

    ------------------------------
    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.
    ------------------------------



  • 7.  RE: Amend Product/Service/Resource Order

    TM Forum Member
    Posted Mar 14, 2022 08:17

    Hi Jonathan, Robert,

    not sure whether the problem is really the same for usual PATCHes, because in this case it would be possible to address the to be patched entity directly in the path itself, e.g.

    PATCH /productOrder/4711/orderItem/2

                   {
                                  quantity=2

                   }
    If - in the task resource case - one sends the full order structure but only those parts which describe the navigation to the changed parts (and the changed parts itself, of course) then the problem occurs how to mark e.g. deleted parts. I guess one would have to send complete arrays if e.g. one element of this array was canceled.

    Looking forward to a suggestion how to deal with this problem of order amendments.

    BR Thomas



    ------------------------------
    Thomas Dupré
    Deutsche Telekom AG
    ------------------------------



  • 8.  RE: Amend Product/Service/Resource Order

    Posted Mar 21, 2022 16:11
    I think I'll end up implementing long-running POSTs/PUTs/PATCHes with 202 Accepted responses and either custom JSON body with a href to a task or simply Location header

    ------------------------------
    Viktor Aleksandrov
    OJSC "VimpelCom"
    ------------------------------