Rule Effect
orderCommand
Back to IndexReturn this effect to apply an order command from hooks that supports it.
Type
{ effect: 'orderCommand' type: text // Command type // Additional command properties are added here}Order Commands
| addActivityLog | Adds an activity log to an Order |
| addDeliveryTag | Adds a tag to a Delivery |
| addTag | Adds a tag to an Order |
| cancelDelivery | Cancels a delivery. |
| cancelInvoice | Cancels an Invoice |
| completeDelivery | Marks a delivery as completed. |
| createComputedOrderDiscount | Adds a new computed Order Discount to an Order based on a component |
| createComputedOrderDiscountBySource | Adds a new computed Order Discount to an Order using an embedded source code for the logic |
| createDelivery | Adds a new Delivery to an Order |
| createOrderLine | Creates a new Order Row |
| createReturn | Creates a Return for a specific Order Row |
| createStaticOrderDiscount | Creates a static discount on an Order. An order discount value is distributed across all order lines and shipping fees proportionally to their value. |
| createStaticOrderLineDiscount | Creates a static discount on an order line |
| createStaticShippingDiscount | Creates a static discount on a shipping fee |
| deleteDiscount | Deletes an existing Discount from an Order |
| deleteOrderLine | Deletes an existing Order Row |
| deleteReturn | Deletes and existing Return |
| generateOrderNumberByPrefix | Generates an order number for an order based on the given prefix |
| invoice | Invoices all entities released for invoicing on the Order. |
| linkPayment | Associates a Payment with an Order |
| releaseDelivery | Releases a delivery for fulfillment processing. |
| releaseOrderLineToInvoicing | Releases an order line to be invoiced. |
| releaseShippingToInvoicing | Releases a delivery's shipping fee to be invoiced. |
| removeDeliveryTag | Removes a tag from a Delivery |
| removeTag | Removes a tag from an Order |
| retractOrderLineFromInvoicing | Unreleases an order line from invoicing. |
| retractShippingFromInvoicing | Unreleases a delivery's shipping fee from invoicing. |
| setChannelKey | Sets the channel key of an order. |
| setComputedOrderDiscountParameters | Sets a computed order discount's parameters |
| setCustomerNumber | Sets the customer number of an order. |
| setDeliveryAddress | Sets the Address of a Delivery |
| setDeliveryDynamicFields | Sets dynamic fields of a delivery. Non specified fields will be left unchanged. Set value to null to remove field. |
| setDeliveryInventory | Sets the inventory and inventory date of a Delivery. Stock reservations will be updated if there are any. |
| setDiscountDescription | Sets description of discount. Should be meaningful to the customer as it's used on invoices and customer communication. |
| setDiscountDynamicFields | Sets dynamic fields of a discount. Non specified fields will be left unchanged. Set value to null to remove field. |
| setInvoiceAddress | Sets the invoice address of an Order which will be used for new invoices |
| setLocale | Set the locale of the Order. Nothing else will be affected. |
| setNotes | Set the notes of the Order. |
| setOrderDynamicFields | Sets dynamic fields of an order. Non specified fields will be left unchanged. Set value to null to remove field. |
| setOrderLineDynamicFields | Sets dynamic fields of an order line. Non specified fields will be left unchanged. Set value to null to remove field. |
| setOrderLineProduct | Sets the product of an Order Line. |
| setOrderLineQuantity | Sets the quantity of an Order Line |
| setOrderLineSkus | Sets the required quantities of SKUs on an Order Line |
| setOrderLineTax | Sets the tax of an Order Line, either by a fixed total (taxTotal) or a percentage (taxFactor). |
| setOrderLineUnitPrice | Sets the unit price of an Order Line. |
| setOrderState | Sets the state of an Order |
| setReturnDynamicFields | Sets dynamic fields of a return. Non specified fields will be left unchanged. Set value to null to remove field. |
| setShippingPrice | Sets the shipping price of a Delivery. |
| setShippingProduct | Sets the shipping product of a Delivery. |
| setShippingTax | Sets the tax percentage factor of a a Delivery's shipping cost. |
| setStaticDiscountValue | Updates the value of an existing static discount |
| unsetDeliveryInventory | Removes the inventory from a Delivery. Stock reservations will be updated if there are any. |