Guidelines for Setting Up Extensible Flexfields in Order Management

Use these guidelines to help you set up an extensible flexfield in Oracle Order Management.

  • Unlike a descriptive flexfield, you can add as many segments as you need.
  • Use the context to organize your business data into a concise area of the user interface element, such as a dialog.
  • Organize your attributes into logical groups according to your display and usage requirements.
  • Consider where an extensible flexfield might be useful in the order capture and order fulfillment lifecycle.
  • An extensible flexfield that you add on the sales order header is independent of an extensible flexfield that you add on a fulfillment line. Order Management doesn't communicate or transfer values between them even if you use the same name for each extensible flexfield. If you need dependence between them, then create an order management extension, and then specify dependence logic in the extension.

Create Segments and Contexts

Create Segments and Contexts

If you:

Create or Modify Then
Create a new segment.

Use the same value for the Code attribute and the API Name attribute. This will simplify setup and maintenance.

You use API Name throughout the setup, such as when you integrate with web services, business rules, business intelligence, and so on. You can't modify Code or API Name after you create the segment.

Modify a segment that already exists. Don't modify API Name.

Extensible flexfield logic examines API Name. If it's empty, then the logic uses the value in Code, so it isn't necessary to specify a value in API Name. If you do modify API Name, then your flexfield might fail with unexpected results at run time.

Note

  • Enter a unique code, name, and description for each segment. The Order Management work area doesn't display these values, so use whatever nomenclature is most helpful to you during setup and maintenance.

  • You must not enable the Translatable option on the context. For details, see Set Up Extensible Flexfields in Order Management.

Nomenclature

Make sure the Display Name attribute and the Code attribute for each flexfield, context, and segment that you create uses the correct nomenclature:

  • Make sure the attribute begins with a letter and contains only letters, numbers, and these special characters:

    Character

    Description

    Single space

    .

    Period

    -

    Hyphen

    Don't use an em dash or en dash.

    _

    Underscore

    '

    Single quotation mark

    :

    Colon

    /

    Forward slash

  • Don't start the Code attribute with a number. XML doesn't support a context name or segment name that begins with a number. If you begin the name of your context or segment with a number, then Order Management automatically prefaces the name with an underscore ( _ ) at run time. For example, if you name your context 1MyContext, then Order Management automatically renames it to _1MyContext.Begin the name with a letter of the alphabet, A through Z.

  • Don't include more than one consecutive space character.

  • Don't include spaces in the Code attribute. A space will cause a run time error.

  • Don't end the attribute's value with a space character.

If you encounter an incorrect alias error when you run the Publish Extensible Flexfield Attributes scheduled process, then make sure your contexts and segments use the correct nomenclature.

Number of Attributes and Segments

The number of attributes and segments that you can add to the context depends on the data type that you set for the context:

Data Type Number of Attributes That You Can Add Number of Segments That You Can Add
Varchar 20 20
Number 10 5
Date 5 10
Time 5 10

You can add a maximum of 40 segments to each context.

Order Management doesn't limit how many contexts that you can add, but you must add only the minimum number of contexts that you need because each context can affect performance.

Create Order Management Extensions

guidelines when you use an extensible flexfield in an order management extension

Note

  • Include an If statement to make sure each context and segment that your extension references exists and contains a value. If you don't check for missing objects and empty values, then your extension might fail with unpredictable results.

  • Use the getOrCreateContextRow method to create or update a value in an extensible flexfield. If the object doesn't exist, then getOrCreateContextRow creates it, so it isn't necessary to determine whether the object exists before you use this method to do an update. Use getContextRow to only get a row.

  • Use Context Code when you reference an extensible flexfield context.

  • Use API Name when you reference an extensible flexfield segment. If you don't specify API Name when you set up the extensible flexfield, then use Segment Code but with underscores ( _ ) instead of spaces ( ).

  • Your Groovy code must traverse the context and the segment to get all data from the extensible flexfield.

    Here's an example that uses a while statement to traverse all data.

    def complianceDetails = header.getOrCreateContextRow("ComplianceDetails");
    complianceDetails.setAttribute("_ComplianceReason", "This has been set by pre submit extension.");
    
    def lines = header.getAttribute("Lines");
    while( lines.hasNext() ) {
      def line = lines.next();
      def inventoryItemId = line.getAttribute("ProductIdentifier");
      def orgId = line.getAttribute("InventoryOrganizationIdentifier");
      def item = getItem(inventoryItemId, orgId);
      
      String hazardous = item.getAttribute("HazardousMaterialFlag");
      def packShipInstruction = line.getOrCreateContextRow("PackShipInstruction");
      
      if( "Y".equals(hazardous) ) {
          // get details for fulfill line context PackShipInstruction
          
          packShipInstruction.setAttribute("_ShippingInstruction", "Hazardous Handling Required.");
      } 
      
    }

Use Business Rules

If your fulfillment system needs data that the predefined attributes in a sales order don't provide, then use a value from an extensible flexfield as the criteria for setting the default value in some other sales order attribute.

Assume you set up an extensible flexfield named Sample Requested. Assume it can contain these values:

  • Complimentary

  • Charge

  • No Sample

You can create a transformation rule:

If the value is Complimentary or Charge, then add a fulfillment line for the sample item.

You can then set up a rule that populates price details for the sample lines according to whether the value is Complimentary or Charge.

You can't set an attribute's default value in an extensible flexfield, so make sure you run the defaulting rule during one of these types of transformations when you process the transformation rule:

Type of Transformation

Description

Pretransformation

Use an extensible flexfield when some other transformation logic needs the attribute's default value.

For example, if you must use the defaulted attribute value to determine whether to add a free sample item during transformation, then create a pretransformation rule that sets the default value.

Posttransformation

Use Posttransformation when transformation must happen before you run your defaulting rule.

For example, when you plan to add an item during transformation, and you also plan to use an extensible flexfield attribute on the order header to determine the defaulted value to set for the new fulfillment line.

Use an extensible flexfield in a business rule. For details, see Identify Flexfield Contexts and Category Codes for Your Business Rules.

Import and Integrate

You can update an extensible flexfield on a closed fulfillment line or closed sales order only in the Order Management work area. You can't do this through import, such as through file based data import, a web service, REST API, or Oracle Application Development Framework (ADF).

Import Source Orders

Use these guidelines when you use the order import template to import data for an extensible flexfield:

  • Assign each segment's Table Column attribute so it references the correct column in the order import template.

  • Use the DOO_ORDER_HDRS_ALL_EFF_B_INT worksheet to capture details for order headers.

  • Use the DOO_ORDER_LINES_ALL_EFF_B_INT worksheet to capture details for fulfillment lines.

  • Use columns, such as ATTRIBUTE_CHAR1, to capture details for each attribute.

  • Don't modify worksheet names or column names. Instead, add a comment.

  • Add a comment in Excel to document your set up.

You can use with an extensible flexfield only with these entities:

  • Header

  • Fulfillment line

  • Fulfillment line detail

You can't add an extensible flexfield on the order line entity. You can add one only on the order header entity or the fulfillment line entity. The template uses the phrase DOO_ORDER_LINES, but it uses details that you add on the DOO_ORDER_LINES_ALL_EFF_B_INT worksheet to interact with extensible flexfields on the fulfillment line, not on the order line. See Import Orders Into Order Management.

This example illustrates how to set up the Compliance Info segment that references the ATTRIBUTE_CHAR1 column:

set up segment Compliance Info that references column ATTRIBUTE_CHAR1

Use Web Services to Import Extensible Flexfield Details

Add extensible flexfield details to the payload that Order Management uses to communicate with the web service:

  • Use the web service named Receive Fulfillment Task Response Service with all task types. Use the DooTaskFulfillOrderResponseInterfaceComposite.

    Get an example payload. For details, see Example Web Service Payloads That Integrate Order Management.

    A range of examples are available, such returns, coverage, configurations, and so on. These payloads include most of the sales order data that you need.

  • If you create your own payload, then create it according to the WSDL definition that the payload needs. See Use Your Own Payload to Import Extensible Flexfields.

  • Run the Publish Extensible Flexfield Attributes scheduled process.

  • Copy extensible flexfield data from the log file that the scheduled process creates into the XSD file that contains your payload. Copy this data onto each object that needs extensible flexfield data. This approach helps to keep your channel system synchronized with your set up in Oracle Order Management.

  • Use the import service from Application Development Framework (ADF). Don't use the SOA (Service Oriented Architecture) import service.

Here's an example payload that copies one section of code from the log file into the XSD file:

payload to copy one section of code from the log file into the XSD file

See Guidelines for Using Web Services to Integrate Order Management.

Integrate With Other Oracle Applications

Use an extensible flexfield when you integrate with some other Oracle Application, such as Oracle Pricing, Oracle Receivables, Oracle Shipping, Oracle Receiving, or Oracle Purchasing. You set up a service mapping that's similar to that service mapping that you set up for Oracle Pricing. You use an extensible flexfield to store values that the service mapping needs:

extensible flexfield to store values that the service mapping requires

Note

  • Copy the view object's name from the log file. The service mapping uses the view object to get data from your extensible flexfield. Use the log file that the Publish Extensible Flexfield Attributes scheduled process creates.

  • Use the _Custom suffix when you specify each new entity.

  • Use an integration algorithm to implement complex logic. For example, assume you must concatenate an item with the coverage that covers the item, add quantity, then store the results in a descriptive flexfield for Oracle Receivables. You can use an integration algorithm to implement this requirement.

Manage Change

guidelines when you use an extensible flexfield while processing a change order

Identify your requirements for change management. For example, figure out whether the orchestration process must compensate when you change the value in an extensible flexfield and the action to take when you compensate, such as schedule, call Oracle Receivables, and so on.

Set up the orchestration process differently depending on whether the value that it references changes any flexfield or a specific one:

Compensate Value For Enable the Use Flexfield Attributes option
Any extensible flexfield On the header of the orchestration process definition.
A specific extensible flexfield

In the Change Management section of the orchestration process definition.

Add it to the orchestration process step that references the extensible flexfield. Also set up a compensation pattern on this step.

Use the compensation pattern to specify the action to do, such as Cancel, Create, Update, and so on, depending on the value that changes. Your set up can send an update when a single value changes and skip sending an update when other values change. This approach provides more detailed control regarding the compensation that you do.

Here's an example compensation pattern:

pseudocode: 
If segment3 changes, then cancel task x, and then recreate task x. 
If segment4 changes, then do nothing.
If segment5 changes, then call an update service. 

For a detailed example, see Compensate Sales Orders That Change.

To ignore changes to all extensible flexfield values, make sure Use Flexfield Attributes for each step in the Change Management section isn't enabled.

Change management ignores each change that you make to an extensible flexfield's value at run time when it's on order header.

Use the Order Management Work Area

Assume you need to search an extensible flexfield on the 56794 sales order:

  1. Go to the Order Management work area.
  2. On the Overview page, Tasks > Manage Fulfillment Lines.
  3. Click Add Fields > Extensible Flexfield Category.
  4. Set the values:
    Attribute Value
    Order 56794
    Extensible Flexfield Category Equals Additional Fulfillment Line Information
  5. Click Search.
  6. In the search results, scroll all the way to the right, then examine the extensible flexfield attributes. They will have the names that you set up for the flexfield, such as the context and category.

    As an option, click View > Columns, then add or remove individual attributes from the search results.

  7. Click Save to save your search. This way, you can access your saved search the next time you need to see flexfield details.

Here's another way to search for flexfields on a sales order:

  1. Go to the Order Management work area.
  2. On the Overview page, click Tasks > Manage Orders.
  3. On the Manage Orders page, click Add Fields > Extensible Flexfield Category.
  4. Set the attributes:
    Attribute Value
    Order 56794
    Extensible Flexfield Category Equals Additional Header Information

Use Reports and Analytics

Modify Reports

guidelines when you use an extensible flexfield in a report.

You can use the Sales Order report when you create or view a sales order.

Add extensible flexfield data to the report:

  1. Install Oracle Analytics Publisher Desktop,

  2. Use the Edit Sales Order Report action in Oracle Analytics Publisher. This action displays Sales Order Report in rich text format so you can modify it.

  3. Right-click a field, then click Copy.

  4. Use Oracle Analytics Publisher Properties to specify the source that the report uses to display data for the field. Use this format:

    <?context/segment?>

    where

    • context. Name of the extensible flexfield context.

    • / (forward slash). You must use the forward slash between context and segment.

    • segment. Name of the extensible flexfield segment.

    • You must use a set of question marks ( ?? ) to enclose context/segment.

    • You must use a set of angle brackets ( < > ) to enclose the question marks.

    For example, assume you set up an extensible flexfield that uses Context1 to store details about trade compliance, and SegmentA to store the compliance description. Use this code:

    <?Context1/SegmentA?>

Modify Analytics

Oracle Transaction Business Intelligence (OTBI) provides analytic reporting. You can display extensible flexfield data in OTBI.

guidelines when you display extensible flexfield data in OTBI

Note

  • Enable the BI Enabled option when you set up your extensible flexfield.

  • Run the Import Oracle Fusion Data Extensions for Transactional Business Intelligence scheduled process. This process updates OTBI so it displays your extensible flexfields in area Subject Areas in OTBI. For details, see Overview of Flexfield Change Import.

  • Add your extensible flexfields from Subject Areas into a report in OTBI.

  • Here's the format that OTBI uses.

    Category_Context

    For example:

    Additional Fulfillment Line Information_Additional Details1

    where

    • Additional Fulfillment Line Information is the category.

    • Additional Details1 is the context.

And Yet More Guidelines

An extensible flexfield supports a one-to-many relationship between one entity and one or more attributes. You can use it to add more than one context sensitive segment.

You can set up an extensible flexfield for a fulfillment line or on some other object that supports an extensible flexfield.

If you add an extensible flexfield to a fulfillment line, and if you use the Update or Close Sales Orders scheduled process to close the order line that the fulfillment line references at run time, then at run time you:
  • Can't update the value in the extensible flexfield on the fulfillment line.

  • Can revise the sales order and update the value in the extensible flexfield on the fulfillment line, but Order Management won't use the revised value when it processes the revision.

  • Can update an extensible flexfield on the order header regardless of the sales order's or the order line's status.