Open APIs

 View Only
  • 1.  TMF620 and productOfferingPriceRelationship

    TM Forum Member
    Posted Feb 15, 2022 04:41
    Edited by Matthieu Hattab Feb 16, 2022 15:48
    Hi,

    I'd like to clarify how productOfferingPriceRelationship sub-resource can be used with the current API data model. My concerns is the lack of sequencing in the non-composite price alterations stored in productOfferingPriceRelationship


    Example:
    I have these 4 records fetched by the API in the productOfferingPrice resource:
    +---------+----------+-------+----------------+------------+--------------------------------------------+
    | Id/Name | isBundle | Price | priceType      | percentage | description                                |
    +---------+----------+-------+----------------+------------+--------------------------------------------+
    | POP1    | N        | 200   | Price Override |            |                                            |
    +---------+----------+-------+----------------+------------+--------------------------------------------+
    | POP2    | N        |       | % Discount     | 10         |                                            |
    +---------+----------+-------+----------------+------------+--------------------------------------------+
    | POP3    | N        | 180   | Price Override |            |                                            |
    +---------+----------+-------+----------------+------------+--------------------------------------------+
    | POP4    | N        | 10    | Markup Amount  |            | Note: this pop is associated to Place 4080 |
    +---------+----------+-------+----------------+------------+--------------------------------------------+

    I have related POP2, 3 and 4 to POP1 in productOfferingPriceRelationship in order to alter the price value of POP1.

    +-------------+---------+------------------+------+
    | (Parent Id) | Id/Name | relationshipType | role |
    +-------------+---------+------------------+------+
    | POP1        | POP2    | % Discount       | ?    |
    +-------------+---------+------------------+------+
    | POP1        | POP3    | Price Override   | ?    |
    +-------------+---------+------------------+------+
    | POP1        | POP4    | Markup Amount    | ?    |
    +-------------+---------+------------------+------+

    A Pricing Engine Component that consumes API 620 to get POPs and their relationships needs a sequence to apply alterations in the intended order.

    Any thoughts?

    Matthieu

    ------------------------------
    Matthieu Hattab
    Altibox AS
    ------------------------------


  • 2.  RE: TMF620 and productOfferingPriceRelationship

    TM Forum Member
    Posted Feb 16, 2022 03:01
    Edited by Ludovic Robert Feb 16, 2022 03:01
    Hi Matthieu

    Yes agreed with your observations. I think we have some information missing to feed the pricing component. In some implementation in my company we extended the model to have this alteration priority, to have group of tariff rules (with rules inside and compute them one after the other till one is true to exit the tariff rule), to have a grammar to define POP affectation, etc...

    I'm just wondering was is the intend of the ProductOfferingPrice. PricingLogicAlgorithm - perhaps this logic is 'behind' this?

    Probably @Jonathan Goldberg could give us his view on this :)

    Ludovic


    ------------------------------
    Ludovic Robert
    Orange
    My answer are my own & don't represent necessarily my company or the TMF
    ------------------------------



  • 3.  RE: TMF620 and productOfferingPriceRelationship

    TM Forum Member
    Posted Feb 16, 2022 04:32
    Hi Matthieu,

    I agree with you that the POP resource lacks the priority (sequence) attribute in the context of POPRelationship.

    However, there is a priority attribute in the context of the ProductOffering resource. In your example, POP1 would be exposed as POP entity, and POP2, 3 & 4 would be exposed as POPAlterations. POPAlteration entity has a priority attribute that allows you to support alteration sequencing. See fig. below.


    I wonder if, in general, you can determine a priority (sequence) among ProductOfferingPrices regardless of the Product Offering context. Perhaps, product offering "A" may apply the same alterations in a different sequence than product offering "B" and in that case, ProductOffering is the crucial part of information that determines the discount application sequnece.


    ------------------------------
    Bostjan Keber
    Marand Software
    ------------------------------



  • 4.  RE: TMF620 and productOfferingPriceRelationship

    TM Forum Member
    Posted Feb 16, 2022 16:05
    Edited by Matthieu Hattab Feb 16, 2022 16:19
    Hello Bostjan,

    You made me realize that, in my first post, it was a coincidence that I use "price alterations". I didn't mean POPalteration.

    I see in the SID that a POP alteration is just another form of POP and there are a handful alterations sub-classes:
    • discount
    • replacement
    • tax
    I'd like to see how POPalterations  are modelled in the ProductOfferingPrice resource model
    Mabye POPalterations  are "divided" into different ProductOfferingPrice sub-resources, such as:
    • TaxItem = Tax alteration
    • productOfferingPriceRelationship = discount alteration or replacement alteration
      (hint: API doc, page 44 says "for example a price alteration such as allowance or discount.")

    Which leaves:
    bundledProductOfferingPriceRelationship = to be used to show component POP (where ProductOfferingPrice represents the composite POP)

    It's not very clear, because SID also says:
    A component may represent:
    1. the amount charged (ProdOfferPriceCharge) such as a monthly internet connection fee. 
    2. Or, a component may represent an alteration (ProdOfferPriceAlteration) ​


  • 5.  RE: TMF620 and productOfferingPriceRelationship

    TM Forum Member
    Posted Feb 18, 2022 02:48
    Hi Matthieu,

    like you said, POP alteration is just another form of POP. POP can be subclassed into charges and alterations (1st level) and then charges can be further subclassed into onetime, recurring,..., and alterations can be subclassed into discounts (monetary & percentage) and allowances (2nd level). I believe the POP.priceType attribute is used for this distinction (see: TMF620, p.45: A category that describes the price, such as recurring, discount, allowance, penalty, and so forth.).

    In our TMF620 implementation,  the ProductOffering resource returns charges as POPs and alterations as POPAlterations (under POPs). This allows you to define exactly what allowance is applicable to what price and in what order. We use POPAlteration.Priority attribute to set the order of alterations. 
    The ProductOfferingPrice resource returns both, charges and alterations, as POPs. POPRelationship is used to associate charges with alterations. The API specification doesn't support alteration order/precedence in this case.


    ​​​

    ------------------------------
    Bostjan Keber
    Marand Software
    ------------------------------



  • 6.  RE: TMF620 and productOfferingPriceRelationship

    TM Forum Member
    Posted Mar 16, 2023 12:20

    Hi,

    Could the 620 swagger be simplified by removing POPAlteration (object) and POPCharge (object) entirely from it by adding priority (field) and applicationDuration (field) to ProductOfferingPriceRefOrValue (object) (and to ProductOfferingPrice)  as the first step?

    And subsequently replace and remove entire ProductOfferingPriceRefOrValue (object) with  ProductOfferingPriceRef?
    ProductOfferingPriceRefOrValue and ProductOfferingPrice both have priceType which can indicate subclasses of POPAlteration and POPCharge, isn't it?
    Br,


    ------------------------------
    Alen Ruvic
    SES Astra S.A.
    ------------------------------



  • 7.  RE: TMF620 and productOfferingPriceRelationship

    TM Forum Member
    Posted Mar 17, 2023 05:08

    Hi Alen,

    interestingly enough, our internal implementation is similar to your suggestion. Product offering has a list of prices (abstract) and subclassing then determines whether it's a charge or alteration (and further the subtype of charge and alteration). This implementation required an additional structure indicating that an alteration impacts a charge (i.e. a discount is applied to a charge). TMF620 ProductOfferingPriceRefOrValue solves this problem by returning candidate alterations directly under charges.

    You probably noticed that ProductOfferingPriceRefOrValue structure (returned through GET Product Offering) is different from ProductOfferingPrice resource. ProductOfferingPrice doesn't include POPAlterations, but has a more generic structure ProductOfferingPriceRelationship. We used POPRelationship to return impacts between alterations and charges.

    Below is an example of GET Offering response. There is a ProductOfferingPriceRefOrValue representing a monthly fee with 2 candidate POPAlterations (50% off and 66,67% off monthly fee). The 66,67% discount is present on the product offering which instructs the order/quote module to apply the discount in the price calculation step.

    {
      "id": "11716346003",
      "href": "http://plm-ws-multi-dev-env.k8s-svc.marand.si/plm-tmf620-marand-plmstage-sb3/tmf-ws/tmf-api/productCatalogManagement/v4/productOffering/11716346003",
      "@type": "MarandProductOffering",
      "productOfferingPrice": [
        {
          "id": "11716350001-70",
          "href": "http://plm-ws-multi-dev-env.k8s-svc.marand.si/plm-tmf620-marand-plmstage-sb3/tmf-ws/tmf-api/productCatalogManagement/v4/productOfferingPrice/11716350001-70?version=11716351001&productOfferingId=11716346003",
          "lastUpdate": "2023-02-16T09:44:00.711+01:00",
          "lifecycleStatus": "Active",
          "name": "NAROČNINA za Testna ponudba GAL-794-1",
          "priceType": "RecurringCharge",
          "recurringChargePeriod": "month",
          "recurringChargePeriodLength": 1,
          "version": "11716351001",
          "constraint": [
            {
              "id": "70",
              "name": "(TNAR) Naročnina"
            }
          ],
          "price": {
            "taxCategory": "DDV",
            "taxRate": 22,
            "dutyFreeAmount": {
              "unit": "EUR",
              "value": 19.95
            },
            "@type": "MarandProductPriceValue",
            "isRegulated": false,
            "isDiscountable": false
          },
          "priceAlteration": [
            {
              "id": "11716350002-315450001",
              "href": "http://plm-ws-multi-dev-env.k8s-svc.marand.si/plm-tmf620-marand-plmstage-sb3/tmf-ws/tmf-api/productCatalogManagement/v4/productOfferingPrice/11716350002-315450001?version=11716350002",
              "description": "Popust - na naročnino",
              "name": "PONAVLJAJOČI SE POPUST za Testni popust za GAL-794-1",
              "priceType": "RecurringDiscount",
              "priority": 1117000,
              "recurringChargePeriod": "month",
              "price": {
                "percentage": 50,
                "@type": "ProductPriceValue"
              },
              "unitOfMeasure": {
                "amount": 1
              },
              "validFor": {
                "endDateTime": "3000-01-01T00:00:00+01:00",
                "startDateTime": "2023-02-16T00:00:00+01:00"
              }
            },
            {
              "id": "11716350003-315450001",
              "href": "http://plm-ws-multi-dev-env.k8s-svc.marand.si/plm-tmf620-marand-plmstage-sb3/tmf-ws/tmf-api/productCatalogManagement/v4/productOfferingPrice/11716350003-315450001?version=11716350003",
              "description": "Ponavljajoči se popust - Testna ponudba GAL-794-3 (akcija)",
              "name": "PONAVLJAJOČI SE POPUST za Testna ponudba GAL-794-3 (akcija)",
              "priceType": "RecurringDiscount",
              "priority": 1117100,
              "recurringChargePeriod": "month",
              "applicationDuration": {
                "amount": 12,
                "units": "month"
              },
              "price": {
                "percentage": 66.67,
                "@type": "ProductPriceValue"
              },
              "unitOfMeasure": {
                "amount": 1
              },
              "validFor": {
                "endDateTime": "3000-01-01T00:00:00+01:00",
                "startDateTime": "2023-02-16T00:00:00+01:00"
              }
            }
          ],
          "unitOfMeasure": {
            "amount": 1,
            "units": "month"
          },
          "validFor": {
            "endDateTime": "3000-01-01T00:00:00+01:00",
            "startDateTime": "2023-02-16T00:00:00+01:00"
          },
          "@type": "MarandProductOfferingPriceRefOrValue",
          "isParametricPrice": false,
          "isPriceAlteration": false,
          "isGrossAmount": false
        },
        {
          "id": "11716350003-315450001",
          "href": "http://plm-ws-multi-dev-env.k8s-svc.marand.si/plm-tmf620-marand-plmstage-sb3/tmf-ws/tmf-api/productCatalogManagement/v4/productOfferingPrice/11716350003-315450001?version=11716355002&productOfferingId=11716346003",
          "lastUpdate": "2023-02-16T09:51:10.585+01:00",
          "lifecycleStatus": "Active",
          "name": "PONAVLJAJOČI SE POPUST za Testna ponudba GAL-794-3 (akcija)",
          "priceType": "RecurringDiscount",
          "version": "11716355002",
          "constraint": [
            {
              "id": "315450001",
              "name": "(1015) Ponavljajoči se popust"
            }
          ],
          "price": {
            "percentage": 66.67,
            "@type": "ProductPriceValue"
          },
          "priceAlteration": [],
          "validFor": {
            "endDateTime": "3000-01-01T00:00:00+01:00",
            "startDateTime": "2023-02-16T00:00:00+01:00"
          },
          "@type": "MarandProductOfferingPriceRefOrValue",
          "isParametricPrice": false,
          "isPriceAlteration": true,
          "isGrossAmount": false
        }
      ]
    }

    If I obtain the product offering price resource representing the monthly subscription fee, I get the following response:

    {
    "id": "11716350001-70",
    "href": "http://plm-ws-multi-dev-env.k8s-svc.marand.si/plm-tmf620-marand-plmstage-sb3/tmf-ws/tmf-api/productCatalogManagement/v4/productOfferingPrice/11716350001-70?version=11716351001&productOfferingId=11716346003",
    "isBundle": false,
    "lastUpdate": "2023-02-16T09:44:00.711+01:00",
    "lifecycleStatus": "Active",
    "name": "Naročnina - Testna ponudba GAL-794-1",
    "priceType": "RecurringCharge",
    "recurringChargePeriodLength": 1,
    "recurringChargePeriodType": "month",
    "version": "11716351001",
    "constraint": [
    {
    "id": "70",
    "name": "(TNAR) Naročnina"
    }
    ],
    "place": [],
    "popRelationship": [
    {
    "id": "11716350002-1015",
    "name": "Ponavljajoči se popust",
    "relationshipType": "DISC",
    "role": "PONAVLJAJOČI SE POPUST za Testni popust za GAL-794-1"
    },
    {
    "id": "11716350003-1015",
    "name": "Ponavljajoči se popust",
    "relationshipType": "DISC",
    "role": "PONAVLJAJOČI SE POPUST za Testna ponudba GAL-794-3 (akcija)"
    }
    ],
    "price": {
    "unit": "EUR",
    "value": 19.95
    },
    "pricingLogicAlgorithm": [],
    "tax": [
    {
    "taxCategory": "ODS-3510",
    "taxRate": 22
    }
    ],
    "unitOfMeasure": {
    "amount": 1,
    "units": "month"
    },
    "validFor": {
    "endDateTime": "3000-01-01T00:00:00+01:00",
    "startDateTime": "2023-02-16T00:00:00+01:00"
    },
    "@type": "MarandProductOfferingPrice",
    "taxIncluded": false
    }

    As you can see, discounts (alterations) are returned as POPRelationships. 

    Never mind our extensions. :)

    Hope this helps!

    Bostjan



    ------------------------------
    Bostjan Keber
    Marand, software ltd
    ------------------------------



  • 8.  RE: TMF620 and productOfferingPriceRelationship

    TM Forum Member
    Posted Mar 17, 2023 06:32

    Hi Bostjan,

    Thanks a lot, this really helps to visualize the complexity.

    Br,



    ------------------------------
    Alen Ruvic
    SES Astra S.A.
    ------------------------------