Overview of Creating Order Management Extensions
Write your own Groovy script that modifies your Order Management deployment, implements your own functionality, and specifies the extension point that determines when to run this script.
An order management extension is a Groovy script you write that meets your specific business requirements. An extension point is an event that you specify to determine when to run the script.
You can use a flexfield to modify the data model, or Page Composer to modify the user interface, but you can't use them to modify logic or modify your Order Management deployment. Instead, you can create an order management extension.
Here is some Groovy script in an example extension named Update Order Submit Date. It uses attribute _H1AttributeDateTime so it can set the value of an extensible flexfield to the date and time when Order Management submitted the sales order.

Business Requirements That You Can Meet with an Order Management Extension
Example Requirement |
Description |
---|---|
Get or update data |
Create an order management extension to get or update data from different sources.
You can also use a transformation rule to get or update data, but an extension allows you to use more advanced code. You can also use it to add new order line. |
Set the default value for sales order attributes or extensible flexfields |
You can use a pretransformation rule, posttransformation rule, or do some simple personalization in a user's sandbox, but you might find that using Groovy to write your own logic more closely meets your need to set default values before you save the sales order or submit it to order fulfillment. You can use an extension to:
|
Validate data |
Validate data on different attributes on the same entity, such as an order header, or on attributes on different entities, such as on the order header and the header's order lines. Compare data between attributes on an order header or order line to data from attributes in other applications or work areas, such as entities in Oracle Pricing or attributes on item's from Product Information Management. |
Get values for return lines from the original sales order. |
A return order doesn't include values from the original order on some order line attributes. For example, the return line doesn't include the original value for the sales credit or purchase order number. You can use an extension to get the value from the original line order. |
Apply a hold | You can manually apply a hold in the Order Management work
area or through a web service, but you might find it's easier to do it
automatically through an extension:
|
Display error messages and warnings |
Create an extension that displays an error message or warning. |
Implement your own logic |
Use Groovy to write your own logic when you code your extension. Your code can validate the sales order. If validation fails, then your code can stop the flow and create a message. For details about Groovy, see Groovy Programming Language. |
Example Actions
Action |
Description |
---|---|
Submit a sales order |
|
Save or validate a sales order |
Write a validation on an imported source order that rejects the import or prevents the Order Entry Specialist from saving the order without fixing the problem. |
Parts of an Order Management Extension
Part |
Description |
---|---|
Function |
A Groovy function, similar to a Java function, such as getAttr. Use a function only in the extension where you set it up. You can't define a function in one extension, and then use it in another extension. |
Attribute |
The attribute of a sales order, such as ShippingInstructions. |
Web Service |
The name of a web service.
|
Message |
A message you send to Order Management and that can display in the Order Management work area.
|