Order xC extension points

You can customize how HCL Commerce handles cart and order capture operations and integrations with an external order management system.

The following table identifies the classes for order-related commands that you can customize through an externalized customization extension.
Extension point Where the extension point is used Request, Response formats Sample extension code location Sample CSV input files
order_item_add_pre The add order item operation (POST cart) calls the order_item_add_pre extension point to perform custom actions (for example, validate the command inputs) before adding the order items to the cart. OrderPreUERequest, OrderPreUEResponse The orderItemAddPre method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_item_add_pre
order_item_add_post The add order item operation (POST cart) calls the order_item_add_post extension point to perform custom actions (for example, update the order item attributes) after adding the order items to the cart. OrderPostUERequest, OrderPostUEResponse The orderItemAddPost method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java

The validateQuantity method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java

order_item_add_post
order_item_update_pre The update order item operation (PUT cart/@self/update_order_item) calls the order_item_update_pre extension point to perform custom actions (for example, validate the command inputs) before updating the order items. OrderPreUERequest, OrderPreUEResponse The orderItemUpdatePre method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_item_update_pre
order_item_update_post The update order item operation (PUT cart/@self/update_order_item) calls the order_item_update_post extension point to perform custom actions (for example, update the order item attributes) after updating the order items. OrderPostUERequest, OrderPostUEResponse The orderItemUpdatePost method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_item_update_post
order_item_delete_pre The delete order item operation (PUT cart/@self/delete_order_item) calls the order_item_delete_pre extension point to perform custom actions (for example, validate the command inputs) before deleting the order items. OrderPreUERequest, OrderPreUEResponse The orderItemDeletePre method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_item_delete_pre
order_item_delete_post The delete order item operation (PUT cart/@self/delete_order_item) calls the order_item_delete_post extension point to perform custom actions after deleting the order items. OrderPostUERequest, OrderPostUEResponse The orderItemDeletePost method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_item_delete_post
order_calculate_pre The calculate cart operations (POST cart/calculate and POST cart/{cartId}/calculate) call the order_calculate_pre extension point to perform custom actions (for example, validate the command inputs) before calculating the cart's adjustments and charges. OrderPreUERequest, OrderPreUEResponse The OrderCalculatePre method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_calculate_pre
order_calculate_post The calculate cart operations (POST cart/calculate and POST cart/{cartId}/calculate) call the order_calculate_post extension point to perform custom actions (for example, update the cart attributes) after calculating the cart's adjustments and charges. OrderPreUERequest, OrderPreUEResponse The OrderCalculatePost method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_calculate_post
order_prepare_pre The prepare cart operation (POST cart/@self/precheckout) calls the order_prepare_pre extension point to perform custom actions (for example, validate the command inputs) before preparing the cart for checkout. OrderPreUERequest, OrderPreUEResponse The OrderPreparePre method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_prepare_pre
order_prepare_post The prepare cart operation (POST cart/@self/precheckout) calls the order_prepare_post extension point to perform custom actions (for example, update the cart attributes) after preparing the cart for checkout. OrderPostUERequest, OrderPostUEResponse The OrderPreparePost method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_prepare_post
order_process_pre The checkout cart operation (POST cart/@self/checkout) calls the order_process_pre extension point to perform custom actions (for example, validate the command inputs) before processing the order. OrderPreUERequest, OrderPreUEResponse The OrderProcessPre method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_process_pre
order_process_post The checkout cart operation (POST cart/@self/checkout) calls the order_process_post extension point to perform custom actions (for example, update the order attributes) after processing the order. OrderPostUERequest, OrderPostUEResponse The OrderProcessPost method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_process_post
update_shipping_address_pre The order item operations (POST cart, PUT cart/@self/update_order_item and PUT cart/@self/delete_order_item) call the update_shipping_address_pre extension point to perform custom actions (for example, validate the shipping addresses) before updating the shipping addresses of the order items. UpdateShippingAddressCmdUEInput, UpdateShippingAddressCmdUEOutput The updateShippingAddressCus method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java update_shipping_address_pre
update_shipping_address_post The order item operations (POST cart, PUT cart/@self/update_order_item and PUT cart/@self/delete_order_item) call the update_shipping_address_post extension point to perform custom actions (for example, update the order item attributes) after updating the shipping addresses of the order items. UpdateShippingAddressCmdUEInput, UpdateShippingAddressCmdUEOutput The updateShippingAddressCus method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java update_shipping_address_post
order_notify_pre The checkout cart operation (POST cart/@self/checkout) calls the order_notify_pre extension point to perform custom actions before sending the order notification message. OrderNotifyCmdUEInput, OrderNotifyCmdUEOutput The orderNotifyCus method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_notify_pre
order_notify_post The checkout cart operation (POST cart/@self/checkout) calls the order_notify_post extension point to perform custom actions after sending the order notification message. OrderNotifyCmdUEInput, OrderNotifyCmdUEOutput The orderNotifyCus method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java order_notify_post
compensate_transaction Digital Commerce calls the compensate_transaction extension point to perform custom actions when a transaction is rolled back. CompensateForTxRollbackCmdUEInput, CompensateForTxRollbackCmdUEOutput The compensateForTxTransanction method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java compensate_transaction
promotion_code_add_remove_pre The promotion code operations (POST cart/@self/assigned_promotion_code and DELETE cart/@self/assigned_promotion_code/{promotionCode}) call the promotion_code_add_remove_pre extension point to perform custom actions before adding or removing promotion codes to or from the cart. OrderPreUERequest, OrderPreUEResponse The promotionCodeAddRemovePre method in workspace_dir/commerceue-app/src/main/java/com/ibm/commerce/order/ue/rest/OrderResource.java promotion_code_add_remove_pre

Sample input files for registering and assigning order xC extension points

Extension point Registering extension code with UEConfig.csv Assigning extension code to extension points with CmdReg.csv
order_item_add_pre
  • Sample CmdReg_orderitemaddpre.csv
  • Set Properties column to include the UEConfigId integer value.
  • Set StoreIdentifier column to include the name of your store. If you want all stores to use the same extension code, then specify NullEntity. For more information, see Registering custom xC extensions.
order_item_add_post
  • Sample CmdReg_orderitemaddpost.csv
  • Set Properties column to include the UEConfigId integer value.
  • Set StoreIdentifier column to include the name of your store. If you want all stores to use the same extension code, then specify NullEntity. For more information, see Registering custom xC extensions.
order_item_update_pre
order_item_update_post
order_item_delete_pre
order_item_delete_post
order_calculate_pre
  • Sample CmdReg_ordercalculatepre.csv
  • Set Properties column to include the UEConfigId integer value.
  • Set StoreIdentifier column to include the name of your store. If you want all stores to use the same extension code, then specify NullEntity. For more information, see Registering custom xC extensions.
order_calculate_post
order_prepare_pre
  • Sample CmdReg_orderpreparepre.csv
  • Set Properties column to include the UEConfigId integer value.
  • Set StoreIdentifier column to include the name of your store. If you want all stores to use the same extension code, then specify NullEntity. For more information, see Registering custom xC extensions.
order_prepare_post
  • Sample CmdReg_orderpreparepost.csv
  • Set Properties column to include the UEConfigId integer value.
  • Set StoreIdentifier column to include the name of your store. If you want all stores to use the same extension code, then specify NullEntity. For more information, see Registering custom xC extensions.
order_process_pre
  • Sample CmdReg_orderprocesspre.csv
  • Set Properties column to include the UEConfigId integer value.
  • Set StoreIdentifier column to include the name of your store. If you want all stores to use the same extension code, then specify NullEntity. For more information, see Registering custom xC extensions.
order_process_post
  • Sample CmdReg_orderprocesspost.csv
  • Set Properties column to include the UEConfigId integer value.
  • Set StoreIdentifier column to include the name of your store. If you want all stores to use the same extension code, then specify NullEntity. For more information, see Registering custom xC extensions.
update_shipping_address_pre
  • Sample CmdReg_updateshippingpre.csv
  • Set Properties column to include the UEConfigId integer value.
  • Set StoreIdentifier column to include the name of your store. If you want all stores to use the same extension code, then specify NullEntity. For more information, see Registering custom xC extensions.
update_shipping_address_post
order_notify_pre
  • Sample CmdReg_ordernotifypre.csv
  • Set Properties column to include the UEConfigId integer value.
  • Set StoreIdentifier column to include the name of your store. If you want all stores to use the same extension code, then specify NullEntity. For more information, see Registering custom xC extensions.
order_notify_post
  • Sample CmdReg_ordernotifypost.csv
  • Set Properties column to include the UEConfigId integer value.
  • Set StoreIdentifier column to include the name of your store. If you want all stores to use the same extension code, then specify NullEntity. For more information, see Registering custom xC extensions.
compensate_transaction
  • Sample CmdReg_comptrans.csv
  • Set Properties column to include the UEConfigId integer value.
  • Set StoreIdentifier column to include the name of your store. If you want all stores to use the same extension code, then specify NullEntity. For more information, see Registering custom xC extensions.
promotion_code_add_remove_pre
  • Sample CmdReg_promoaddremovepre.csv
  • Set Properties column to include the UEConfigId integer value.
  • Set StoreIdentifier column to include the name of your store. If you want all stores to use the same extension code, then specify NullEntity. For more information, see Registering custom xC extensions.
promotion_code_add_remove_post