Use a Service Mapping to Integrate Order Management with Procurement

Use a service mapping to send data from Oracle Order Management to Oracle Procurement.

Assume you need to send details about a sales order to Procurement so Procurement can process a purchase request.

  • Indicate to Procurement that we negotiated the price with the supplier when we created the sales order. We will use the NegotiatedByPreparerFlag attribute to send the indication as a Boolean value.

  • Text note that we can send to the buyer. It includes details about the negotiated price, such as any discounts we provided, and why we provided them. We will use an extensible flexfield to capture these details.

  • The price that we negotiated with the customer when we created the sales order. We will use the Price attribute to capture the negotiated price.

  • You will set up the FLinePackShip_EFF_Custom flexfield on the fulfillment line.

  • The ShippingCost_Custom attribute will capture the negotiated price.

Summary of the Set Up

  1. Opt into the feature.
  2. Add your entity to the integration service mapping.

  3. Map your entity to the source.

  4. Map entities to the service.

  5. Create an integration algorithm.

  6. Test your set up.

Opt into the Feature

  1. Go to the Setup and Maintenance work area, select the Order Management offering, then click Change Feature Opt In.
  2. In the row that has Order Management in the Name column, click the pencil.
  3. In the row that has Enable Custom Payloads for Downstream Integration in the Name column, click the pencil.
  4. In the dialog that displays, add a check mark to the Drop Ship option, then click Save and Close > Done.

Add Your Entity to the Integration Service Mapping

  1. Make sure you have the privileges that you need to administer Order Management.

  2. Create a sand box. For details, see Create a Sandbox So You Can Edit Service Mappings.

  3. Go to the Pricing Administration work area.

  4. Click Tasks, and then, under Order Management Configuration, click Manage Service Mappings.

  5. Open the FulfillmentIntegration service mapping for editing.

    For details, see Use a Service Mapping to Integrate Order Management with Other Oracle Applications.

  6. Add an entity. On the Entities tab, click Actions > Add Row, set the values, then click Save.

    Attribute

    Value

    Entity

    FLinePackShip_EFF_Custom

    You must include the _Custom suffix to any entity that you add.

    Description

    Entity for an extensible flexfield that stores details on the fulfillment line. It describes the price we negotiated.

  7. Add attributes. In the Details area, click Actions > Add Row to add each attribute.

    Attribute

    Type

    FullfillLineId_Custom

    Long

    ShippingCost_Custom

    Double

    As an option, you can also add the Price, NegotiatedByPreparerFlag, and NoteToBuyer attributes, but they aren't required. These attributes come predefined on the purchase request line.

    For each attribute that you add.

    • Leave the Alternate Key attribute empty.

    • Make sure the Allow Null attribute contains a check mark.

    • Add a check mark to the Primary Key attribute only for FullfillLineId_Custom. Leave it empty for all others.

  8. On the Entities tab, in the Entity column, click PurchaseRequestLine.

  9. In the Detail area, verify that the list contains the Price attribute.

Map Your Entity to the Source

  1. Click Sources.

  2. In the Source column, click PurchaseRequestSource.

  3. In the PurchaseRequestSource Details area, click View > Columns, then display columns.

    • Joined Entity

    • Joined Entity Attribute

  4. Click Actions > Add Row, set the values, then click Save.

    Attribute

    Value

    Entity

    FLinePackShip_EFF_Custom

    Its the entity you added earlier in this procedure.

    Type

    View Object

    View Object

    FulfillLineEffBPackShipInstructionprivateVO

    Query Type

    Unique Identifier

    Query Attribute

    FulfillLineId

  5. Click Save, set the values, then click Save again.

    Attribute

    Value

    Joined Entity

    FulfillLine

    Joined Entity Attribute

    FulfillLineId

  6. In the FLinePackShip_EFF_Custom Details area, add new attributes, then click Save.

    Attribute

    View Object Attribute

    FulfillLineId_Custom

    FulfillLineId

    ShippingCost_Custom

    _ShippingCost

  7. Map attributes to the PurchaseRequestLine entity.

    • In the PurchaseRequestSource Details area, in the Entity column, click PurchaseRequestLine.

    • In the PurchaseRequestLine Details area, add attributes, then click Save.

      Attribute

      View Object Attribute

      Expression

      NegotiatedByPreparerFlag

      Empty

      true

      NoteToBuyer

      Empty

      Empty

      Price

      Empty

      Empty

      FulfillLineId FulfillLineId Empty

Map Entities to the Service

  1. Click Services.

  2. In the row that contains PurchaseRequestService in the Service column, set the values, then click Save.

    Attribute

    Value

    Implementation Type_Custom

    Algorithm

    Implementation_Custom

    Integrate Order Management with Procurement Custom

    This is the name of the algorithm you created earlier in this procedure.

  3. In the Details area, add entities, then click Save.

    • FLinePackShip_EFF_Custom

    • Header_Custom

    • FulfillLine_Custom

    • PurchaseRequestConfig_Custom

    • PurchaseRequestHeader_Custom

    • PurchaseRequestLine_Custom

    Note

    • If you use this service to send your own custom attributes from Order Management to Procurement, then you must also add your custom entities.

    • Click Actions > Add Row to add each entity.

      You must include the _Custom suffix.

    • Make sure the Read attribute and Write attribute contain a check mark for each entity.

    • Leave the other attributes empty.

  4. Add attributes to the FLinePackShip_EFF_Custom entity.

    Attribute

    Alias

    FulfillLineId_Custom

    FulfillLineId

    ShippingCost_Custom

    Leave Empty

  5. Add attributes to the PurchaseRequestLine entity.

    • FulfillLineId

    • NegotiatedByPreparerFlag

    • NoteToBuyer

    • Price

    When you add attributes to these entities.

    • Make sure the Read attribute and Write attribute contain a check mark for each attribute.

    • Leave the other attributes empty.

Create an Integration Algorithm

Create an integration algorithm that you can use to call Procurement.

  1. Click Tasks, and then, under Order Management Configuration, click Manage Algorithms.

  2. On the Create Algorithm page, set the values, then click Save.

    Attribute

    Value

    Name

    Integrate Order Management with Procurement Custom

    Description

    Use this integration algorithm to send our custom data from Oracle Order Management to Oracle Procurement.

  3. Click Add Step > Conditional Action.

  4. In the Data Sets area, add two data sets.

    Name

    Variable Path

    Primary

    Cardinality

    Data Set Join

    PRCLine

    PVar.PurchaseRequestLine

    Contains a check mark

    Leave empty

    Leave empty

    PRCLineEff

    PVar.FLineEff

    Doesn't contain a check mark

    Zero or one

    [FulfillLineId:{PRCLine.FulfillLineId}]

    FlineEFF is an alias for the FLinePackShip_EFF_Custom entity. You must use the FlineEFF alias or the entire FLinePackShip_EFF_Custom entity name.

  5. In the Execute Condition area, click Add Condition > Default Action.

  6. In the Edit Actions window, then enter this code.

    PRCLine.Price = PRCLineEff!= null? PRCLineEff.ShippingCost_Custom: null
    

    As an option, add code that maps an attribute you add to the entity for your extensible flexfield in the service mapping, or that you code as a string. For example:

    PRCLine.NoteToBuyer = "We negotiated price with the supplier"

  7. Click Save.

  8. Test and publish. For details see Set Up an Integration Algorithm.

Test Your Set Up

Assume you're on a call with a preferred, long-term supplier who orders a quantity of 10, A54888 desktop computers. To beat your competitor's price, you agree to provide a 20% discount on the order line. As part of the deal, you convince your supplier to add 4 printers to the order.

  1. Create a sales order in Order Management.

  2. Add an order line, then set the attribute on it.

    Attribute

    Value

    Your Price

    Enter the negotiated price.

  3. Submit the sales order.

  4. Examine the details in Procurement.