Open APIs

 View Only
  • 1.  TMF622 - recommendation on relationships between OLIs

    TM Forum Member
    Posted Sep 10, 2024 02:00
    Edited by Shashank Inamdar Sep 10, 2024 02:32

    Hello fellow TMFers,

    Looking for some advice on Relationship type to be used in a TMF622 payload.

    Consider the below Catalog model of an Offering making a composite Product avaialble to the market.

    (I am aware of the general industry momentum towards making Offerings composite/bundled while keeping products atomic, but this is not possible every time)

    I am using a flat Order Line Item payload structure, such that each Product (parent and children) are represented as individual OLIs that are at the same level and describing relationships between the parent & child OLI using OrderItemRelationship node.

    (The other alternatives are using OLI hierarchy or using nested Product structure to represent the structure)

    Thus, my TMF622 (simplified) payload looks like below -

     {"productOrderItem": [
        {
          "action": "add",
          "id": "OLI-001",
          "product": {
            "productSpecification":{"name":"BB Package"},
            "productOffering": {"id": "BB1234", "name": "BB Gold Offer"}
          },
          "productOrderItemRelationship": [
            {"id": "OLI-002", "relationshipType": "hasChild"},
            {"id": "OLI-003", "relationshipType": "hasChild"} 
          ]
        },
       {
         "action": "add",
          "id": "OLI-002",
          "product": {
            "productSpecification":{"name":"Router"},
            "productOffering": {"id": "BB1234", "name": "BB Gold Offer"}
          },
          "productOrderItemRelationship": [
            {"id": "OLI-001", "relationshipType": "hasParent"}
          ]
       },
     {"action": "add",
          "id": "OLI-003",
          "product": {
            "productSpecification":{"name":"Support"},
            "productOffering": {"id": "BB1234", "name": "BB Gold Offer"}
          },
          "productOrderItemRelationship": [
            {"id": "OLI-001", "relationshipType": "hasParent"}
          ]
       
     }]}

    In the above example, the parent OLI describes relationships with the children OLIs using "hasChild".

    Is it necessary/mandated by TMF Specs to have the child OLI also describe it's relationship with the parent with "hasParent"?

    Can I not describe only at the parent level and leave it there?

    In a nutshell, why does the relationship has to be described by both the parent and children. Parent says these are my children, children say this is my parent (other than for an extra validation reasons?)

    Thanks

    S



    ------------------------------
    Shashank Inamdar
    ------------------------------



  • 2.  RE: TMF622 - recommendation on relationships between OLIs

    TM Forum Member
    Posted 30 days ago
    Edited by Yurii Yushchak 30 days ago

    Hi Shashank,

    I assume that this relationship is in both entities, in the parent and the child, because it follows the extension patterns described in TMF 630 REST API Design Guidelines Part 2.

    An extension is considered conformant or valid if it does not invalidate the core characteristics of an API and does not contradict the API Design Guidelines.
    Various extension mechanisms are supported:
    • Extending the basic schema of an entity like Product to create a subclass; in that case all the mandatory attributes and relationships of the base schema should be present in the extension.
    • Adding characteristics to define a run time extension
    • Adding relationships



    ------------------------------
    Yurii Yushchak
    System Manager
    Ericsson Inc.
    ------------------------------