Set up order cancellation

  • Updated

Optimizely Configured Commerce allows users to cancel orders through the Admin Console or website. Enabling this option requires some initial setup:

  • Update settings to expose the cancel options.
  • Build the cancel order integration job.

If an order is canceled without a Cancel Order integration job, Configured Commerce shows that the order has been canceled. However, this cancellation has only occurred on the Configured Commerce side and has not been sent to the ERP without the integration job. You must build the Order Cancel integration job to send the order cancellation to the ERP.

Configuring the option to cancel orders is a two-step process:

  1. Create the correct order statuses with the Order Status Mapping tool (See the Order Status Mapping article for more details).
  2. Identify which statuses allow for order cancellation.

Create and map the order statuses

  1. Go to Admin Console > Administration > System > Order Status Mapping.
  2. Create the mapping and select the option to Allow Cancellation (See the Order Status Mapping article for more details).

  3. Click Save.

Identify the cancellable order statuses

  1. Go to Admin Console > Administration > System > Settings.
  2. Search for Cancellable Order Statuses.
  3. Enter the cancellable order statuses listed within the Order Status Mapping screen that will allow an order to be canceled. As necessary. use the Plus sign to add additional statuses.

  4. Click Save.

Create the integration processor

As is standard with most submission based integration workflows, an custom coded integration processor needs to be created first, which calls the API to update the ERP. The integration processor is then referenced as a part of the integration job, which is described below.

Create the cancel order integration job

    1. Go to Admin Console > Administration > Jobs > Job Definitions.
    2. Click Add New Job Definition in the Primary toolbar.
    3. Populate the following fields in Details:
      Field Name Value Notes
      Job Name OrderCancel This is the recommended name.
      Job Type Execution  
      Connection ERP Connection Typically done through the API connection, if any
      Preprocessor None  
      Integration Processor   This is custom per the customer ERP
      Post Processor None  
    4. Click Save.
    5. Go to Steps and click + Job Definition Step to create a new job step.
    6. Populate the following fields:
      Field Name Value Note
      Sequence 1  
      Step Name Order Cancel Step This is the recommended name.
    7. Click Save.
    8. Click Parameters > + Job Definition Step Parameter.
    9. Populate the following fields:
      Field Name Value Note
      Name "ERP Order Number" or "Web Order Number" This will depend on whether you wish to use the ERP order number or the Configured Commerce Web order number.
      Value Type String  
      Default Value   Leave blank
      Prompt "ERP Order Number" or "Web Order Number" This can be left blank.
    10. Repeat the above steps if it is a requirement to populate both ERP Order number and Web Order Number – if both values exist, then having two job step parameters here with the proper naming conventions would populate them both.
    11. Click Save.