Open APIs

 View Only
  • 1.  Difference between RelatedParty and PartyRole schemas

    TM Forum Member
    Posted 4 days ago
    Edited by Akin Pillot 3 days ago

    Dear all,

    I am trying to understand the difference between RelatedParty and PartyRole, especially regarding the 'role' attribute that is present in both schemas.

    Context: I am creating a new schema and I want to have a link to a (role, party) pair. I am unsure which approach to use. It seems to me that I have two options:

    1. Have an attribute of type "PartyRole", where I specify the "role" (string) and the "engagedParty" (ref: EngagedParty/PartyRef.schema.json), which in turn is just a sub-type of "EntityRef".
    2. Have an attribute of type "RelatedParty", which is directly a sub-type of "EntityRef", but adds an additional "role" (string) attribute.

    When instantiating objects, they would have a similar, but slightly different structure depending on which approach I chose:

    • myAttribute1 (PartyRole)
      • role: "myRole" (string)
      • engagedParty (PartyRef)
        • id: 0001
        • href: "http://url-to-party"
        • name: "John Smith"
        • @referredType: EngagedParty/Individual.schema.json
    • myAttribute2 (RelatedParty)
      • role: "myRole" (string)
      • id: 0001
      • href: "http://url-to-party"
      • name: "John Smith"
      • @referredType: EngagedParty/Individual.schema.json

    My questions are: Is the thinking above correct and there are indeed two approaches to represent a link to a (role, party) pair? Which approach is typically used and in which scenarios?

    Thank you for your support!
    Lovely greetings from Zurich,

    Claude



    ------------------------------
    Claude Barthels
    Swisscom (Schweiz) AG
    ------------------------------



  • 2.  RE: Difference between RelatedParty and PartyRole schemas

    TM Forum Member
    Posted 3 days ago
    When to Use RelatedParty Role:
    • Use when you need to describe a party's involvement in a specific context without managing the role itself.
    • Example: In a ServiceOrder API (TMF641), you might link a party as a "Customer" or "Contact" to the order without needing to manage the role's lifecycle.
    When to Use PartyRole:
    • Use when the role itself needs to be managed, tracked, or reused across multiple contexts.
    • Example: In a customer management system, you might create a PartyRole for "Customer" to track its status, validity, and associated party details over time.
    Interrelation:
    • A RelatedParty can reference a PartyRole instead of a party directly. For example, in a ServiceOrder, the relatedParty might point to a PartyRole (via its id and @referredType set to PartyRole) to indicate that the role itself is relevant to the order.
    • This allows flexibility: you can link to either a party (e.g., an individual) or a managed role (e.g., a PartyRole entity).


    ------------------------------
    Koen Peeters
    OryxGateway FZ LLC
    ------------------------------