Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Products service - Get products by producttags #820

Open
mvdgraaff opened this issue Jan 11, 2025 · 3 comments · May be fixed by #864
Open

Products service - Get products by producttags #820

mvdgraaff opened this issue Jan 11, 2025 · 3 comments · May be fixed by #864
Assignees
Labels
improvements New feature or request
Milestone

Comments

@mvdgraaff
Copy link
Collaborator

mvdgraaff commented Jan 11, 2025

Name: Products additional get products by productTags
Owner: Eurail
Description:
Currently there are only two ways of getting products via the osdm api specification, 1) get all products, 2) get product by Id.

In most cases the product id is something like an SKU or another type of unique number. That is used in a system to identify a product instance. These Id's can change when a product is replaced by another product. An Id /SKU stays with the lifecycle of a certain product.

The product api elements in OSDM describe tags as:
"product tags associated with the product that can be used to search for offers. This can be omitted outside of the product master data service"

For ordering passes the customers identifies product tags as attributes in the offer request like travel duration, travel days etc. The values should be used to filter the product catalog. By using these tags 0 or more products can be used in the offer or multiple offers are created.

The current OSDM specification doesn't support search by product tags. This limits the possibilities of selling passes therefore Eurail proposes that:
The product api is extended by a Filter by product tags get method.

Input message:

{
    "productSearchCriteria": {
        "id": "",
        "type": "",
        "code": "",
        "owner": "",
        "flexibility": "",
        "travelClass": "",
        "serviceClass": "",
        "fulfillmentOptions": [
            {
                "type": "string",
                "media": "string"
            }
        ],
        "productTags": [
            "string"
        ]
    }
}

Criteria:

  • The new POST products-search returns 0..n products.
  • Product tags are be default unnamed element therefore dynamic which results in a open filter api.

Alternative

  • Get product by Id should return an array of products, in most cases it will only contain one product. When a combination of product tags is used as an id it can return n-products.
  • Misusage of get product by id, this causes problems because n-products can be found.

Business value: medium (For Eurail and Pass retailers)
Business outcome: It will become easier to retrieve products for the offer service based product tags therefore more versatile.

@jspetrak jspetrak moved this to To do in OSDM Specification Jan 22, 2025
@jspetrak jspetrak added this to the 3.5.0 milestone Jan 22, 2025
@jspetrak jspetrak added the improvements New feature or request label Jan 22, 2025
@jspetrak jspetrak moved this from To do to In progress in OSDM Specification Jan 31, 2025
@CGantert345 CGantert345 linked a pull request Feb 6, 2025 that will close this issue
@schlpbch
Copy link
Collaborator

schlpbch commented Feb 7, 2025

Next steps:

  • Product needs to be extended with some optional attributes
  • Add some more ProductsTags Enum for clarification.

@schlpbch
Copy link
Collaborator

schlpbch commented Feb 7, 2025

Next steps

  • Add some optional attributes to product
  • Add some descriptive enums to ProductTag
  • Add a notion to group product tags --> GET product-tags

@ralfbayer-db
Copy link
Collaborator

ralfbayer-db commented Feb 7, 2025

We should also have an endpoint to retrieve the possible product tag values:

GET /productTags returns a list of tags with the group they belong to and a description:

{ 
  "tagList": [ 
    { 
      "tagName": "REDUCTION_25", 
      "tagGroup": "REDUCTION_LEVEL", 
       "tagDescription": "25% Reduction" 
    }, 
    { 
      "tagName": "REDUCTION_50", 
      "tagGroup": "REDUCTION_LEVEL", 
       "tagDescription": "50% Reduction" 
    }    
   ],
  "groupList": [
   {
      "tagGroupName": "REDUCTION_LEVEL",
      "tagGroupDescription": "Percentage of reduction granted"
   }
   ]
} 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvements New feature or request
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

4 participants