Integrate Your Own Header Attributes Between Order Management and Accounts Receivable

In this example, you use an extensible flexfield on the order header in Order Management to capture the primary salesperson.

You then send that value through the ResourceSalesPersonId attribute on an interface line to Accounts Receivable so receivables can display it on an invoice.

Here's how it works.

, you use an extensible flexfield on the order header in Order Management to capture the primary salesperson,

Note

  1. You create an extensible flexfield in the Setup and Maintenance work area.

  2. The Order Entry Specialist uses your extensible flexfield to set the Primary Salesperson on the order header in the Order Management work area.

  3. You use the Pricing Administration work area to create a service mapping. The mapping uses the view object and the view attribute from the flexfield to map it to Accounts Receivable.

  4. You use the Pricing Administration work area to create an integration algorithm that tells Order Management to include the salesperson from the flexfield when it sends the payload to Accounts Receivable.

  5. Your accounts receivable manager uses the Billing work area to open the invoice for the sales order and view the salesperson in the Salesperson attribute.

Summary of the Setup

  1. Prepare your setup.

  2. Create extensible flexfield.

  3. Identify your view object.

  4. Edit service mapping.

  5. Modify integration algorithm.

  6. Test your set up.

This topic uses example values. You might need different values, depending on your business requirements.

Prepare Your Setup

  1. Enable the Invoice option in the Enable Custom Payloads for Downstream Integration feature.

    For details, see Get Started with Integrating Order Management with Other Oracle Applications.

  2. Create a sand box, and activate the Service Mappings tool and the Flexfields tool in the sand box.

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

Create Extensible Flexfield

Create the extensible flexfield that your Order Entry Specialist will use to set the primary salesperson on the order header.

  1. In the Setup and Maintenance work area, go to the task.

    • Offering: Order Management

    • Functional Area: Orders

    • Task: Manage Order Extensible Flexfields

  2. On the Manage Order Extensible Flexfields page, search for the value.

    Attribute

    Value

    Name

    Header Information

    This is a predefined extensible flexfield that you can use on the order header.

  3. In the search results, click Actions > Edit.

  4. Create the context.

    • On the Edit Extensible Flexfield page, click Manage Contexts.

    • On the Manage Contexts page, click Action > Create.

    • On the Create Context page, set the values, then click Save and Close.

      Attribute

      Value

      Display Name

      Primary Salesperson

      Code

      Primary Salesperson

      API Name

      primarySalesperson

      Enabled

      Enabled.

      Behavior

      Single Row

    • In the Context Usages area, click Actions > Create, then set the values.

      Attribute

      Value

      Name

      Additional Header Information

    • Click Save.

    • In the Context Sensitive Segments area, click Actions > Create.

    • On the Create Segment page, set values, then click Save and Close.

      Attribute

      Value

      Name

      Primary Salesperson

      Code

      Primary Salesperson

      API Name

      primarySalesperson

      Enabled

      Enabled.

      Data Type

      Character

      Table Column

      Pick one that's available.

      Value Set

      30 Characters

      Prompt

      Primary Salesperson

      Display Type

      List of Values

    • Click Save and Close on the current page and subsequent pages until you're on the Edit Extensible Flexfield page.

    • In the Category area, click the row that has Additional Header Information in the Display Name attribute.

    • In the Additional Header Information Details area, on the Associated Context tab, click Actions > Select and Add.

    • Add the Primary Salesperson context.

    • On the Edit Extensible Flexfield page, click Save and Close.

    • On the Manage Order Extensible Flexfields page, select the line in the search results that contains Header Information in the Name attribute, then click Deploy Flexfield.

    • In the Confirmation dialog, verify that the deployment finished successfully, then click OK.

Identify Your View Object

Get the name of the view object and attribute that you will need in your service mapping.

  1. Download and open the extensible flexfield.

    • Click Actions > Download Flexfield Archive, wait for processing to finish, then, in the Confirmation dialog, click Download.

    • In the dialog that displays, save the file to your preferred location.

    • Use your browser's download feature to navigate to the archive.

      For example, if you're using Firefox, click the down arrow on the top banner, then navigate to the 10008_DOO_HEADERS_ADD_INFO file, such as C:\Users\your_name\Downloads\10008_DOO_HEADERS_ADD_INFO.zip.

    • Unzip 10008_DOO_HEADERS_ADD_INFO.zip.

    • Navigate to folder C:\Users\user_name \Downloads\ 10008_DOO_HEADERS_ADD_INFO.zip\oracle\apps\scm\doo\processOrder\flex\headerContextsB\view.

    • Use an XML editor to open the HeaderEffBPrimary__Sales__RepresentativeprivateVO.xml file.

  2. Identify the name of the view object.

    • Find the Name attribute of the view object, then note its value. It should be on about the 4th line of code.

      <ViewObject
        xmlns="http://xmlns.oracle.com/bc4j"
        Name="HeaderEffBPrimary__Sales__RepresentativeprivateVO"

      In this example, the value is HeaderEffBPrimary__Sales__RepresentativeprivateVO.

  3. Find the Name attribute of the view attribute, then note its value.

    ViewAttribute Name="primarySalesperson"

    In this example, the value is primarySalesperson.

    The flexfield archive has a number of attributes, so make sure you identify the correct one.

Edit Service Mapping

Edit the service mapping that Order Management uses to integrate with Accounts Receivable.

  1. Go to the Pricing Administration work area.

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

  3. On the Manage Service Mappings page, in the Name column, click FulfillmentIntegration.

  4. Add an entity for the extensible flexfield.

    • On the Edit Service Mappings page, on the Entities tab, click Actions > Add Row, then set the values.

      Attribute

      Value

      Entity

      HeaderEFF_Custom

      You must include the _Custom suffix with any new entity that you create.

      You must include the EFF_Custom suffix with any new entity that you create for an extensible flexfield.

      Description

      Extensible flexfield that stores the salesperson on the order header.

    • In the details area, add your attributes, then click Save.

      Attribute

      Type

      HeaderId_Custom

      Long

      SalesPersonId_Custom

      Long

      Enable the Allow Null attribute. Leave all other attributes at the current values.

      You must use the same Type for each attribute that you specify for the corresponding attribute in the descriptive flexfield. If you don't use the same data type, then your service mapping might not fail when compiling but will fail in your runtime environment. The runtime failure might be difficult to troubleshoot because you might not encounter any errors but your set up might not work as you expected.

  5. Modify the source.

    • Click Sources.

    • In the Sources list, click the row that has the value.

      Attribute

      Value

      Source

      InvoiceSources

    • In the InvoiceSources Details area, click View > Columns, then enable the Joined Entity and Joined Entity Attribute.

    • On the Entity Mappings tab, click Actions > Add Row, set the values, then click Save.

      Attribute

      Value

      Entity

      HeaderEFF_Custom

      Type

      View Object

      View Object

      HeaderEffBPrimary__Sales__RepresentativeprivateVO

      This value is the name of the view object that you noted earlier in this procedure when you downloaded the flexfield archive.

      Query Type

      Join

      Query Attribute

      HeaderId

      The invoice service primarily references the fulfillment line, so you query for the HeaderId from the fulfillment line. You use the Joined Entity to create a relationship between the HeaderId query attribute and the fulfillment line, and you use the Joined Entity Attribute to specify how to identify the joined entity.

      Joined Entity

      FulfilLine

      Joined Entity Attribute

      FulfilLineId

    • On the Attribute Mappings tab, add your custom attributes, then click Save.

      Attribute

      View Object Attribute

      HeaderId_Custom

      HeaderId

      SalesPersonId_Custom

      primarySalesperson

      This value is the name of the ViewAttribute that you noted earlier in this procedure when you downloaded the flexfield archive.

    • On the Entity Mappings tab, click the row that has ARInterfaceLine in the Entity column.

      Order Management uses the ARInterfaceLine entity to communicate the attribute value in the payload that it sends to Accounts Receivable. You will add this attribute to the source. Later, you will also add it to the service.

    • In the ARInterfaceLine Details area, add the attribute, then click Save.

      Attribute

      Value

      Attribute

      ResourceSalesrepId

      Leave the View Object Attribute and the Expression attribute empty. The integration algorithm that you set up in this topic will use the extensible flexfield on the order header to determine these values.

  6. Modify the service that Order Management uses to communicate with Accounts Receivable.

    • Click Services.

    • In the Services list, click the row that has the value.

      Attribute

      Value

      Service

      InvoiceService

    • In the InvoiceService Details area, click Actions > Add Row, set the values, then click Save.

      Attribute

      Value

      Entity

      HeaderEFF_Custom

      Alias

      Leave empty

      Read

      Enabled

      Write

      Enabled

      Leave the other attributes at their default values.

    • At the bottom of the page, in the HeaderEFF_Custom Entities area, add your custom attributes so Order Management can communicate them through the InvoiceService.

      Attribute

      Value

      HeaderId_Custom

      Leave empty

      SalesPersonId_Custom

      Leave empty

      Enable the Read attribute and Write attribute for each of the attributes that you add.

    • In the InvoiceService Details area, click the row that has ARInterfaceLine in the Entity column.

    • In the ARInterfaceLine Entities area, add the attribute.

      Attribute

      Value

      Attribute

      ResourceSalesrepId

    • Click Save and Close.

Modify Integration Algorithm

To implement the logic you need, you will modify the integration algorithm from another help topic.

  1. Create an integration algorithm. For details, see Use Integration Algorithms to Implement Complex Logic.

  2. Add a new data set.

    Attribute

    Value

    Name

    HeaderEFF

    Variable Path

    ARIntegration.HeaderEFF_Custom

    Primary

    Not enabled.

    Cardinality

    Zero or one

    Data Set Join

    [HeaderId_Custom:(Fline.HeaderId)]

  3. Add code to the conditional action. Add it as a new line at the end of the code.

    ARLine.ResourceSalesrepId=HeaderEFF.SalesPersonId_Custom

    This code says to get the value for the sales person from the SalesPersonId_Custom attribute on the HeaderEFF flexfield, then store it in the ResourceSalesrepId attribute in the ARLine data set.

  4. Copy the code that you added to the conditional action, and paste it as a new line the end of the code in the default action.

    The algorithm you're modifying has a conditional action for order lines that contain a coverage item and a default action for lines that contain a covered item. You need to populate the ARLine data set regardless of whether the item on the line is a coverage item or a covered item, so you add the same code to the conditional action and the default action.

    You use this data set to make sure that you have the values you need for the extensible flexfield on the order header.

  5. Publish the algorithm.

Test Your Setup

  1. Create a sales order.

    • Go to the Order Management work area, create a sales order, then add an order line.

    • On the order header, click Actions > Edit Additional Information.

      The work area displays the Additional Information dialog. This dialog displays extensible flexfields that you create on the order header, by default.

    • Verify that the Additional Information dialog displays the Sales Representatives area, which is the flexfield context, and that this area displays the Primary Sales Rep attribute.

    • Set the Primary Sales Rep to Diane Cho.

    • Click Submit.

      Assume your order number is 54758.

  2. Verify that Order Management correctly sends your data to Accounts Receivable.

    • Make sure you have the privileges that you need to manage Accounts Receivable. For details, see Privileges That You Need to Implement Order Management.

    • Go to the Billing work area, then click Tasks > Manage Transactions.

      For details, go to Using Receivables Credit to Cash, then search for Requirements for Completing a Receivables Transaction.

    • On the Manage Transactions page, search for the transaction.

      Attribute

      Value

      Business Unit

      Vision Operations

      Transaction Source

      Distributed Order Orchestration

      Reference

      54758

    • On the Review Transaction page, in the General Information area, verify that the Salesperson attribute contains Diane Cho, which is the same value that you set on the order header in Order Management.