younifyd
Menu

Cancel Oms Order

Cancel OMS Order

POST/organizations/{organizationId}/orders/{orderNo}/actions/oms-cancel-order

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Cancel Oms Order action (under Shopper Orders).
  3. Fill in the fields below, then reference the result from later steps as {{cancelOmsOrder.response.data}}.

Request

Path parameters

organizationIdstringrequired

An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).

orderNostringrequired

The order number of the order to be modified.

Query parameters

siteIdstringrequired

The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

localeoneOf

A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.

Request body

Enter the body as JSON in the step's Body field.

reasonstring

The reason for cancelling the order. The value must match one of the `cancelReasonCodes` configured in OMS and returned by the `getOmsMetaData` endpoint. When omitted, the default reason code configured in OMS is applied by the server.

json
{
  "reason": "Not specified"
}

Response

Returns 200 with an object. Read it in later steps with {{cancelOmsOrder.response.data.<field>}}.

adjustedMerchandizeTotalTaxnumber (double)

The total tax on products in the order, including price adjustments, but not including service charges such as shipping. It is read only.

adjustedShippingTotalTaxnumber (double)

The total tax on shipping charges in the order, including shipping price adjustments. It is read only.

billingAddressany

The billing address.

bonusDiscountLineItemsarray<object>

The bonus discount line items.

bonusProductsarray<object>4 fields

The bonus products the customer can choose from.

couponCodestring

The coupon code that triggered the promotion, if applicable.

idstring

The ID of the line item. It is read only.

maxBonusItemsinteger (int32)

The maximum number of bonus items the user can select for this promotion.

promotionIdstring

The ID of the promotion that triggered the creation of the line item.

channelTypestring

The sales channel. It is read only.

One ofstorefrontcallcentermarketplacedssstorepinteresttwitterfacebookadssubscriptionsonlinereservationcustomerservicecenterinstagramcommercetiktoksnapchatgooglewhatsappyoutubechatgptgemini

confirmationStatusstring

The confirmation status.

One ofnot_confirmedconfirmed

couponItemsarray<object>

The coupon items. It is read only.

codestringrequired

The coupon code.

couponItemIdany

The coupon item ID. It is read only.

statusCodestring

The status of the coupon item. It is read only.

One ofcoupon_code_already_in_basketcoupon_code_already_redeemedcoupon_code_unknowncoupon_disabledredemption_limit_exceededcustomer_redemption_limit_exceededtimeframe_redemption_limit_exceededno_active_promotioncoupon_already_in_basketno_applicable_promotionappliedadhoc

validboolean

A flag indicating whether the coupon item is valid. A coupon line item is valid if the status code is "applied" or "no_applicable_promotion". It is read only.

createdBystring

This value depends on how the order was created. If a shopper created the order, this value is Customer. If a job created the order, this value is System. Otherwise, this value is the name of the user who created the order. It is read only.

creationDatestring (date-time)

The timestamp when the order was created. It is read only.

currencyany

The ISO 4217 mnemonic code of the currency. It is read only.

customerInfoany

The customer information for guest or logged-in customers. It is read only.

customerNamestring

The customer name. It is read only.

exportStatusstring

The export status of the order.

One ofnot_exportedexportedreadyfailed

externalOrderStatusstring

The external status of the order.

giftCertificateItemsarray<object>

The gift certificate line items. It is read only.

amountnumber (double)required

The gift certificate item amount.

giftCertificateItemIdany

The item ID. It is read only.

messagestring

The gift certificate message.

recipientEmailstringrequired

The recipient email.

recipientNamestring

The recipient's name.

senderNamestring

The sender's name.

shipmentIdstring

The ID of the shipment this item belongs to.

globalPartyIdstring

The Customer 360 Global Party ID associated with the shopper. It is read only.

lastModifiedstring (date-time)

The timestamp when the order was last modified. It is read only.

merchandizeTotalTaxnumber (double)

The total products tax in the purchase currency. Merchandise total prices represent the sum of product prices not including shipping or adjustments. It is read only.

orderNoany

The order number.

orderPriceAdjustmentsarray<object>

The order-level price adjustments. It is read only.

appliedDiscountany

Details describing the discount this price adjustment is based on. For adjustments not based on a discount, this value is null.

couponCodestring

The coupon code of the coupon this price adjustment is based on. For adjustments not based on a coupon, this value is null. It is read only.

createdBystring

The user who created the price adjustment. It is read only.

creationDatestring (date-time)

The timestamp when the price adjustment was created. It is read only.

customboolean

A flag indicating whether this price adjustment was created by custom logic. This flag is set to true unless the price adjustment was created by the promotion engine.

itemTextstring

The text describing the item.

lastModifiedstring (date-time)

The timestamp when the price adjustment was last modified. It is read only.

manualboolean

A flag indicating whether this price adjustment was created by a manual process. If the price adjustment was created by the promotion engine, this value is always false.

pricenumber (double)

The adjustment price. It is read only.

priceAdjustmentIdany

The price adjustment ID. It is read only.

promotionIdstring

The ID of the related promotion. Custom price adjustments can be assigned any promotion ID so long it is not used by a price adjustment belonging to the same item, and is not used by a promotion defined in the promotion engine. If not specified, a promotion ID is generated.

reasonCodestring

The reason for the price adjustment.

orderTokenstring

The order token used to secure the lookup of an order on base of the plain order number. The order token contains only URL safe characters. It is read only.

orderTotalnumber (double)

The total price, including products, shipping, and tax. It is read only.

orderViewCodestring

The order view code used to secure the order lookup of an order using Order Lookup API. The order view code contains only URL safe characters. Warning : Order view code must not be exposed in the URL and must only be displayed to the shopper or sent as an email. Order view code must not be logged in the code. It is read only.

paymentInstrumentsarray<object>

The payment instruments list.

amountnumber (double)

The payment transaction amount.

authorizationStatusany

The authorization status of the payment transaction. It is read only.

bankRoutingNumberstring

The bank routing number.

maskedGiftCertificateCodestring

The gift certificate code with the last 4 characters not masked.

paymentCardany

The payment card.

giftCardany

The gift card.

paymentInstrumentIdany

The payment instrument ID. It is read only.

paymentMethodIdstring

The payment method ID. It is read only.

paymentReferenceobject3 fields

Payment reference information for various payment service providers, only when Salesforce Payments is enabled.

paymentStatusstring

The payment status.

One ofnot_paidpart_paidpaid

productItemsarray<object>

The product items. It is read only.

omsDataany

Product information retrieved from Order Management (OMS). Only available in the context of an order.

productSubTotalnumber (double)

The total price of all products including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

productTotalnumber (double)

The total price of all products in the shipment including item-level adjustments and prorated order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

taxRoundedAtGroupboolean

If the tax is rounded at the group level, this is set to true. If the tax is rounded at the item or unit level, it is set to false. It is read only.

shipmentsarray<object>

The shipments. It is read only.

adjustedMerchandizeTotalTaxnumber (double)

The total tax on products in the shipment, including item-level price adjustments but not including service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only.

adjustedShippingTotalTaxnumber (double)

The total tax on shipping charges in the shipment, including shipping price adjustments. It is read only.

giftboolean

A flag indicating whether the shipment is a gift. It is read only.

giftMessagestring

The gift message.

merchandizeTotalTaxnumber (double)

The total tax on products in the shipment, not including price adjustments or service charges such as shipping. It is read only.

productSubTotalnumber (double)

The total price of all products in the shipment, including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

productTotalnumber (double)

The total price of all products in the shipment including item-level adjustments and prorated order-level adjustments, but not including shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

shipmentIdany

The order-specific ID of the shipment. The default value is 'me'.

Default "me"

shipmentNostring

The shipment number of this shipment. This number is automatically generated. It is read only.

shipmentTotalnumber (double)

The total price of all products in the shipment including item-level adjustments, shipping charges, and tax. It is read only.

shippingAddressany

The shipping address.

shippingMethodobject6 fields

Document representing a shipping method.

shippingStatusstring

The shipping status of the shipment.

One ofnot_shippedshipped

shippingTotalnumber (double)

The total price of all shipping charges in the shipment, including shipping adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

shippingTotalTaxnumber (double)

The total tax on shipping charges in the shipment, not including shipping price adjustments. It is read only.

taxTotalnumber (double)

The total tax on the shipment, including item-level price adjustments and service charges such as shipping. If the Discount Taxation preference is set to Tax Products and Shipping Only Based on Adjusted Price, this amount also includes prorated order-level price adjustments. It is read only.

trackingNumberstring

The tracking number of the shipment.

shippingItemsarray<object>

The shipping items. It is read only.

adjustedTaxnumber (double)

The tax for the shipping item, including price adjustments. It is read only.

basePricenumber (double)

The base price of the shipping item, which is the unit price not including adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

itemIdstring

The shipping item ID. Use it to identify this shipping item when updating its quantity or creating a custom price adjustment for it. It is read only.

itemTextstring

The text describing the shipping item.

pricenumber (double)

The price of the line item before applying any adjustments. If the line item is based on net pricing then the net price is returned. If the line item is based on gross pricing then the gross price is returned. It is read only.

priceAdjustmentsarray<object>12 fields

The price adjustments.

priceAfterItemDiscountnumber (double)

The price of the shipping item including item-level adjustments, but not including order-level adjustments or shipping charges. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

shipmentIdany

The identifier of the shipment to which this item belongs.

taxnumber (double)

The tax on the product item, not including adjustments. It is read only.

taxBasisnumber (double)

The price used to calculate the tax for this shipping item. It is read only.

taxClassIdstring

The tax class ID for the product item, or null if no tax class ID is associated with the product item. It is read only.

taxRatenumber (double)

The tax rate applicable to this product line item. For a 10% tax rate, the value is 0.1. It is read only.

shippingStatusstring

The shipping status.

One ofnot_shippedpart_shippedshipped

shippingTotalnumber (double)

The total price of all shipping charges, including shipping adjustments. If the taxation policy is net, it doesn't include tax. If the taxation policy is gross, it includes tax. It is read only.

shippingTotalTaxnumber (double)

The total tax on all shipping charges, not including shipping adjustments. It is read only.

siteIdany

The order's site. It is read only.

omsDataany

Information retrieved from Order Management (OMS) for the order.

sourceCodestring

The source code assigned to the basket from which this order was created. It is read only.

statusstring

The status.

One ofcreatednewcompletedcancelledreplacedfailed

taxTotalnumber (double)

The total tax amount. It is read only.

taxationstring

The taxation policy (gross or net). It is read only.

One ofgrossnet

json
{
  "adjustedMerchandizeTotalTax": 1.5,
  "adjustedShippingTotalTax": 0.3,
  "billingAddress": null,
  "bonusDiscountLineItems": [
    {
      "bonusProducts": [
        {
          "productId": "apple-ipod-classic",
          "productDescription": "Nintendo DS revolutionizes handheld gameplay.",
          "productName": "Nintendo DS Game Console",
          "title": "Nintendo DS Game Console"
        }
      ],
      "couponCode": "5ties",
      "id": "91f4dd8bfa0653d58b7783b04f",
      "maxBonusItems": 0,
      "promotionId": "Buy1Get2"
    }
  ],
  "channelType": "storefront",
  "confirmationStatus": "confirmed",
  "couponItems": [
    {
      "code": "5ties",
      "couponItemId": null,
      "statusCode": "no_applicable_promotion",
      "valid": true
    }
  ],
  "createdBy": "Customer",
  "creationDate": "2015-05-19T15:23:18.000Z",
  "currency": null,
  "customerInfo": null,
  "customerName": "Max Mustermann"
}

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.