Open APIs

 View Only
  • 1.  TMF663: Best practice to match a location/place

    TM Forum Member
    Posted Nov 02, 2022 11:01
    Hi!

    I've just started to get into TMF and especially into TMF663 (shopping cart) with the goal to define how TMF663 is used as API to create a shopping cart in our platform. During this process, one information where I'm not quite sure how to best use it / match it to our platform is regarding the "place" (cartItem.product.place).

    From our current understanding, we would use the "place" information to define the (retail) store where the according item would be purchased. Still, I'm struggling currently a bit on how to best use it... - However, we should be able to somehow find the according place/store in our platform, so we can create our internal shopping cart accordingly. - Currently, I can only come up with the following options:

    Option 1:
    Pass "id" of the "place" and assume the ID refers to our internal id (database ID in our platform). In order to retrieve our internal id an (open) proprietary API of our platform could be used.
    "place:" {
        "id":658,
        "href": "<our proprietary API/locations/658>"
    }​


    Option 2:
    Consider the "place" to refer to a GeographicSite (TMF674) and expect information like (still not sure if even the definition would be correct):
    "place": {
        "externalIdentifier": [
            {"id":"LOC01"}
        ],
        "role":"Store",
        "@referredType": "GeographicSite"
    }​

    In our platform we have a "code" (as we call it internally) which we've used so far when integrating with other systems to retrieve/send location information. This is normally a textual identifier (logically unique for all (non-deleted) locations) that is supposed to be known by other systems as well.
    For the "externalIdentifier[].id" I would expect this "code" (as we call it internally) to be used. - I have seen that "GeographicSite" (at least in v5) has a "code" - but I'm not quite sure what is the idea in the API exactly. - The examples have values like "Warehouse","House" (even for different sites the same "code").

    Any ideas / suggestions on this?

    Thanks for your help!

    Kind regards,
    David

    ------------------------------
    David Preindl
    ------------------------------


  • 2.  RE: TMF663: Best practice to match a location/place

    TM Forum Member
    Posted 30 days ago
    Hi
    The place attribute in Product (contained within CartItem) is an array, so it can represent a list of places relevant to the Product. The data type for place is RelatedPlaceRefOrValue, which allows these things:
    • A role that the place is playing, e.g. shipping address, installation address, or in your case the address from which the item is to be collected/purchased. You'd need to provide a semantically relevant value for this role.
    • The place by value, or a reference to the place, where a place can be a geographical address, a location (coordinates) or a site (which could indeed represent a retail premise). In your business flows you'll have to decide whether the place is passed by reference or value, and what the semantic meanings of the ID and externalID of the place are.
    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.
    ------------------------------