Open APIs

 View Only
  • 1.  Dynamic data type.

    Posted Aug 13, 2023 03:26

    Hello All, 
    We are about to design an API that define a product like this:
    {
      "product_id" : 48,
      "name": "DataBundles",
      "sub_products": [
        {
          "tech_name": "100MB",
          "commercial" : "daily",
          "benefits": {
            "validity": 1,
            "onnet_min": 300,
            "onnet_sms": 300,
            "renewable": 0
          }
        }
      ],
      "eligibility": {
        "template_id": 1,
        "sub_products" : [
          {
            "name": "100MB",
            "rules": {
              "eligible_sc_list": [1, 2, 3],
              "eligible_sc_range": ["1300-1399"]
            }
          }
         ]
      }
    }

    1. As you can see the Product has Sub products, and each sub product has (benefits) which is JSON object.
    - is it possible to have  value to be JSON Object?


    2. each sub product has eligibility rules to check, may be a List or a range.
    -Is the array value or range supported by TMF APIs?
     
    3.  what if I need to create a new type of attribute, or I want to extend an exist attribute, can I do that?

    4. what is the expected values for the (valueType) field?  
    "productCharacteristic": [
      {
        "name": "string",
        "valueType": "string",
        "value": "string",
        "@baseType": "string",
        "@schemaLocation": "string",
        "@type": "string"
      }
    ]

    Thanks in advance.



    ------------------------------
    Waleed AbuQalben
    TO BE VERIFIED
    ------------------------------


  • 2.  RE: Dynamic data type.

    TM Forum Member
    Posted Aug 15, 2023 07:21

    Hi Waleed

    It seems to me that you are describing a catalog-level ProductSpecification, rather than an inventory-level Product. I advise you to look at TMF620 the Open API for Product Catalog Management. The benefit would probably be a Promotion, that is described in the TMF671 API. While Eligibility is not modeled directly, but is exposed by TMF679 ProductOfferingQualification.

    I think that we are missing an end-to-end example in Open API documentation that would show example payloads for commerce flows. But even without these, you can see examples in each of the API documents.

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



  • 3.  RE: Dynamic data type.

    TM Forum Member
    Posted Aug 16, 2023 04:52

    from a catalogue driven business rules such as eligibility, you can use use "policy" introduced in TMF620 V5.
    With policy entity, you would define business rules in a typical BRMS and TMF620 simply needs to reference such rule using the policy entity.

    You can extend TMF620 but it's not recommended as the data model for defining business rule quickly gets complicated (you have business rules examples like eligiblity in GB922 - Product using the policy entity).

    TMF is also developing a policy API (TMF723), which could fit your needs.



    ------------------------------
    Kind regards,

    Matthieu Hattab
    Lyse Platform
    ------------------------------



  • 4.  RE: Dynamic data type.

    Posted Aug 16, 2023 07:14

    @Matthieu Hattab
    Thank you Matthieu for you help, 
    What do you mean by BRMS ?
    Where can I find the eligiblity in GB922 - Product using the policy entity?



    ------------------------------
    Waleed AbuQalben
    TO BE VERIFIED
    ------------------------------



  • 5.  RE: Dynamic data type.

    TM Forum Member
    Posted Aug 16, 2023 10:35

    Hi,

    If you look up BRMS in your web search engine, does it return anything? you might try another one. I found this: BRMS
    Else try "Business Rule Management System", but BRMS should work too. Drools is a famous BRMS.

    GB922 - product has some example of policies, but the policy ABE is descrived in GB922 - common.

    PS: TMF don't use much the term "eligibility", they prefer the term "qualification" as described in API TMF679 which is TMF commerce API that will give a list of product offers with a qualification status. "Policy" is a more generic and abstract term. But keep in mind that policy can only be associated to a product offer (or spec or price) in TMF620 V5



    ------------------------------
    Kind regards,

    Matthieu Hattab
    Lyse Platform
    ------------------------------



  • 6.  RE: Dynamic data type.

    Posted Aug 17, 2023 02:40

    Thanks for you help, Matthieu.



    ------------------------------
    Waleed AbuQalben
    TO BE VERIFIED
    ------------------------------



  • 7.  RE: Dynamic data type.

    Posted Aug 16, 2023 07:08

    Thank you Jonathan, it helps a lot.



    ------------------------------
    Waleed AbuQalben
    TO BE VERIFIED
    ------------------------------