Custom Order Component IDs Based on Hierarchy

A more common scenario where custom order component IDs can be used is when you need additional groupings of order components at the granularity level. For example, three levels of decomposition from Function, System, to Bundle, results in the following component IDs:

  • BillingFunction

  • BillingFunction.BillingSystem

  • BillingFunction.BillingSystem.Bundle

If you had order items in the Bundle order components that were part of different bundles that go to different the billing system, you would need to separate each order item bundle into different bundle order component. A component ID for such a scenario could look like this:

  • For billing system 1: BillingFunction.BillingSystem.Bundle.2/BundleGranularity

  • For billing system 2: BillingFunction.BillingSystem.Bundle.6/BundleGranularity

To create custom component IDs for this scenario, you could use the following order item properties:

  • typeCode: This property specifies if the order line item is an offer, bundle, or product. This element also defines the product hierarchy of the order line items. For example:

    OFFER
       BUNDLE
          PRODUCT
    
  • lineId and parentLineId: These properties specify the hierarchical relationship between the bundle and product order line items. You can create separate component IDs for every order item bundle and associate all product order items with their corresponding bundle component ID. To identify all ancestor order items that may be a bundle, you can use the XQuery ancestors function, as explained later.

For example, the following four order items include two bundles and two associated products. These order items have the following characteristics:

  • Order Item 1 includes:

    • typeCode: BUNDLE

    • lineId: 2

    • parentLineId: 1 (for example, an order item with an OFFER typeCode. This order item is not specified in this example).

    <osm:orderItem 
     xmlns:osm="http://xmlns.oracle.com/communications/ordermanagement/model"
     id="1234">
       <osm:name>FIXED BUNDLE - BUNDLE</osm:name>
    .....
       <osm:properties
        xmlns:im="http://oracle.communications.ordermanagement.unsupported.
        centralom">
          <im:typeCode>BUNDLE</im:typeCode>
          <im:parentLineId>1</im:parentLineId>
          <im:requestedDeliveryDate>2013-06-31T12:00:00</im:requestedDeliveryDate>
          <im:lineItemName>Fixed Bundle</im:lineItemName>
          <im:lineId>2</im:lineId>
          <im:SiteID>5</im:SiteID>
          <im:ServiceActionCode>UPDATE</im:ServiceActionCode>
          <im:productClass>Fixed Bundle Class</im:productClass>
          <im:serviceId>552131313131</im:serviceId>
          <im:productSpec>Service.Fixed</im:productSpec>
          <im:lineItemPayload> [34 lines]
          <im:region>Sao Paulo</im:region>
       <osm:properties>
    </osm:orderItem>
    
  • Order Item 2 includes:

    • typeCode: PRODUCT

    • lineId: 3

    • parentLineId: 2 (This matches the lineID of order item 1 indicating that order item 1 is the parent of order item 2).

    <osm:orderItem 
     xmlns:osm="http://xmlns.oracle.com/communications/ordermanagement/model"
     id="56789">
       <osm:name>FIXED CALLER ID - PRODUCT</osm:name>
    .....
       <osm:properties
        xmlns:im="http://oracle.communications.ordermanagement.unsupported.
        centralom">
          <im:typeCode>PRODUCT</im:typeCode>
          <im:parentLineId>2</im:parentLineId>
          <im:requestedDeliveryDate>2013-06-31T12:00:00</im:requestedDeliveryDate>
          <im:lineItemName>Commercial Fixed Service [Add]</im:lineItemName>
          <im:lineId>5</im:lineId>
          <im:SiteID>7</im:SiteID>
          <im:ServiceActionCode>UPDATE</im:ServiceActionCode>
          <im:productClass>Fixed Bundle Class</im:productClass>
          <im:serviceId>552131313131</im:serviceId>
          <im:productSpec>Service.Fixed</im:productSpec>
          <im:lineItemPayload> [34 lines]
          <im:region>Sao Paulo</im:region>
       <osm:properties>
    </osm:orderItem>
    
  • Order Item 3 includes:

    • typeCode: BUNDLE

    • lineId: 6

    • parentLineId: 1 (This indicates that both order item 1 and order item 3 share the same parent).

    <osm:orderItem 
     xmlns:osm="http://xmlns.oracle.com/communications/ordermanagement/model"
     id="10111213">
       <osm:name>BroadBand BUNDLE - BUNDLE</osm:name>
    .....
       <osm:properties
        xmlns:im="http://oracle.communications.ordermanagement.unsupported.
        centralom">
          <im:typeCode>BUNDLE</im:typeCode>
          <im:parentLineId>1</im:parentLineId>
          <im:requestedDeliveryDate>2013-06-31T12:00:00</im:requestedDeliveryDate>
          <im:lineItemName>Broadband Bundle</im:lineItemName>
          <im:lineId>6</im:lineId>
          <im:SiteID>5</im:SiteID>
          <im:ServiceActionCode>UPDATE</im:ServiceActionCode>
          <im:productClass>Broadband Bundle Class</im:productClass>
          <im:serviceId>552131313131</im:serviceId>
          <im:productSpec>Service.Broadband</im:productSpec>
          <im:lineItemPayload> [34 lines]
          <im:region>Sao Paulo</im:region>
       <osm:properties>
    </osm:orderItem>
    
  • Order Item 4 includes:

    • typeCode: PRODUCT

    • lineId: 7

    • parentLineId: 6 (This matches the lineID of order item 3 indicating that order item 3 is the parent of order item 4).

    <osm:orderItem 
     xmlns:osm="http://xmlns.oracle.com/communications/ordermanagement/model"
     id="14151617">
       <osm:name>BroadBand Service - PRODUCT</osm:name>
    .....
       <osm:properties
        xmlns:im="http://oracle.communications.ordermanagement.unsupported.
        centralom">
          <im:typeCode>PRODUCT</im:typeCode>
          <im:parentLineId>6</im:parentLineId>
          <im:requestedDeliveryDate>2013-06-31T12:00:00</im:requestedDeliveryDate>
          <im:lineItemName>Fixed Bundle</im:lineItemName>
          <im:lineId>7</im:lineId>
          <im:SiteID>5</im:SiteID>
          <im:ServiceActionCode>UPDATE</im:ServiceActionCode>
          <im:productClass>Broadband Bundle Class</im:productClass>
          <im:serviceId>552131313131</im:serviceId>
          <im:productSpec>Service.Broadband</im:productSpec>
          <im:lineItemPayload> [34 lines]
          <im:region>Sao Paulo</im:region>
       <osm:properties>
    </osm:orderItem>
    

The customer order includes two bundles with two products. The hierarchy is:

Fixed Bundle - order item 2
     Fixed Caller ID - order item 5
Broadband Bundle - order item 6
     BroadBand Service - order item 7

To create the separate customized component IDs for the bundle order items 1 and 3, and include all their corresponding children order items you need to:

  • Return a separate component ID for each BUNDLE typeCode. This causes BUNDLE order components to be generated.

  • Ensure that the PRODUCT typeCode for that bundle are included in its parent order item.

To do so, the XQuery uses the ancestors function to find whether the order item has a BUNDLE typeCode or has a BUNDLE typeCode in one of its parent order items. If the order item is a bundle, then a OSM creates a component ID for the bundle. If the order item has a bundle in one of its parent order items, then OSM includes the order item in its parent order item component ID. The following example shows an XQuery that does this.

declare namespace osm="http://xmlns.oracle.com/communications/ordermanagement/model";
declare namespace prop="http://oracle.communications.ordermanagement.unsupported.centralom";
declare namespace osmfn = "java:oracle.communications.ordermanagement.orchestration.generation.OrchestrationXQueryFunctions";
(:    The following part of the XQuery identifies the order line hierarchy definition and retrieve all of the predecessor order line items in the bundle:   :)
let $ancestors := osmfn:ancestors("CustomerOrderItemSpecification","default","http://oracle.communications.ordermanagement.unsupported.centralom")

(:   The following part of the XQuery finds the BUNDLE order item and generates an ID based on the bundle order item lineID:     :)
   return
   if (fn:exists($ancestors[osm:properties/prop:typeCode='BUNDLE']))
      then (
               concat($ancestors[osm:properties/prop:typeCode=('BUNDLE')]
               [1]/osm:properties/prop:lineId/text(),'/BundleGranularity')
           )
      else (
              'ALL_OFFERS_AND_NON_SERVICE_BILLING/BundleGranularity'
)

This XQuery finds the child order line items, finds their parent order line items, and creates a bundle order component for each of the bundle lines. The component IDs are:

  • BillingFunction.BillingSystem.Bundle.2/BundleGranularity

  • BillingFunction.BillingSystem.Bundle.6/BundleGranularity

In another example, there is one offer with two bundles and two products in each bundle. The following table shows the hierarchy of bundles and products. The component IDs use the line IDs of the two bundle items.

Line Number Line Name Line typeCode Parent Line ID Value to Use in Component ID

1

Triple Play

OFFER

-

-

2

Fixed Bundle

BUNDLE

1

2

2.1

Fixed Service

PRODUCT

2

2

2.2

Call Forwarding

PRODUCT

2

2

5

Broadband Bundle

BUNDLE

1

5

5.1

Broadband Service

PRODUCT

5

5

5.2

High-Speed Internet

PRODUCT

5

5