Use Promotion Codes to Apply Promotions On Sales Orders

Use a Redwood page with Oracle Order Management and Oracle Pricing to enter a promotion code on the sales order, then Pricing will use it to determine whether the order qualifies for the promotion. Use the code to provide a discount on your item or add a free item to the order.

Realize these benefits:

  • Use personalized text that welcomes your customer and addresses them in language that's specific to your business and the items you sell.
  • Encourage cross-selling and drive toward higher value orders.
  • Use the latest lingo and jargon that appeals to your specific customers.
  • Restrict discounts to eligible customers. For example, Free shipping on orders above $50 with code FREESHIP.
  • Move slow selling items more effectively. For example, Clearance sale: Use code FINAL40 for 40% off selected items.
  • Reduce abandoned orders and drive urgency. For example, Flash sale: Use code FAST15 for 15% off, valid for 24 hours.
  • Provide an easy way to increase your brand's awareness among customers, influencers, and others.
  • Track how effective your marketing strategy and tactics are for each promotion.

Set Up

  1. Enable these features:
  2. Set up pricing. For important details about how this feature works together with Oracle Pricing, see Manage Pricing Promotions.

As an option, you can also opt into the Use Closed Lines to Help Price Items feature. Use it to allow Oracle Pricing to consider closed lines when it needs to price an item that involves a pricing promotion.

Import

You can import a sales order that has a promotion code through REST API. Use the PromotionCode attribute in your REST payload:

  • You can use Oracle Pricing to price the order before you import only through REST API. You can't do this through web services or FBDI.
  • After you import, Pricing will price the promotion just like it does on the redesigned and classic pages.
  • If you use your own pricing application to price the order before you import, then you can't include promotion details in your import.
  • You can't use a web service or FBDI with FOM_IMPORT_VIA_REST_BACKEND to add a free item. For background, see Import and Fulfill Large Volumes of Sales Orders.
  • Import through REST only validates whether you have duplicate promotion codes. It doesn't do any other validation.
  • You can't import through FBDI.

For details, go to REST API for Oracle Supply Chain Management Cloud, expand Order Management > Sales Orders for Order Hub > Order >Promotion Codes.

Write Your Own Validation

Order Management comes predefined to do a variety of validations, but you can also use the Promotion Codes entity in an order management extension to do your own validation. For example, this extension controls the number of promotion codes that you can apply on the sales order:

import oracle.apps.scm.doo.common.extensions.ValidationException;
import oracle.apps.scm.doo.common.extensions.Message;
if ("PROMO_NA".equals(header.getAttribute("CustomerPONumber"))) {
  def it = header.getAttribute("OrderPromotionCodes");
  List<Message> messages = new ArrayList<Message>();
   messages.add(new Message(Message.MessageType.ERROR, "Order can't be submitted with promo codes that are in not applied status"));
  int count = 0;
  int countApplied = 0;
    while( it.hasNext() ) {
       def promoCode =  it.next();
       header.setAttribute("ShippingInstructions",promoCode.getAttribute("StatusCode"));
       header.setAttribute("PackingInstructions",promoCode.getAttribute("PromotionCode"));
       if(!"ORA_QP_APPLIED".equals(promoCode.getAttribute("StatusCode")))
        count = count +1;
       else
         countApplied = countApplied +1;    
      //messages.add(new Message( Message.MessageType.ERROR, "Promo Code = "+promoCode.getAttribute("PromotionCode") +" Status = " + promoCode.getAttribute("StatusCode")));
    }
  if(count > 0) {
    ValidationException ex = new ValidationException(messages);
    throw ex;
  }
    if(countApplied > 1) {
     ValidationException ex = new ValidationException(messages);
     throw ex;
    } 
}

Approve

You can use the Promotion Code Not Applied attribute in an approval rule.

Add Free Item

You can also use an order management extension to add an item to a sales order to reward a customer who purchases a larger quantity. For example, if your customer orders a quantity of 5 for the AS54888 desktop computer, then add a free AS9000 router on another order line on the same order:

  • Use the setProductNumber parameter of the createLineParams method to specify the item that you want to add.
  • Use the setOrderedQuantity parameter of createLineParams to specify the quantity for the item that you want to add.
  • Use an IF statement to specify the quantity that you want to use as the threshold that determines whether to add a new line.
  • You can use createLineParams to set the ProductNumber, OrderedUOM, and OrderedQuantity attributes on new lines that you add. You can't use it to set any other attribute.

For example:

import oracle.apps.scm.doo.common.extensions.CreateLineParams;
if (!"SUBMIT_AFTR_VALID".equals(header.getAttribute("CustomerPONumber"))) return; /* This line is only for testing purposes. Remove it after you successfully test this extension.*/
def createLineParams = new CreateLineParams();
createLineParams.setProductNumber("AS9000");
/* Specify the item.
that you want to add on the new line.*/
createLineParams.setOrderedUOM("Each")
createLineParams.setOrderedQuantity(1); /* Specify the quantity for the item that you're adding on the new line. */
def lines = header.getAttribute("Lines");
while (lines.hasNext()) {
  def line = lines.next();
  def isClosed = line.isClosed()
  def isCanceled = line.isCanceled()
  def isTransformed = line.isTransformed()
  def transformLines = line.getTransformedLines();
  if (isClosed || isCanceled || isTransformed || transformLines.size() != 0) {
    continue;
  }
  if (line.getAttribute("ProductNumber") == "AS54888" && line.getAttribute("OrderedQuantity") >= 5)
  /* Specify the quantity that you want to use as the threshold that determines when to add a new line. */
  {
    line.createNewLine(createLineParams);
  }
}

For details, see Overview of Creating Order Management Extensions.

Guidelines

  • To apply the promotion, you must enter the value in the Promotion Code attribute and the order must meet the promotion's conditions that you set up in the Pricing Administration work area.
  • You can use any alphanumeric text for the promotion code, including spaces, numbers, and special characters. All text characters must be in upper case.
  • The alphanumeric text that you enter in the Promotion Code attribute on the sales order in Order Management must match exactly the alphanumeric text that you enter in the Promotion Code attribute in Pricing Administration. If it doesn't, then Order Management will display an error.
  • To keep your user interface clean, we recommend that the promotion code not exceed 30 characters.
  • If you enter a value in the Promotion Code attribute on the sales order in Order Management but there's no matching value in Pricing Administration, then the Order Management work area will display an error message.
  • Order Management does a variety of other validations. For example, if the code exists in Pricing Administration and is in effect, and if the sales order is eligible for the promotion, then Pricing applies the promotion. If it doesn't exist, isn't in effect, or isn't eligible, then Order Management displays an error message. If you already applied the promotion on the sales order, then Order Management displays an error.
  • You can enter a promotion code only on the order header. You can't enter it on the order line.
  • You can specify more than one promotion code for each promotion.
  • Display the Promotion column on the order line then click the icon in that column to get details.
  • If you price the sales order before you import, then you can't apply the promotion. You can apply the promotion only when you use Oracle Pricing to price the sales order.
  • You can't remove a promotion code from the sales order after Order Management ships, fulfills, or closes any line where Pricing applied the promotion unless the line is in the Awaiting Shipping status. If the line is in that status, then you can revise the order and remove the code.
  • To use a promotion code on Order Management's classic pages, open your order for editing, then click Actions > Add Promotion Code.
  • Revision, cancel, and return works the same just like it does with any pricing promotion.

Behavior varies depending on whether Order Management includes a value in the Promotion Code attribute when it sends a request to Pricing to price the sales order, and whether you specify a value in the Promotion Code Attribute on the promotion in Pricing Administration:

Does Order Management Send the Promotion Code Did You Specify the Code in Pricing Administration Behavior
Yes Yes Pricing will apply the promotion only if the value that Order Management sends matches the value that you specify in Pricing Administration and if the order meets the conditions.
No Yes Pricing won't apply the promotion.
Yes No Pricing won't apply the promotion.
No No Pricing will ignore the promotion code entirely and apply the promotion. If the order meets the conditions, then Pricing applies the promotion.