2022-08-17 08:50:24 -07:00
import { INodeProperties } from 'n8n-workflow' ;
2020-04-23 17:56:53 -07:00
2021-12-03 00:44:16 -08:00
export const orderOperations : INodeProperties [ ] = [
2020-04-23 17:56:53 -07:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2020-04-23 17:56:53 -07:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'order' ] ,
2020-04-23 17:56:53 -07:00
} ,
} ,
options : [
{
name : 'Create' ,
value : 'create' ,
description : 'Create an order' ,
2022-07-10 13:50:51 -07:00
action : 'Create an order' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Delete' ,
value : 'delete' ,
description : 'Delete an order' ,
2022-07-10 13:50:51 -07:00
action : 'Delete an order' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Get' ,
value : 'get' ,
description : 'Get an order' ,
2022-07-10 13:50:51 -07:00
action : 'Get an order' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Get All' ,
value : 'getAll' ,
description : 'Get all orders' ,
2022-07-10 13:50:51 -07:00
action : 'Get all orders' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Update' ,
value : 'update' ,
description : 'Update an order' ,
2022-07-10 13:50:51 -07:00
action : 'Update an order' ,
2020-04-23 17:56:53 -07:00
} ,
] ,
default : 'create' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-04-23 17:56:53 -07:00
2021-12-03 00:44:16 -08:00
export const orderFields : INodeProperties [ ] = [
2020-08-10 05:44:18 -07:00
/* -------------------------------------------------------------------------- */
/* order:create */
/* -------------------------------------------------------------------------- */
2020-04-23 17:56:53 -07:00
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'create' ] ,
resource : [ 'order' ] ,
2020-04-23 17:56:53 -07:00
} ,
} ,
default : { } ,
options : [
{
displayName : 'Billing Address' ,
name : 'billingAddressUi' ,
placeholder : 'Add Billing Address' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-04-23 17:56:53 -07:00
typeOptions : {
multipleValues : false ,
} ,
options : [
{
name : 'billingAddressValues' ,
displayName : 'Billing Address' ,
values : [
{
displayName : 'First Name' ,
name : 'firstName' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Last Name' ,
name : 'lastName' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Company' ,
name : 'company' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Country' ,
name : 'country' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Address Line 1' ,
name : 'address1' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Address Line 2' ,
name : 'address2' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'City' ,
name : 'city' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Province' ,
name : 'province' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Zip Code' ,
name : 'zip' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Phone' ,
name : 'phone' ,
type : 'string' ,
default : '' ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Discount Codes' ,
name : 'discountCodesUi' ,
placeholder : 'Add Discount Code' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-04-23 17:56:53 -07:00
typeOptions : {
multipleValues : true ,
} ,
options : [
{
name : 'discountCodesValues' ,
displayName : 'Discount Code' ,
values : [
{
displayName : 'Amount' ,
name : 'amount' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description : "The amount that's deducted from the order total" ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Code' ,
name : 'code' ,
type : 'string' ,
default : '' ,
description : 'When the associated discount application is of type code' ,
} ,
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
options : [
{
name : 'Fixed Amount' ,
value : 'fixedAmount' ,
2022-08-17 08:50:24 -07:00
description : "Applies amount as a unit of the store's currency" ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Percentage' ,
value : 'percentage' ,
2022-05-06 14:01:25 -07:00
description : 'Applies a discount of amount as a percentage of the order total' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Shipping' ,
value : 'shipping' ,
2022-08-17 08:50:24 -07:00
description :
'Applies a free shipping discount on orders that have a shipping rate less than or equal to amount' ,
2020-04-23 17:56:53 -07:00
} ,
] ,
default : 'fixedAmount' ,
description : 'When the associated discount application is of type code' ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Email' ,
name : 'email' ,
type : 'string' ,
2022-06-20 07:54:01 -07:00
placeholder : 'name@email.com' ,
2020-04-23 17:56:53 -07:00
default : '' ,
2022-08-17 08:50:24 -07:00
description : "The customer's email address" ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Fulfillment Status' ,
name : 'fulfillmentStatus' ,
type : 'options' ,
options : [
{
name : 'Fulfilled' ,
value : 'fulfilled' ,
2022-05-06 14:01:25 -07:00
description : 'Every line item in the order has been fulfilled' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Null' ,
value : 'null' ,
2022-05-06 14:01:25 -07:00
description : 'None of the line items in the order have been fulfilled' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Partial' ,
value : 'partial' ,
2022-05-06 14:01:25 -07:00
description : 'At least one line item in the order has been fulfilled' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Restocked' ,
value : 'restocked' ,
2022-05-06 14:01:25 -07:00
description : 'Every line item in the order has been restocked and the order canceled' ,
2020-04-23 17:56:53 -07:00
} ,
] ,
default : '' ,
2022-08-17 08:50:24 -07:00
description : "The order's status in terms of fulfilled line items" ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Inventory Behaviour' ,
name : 'inventoryBehaviour' ,
type : 'options' ,
options : [
{
name : 'Bypass' ,
value : 'bypass' ,
2022-05-06 14:01:25 -07:00
description : 'Do not claim inventory' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Decrement Ignoring Policy' ,
value : 'decrementIgnoringPolicy' ,
2022-08-17 08:50:24 -07:00
description : "Ignore the product's inventory policy and claim inventory" ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Decrement Obeying Policy' ,
value : 'decrementObeyingPolicy' ,
2022-08-17 08:50:24 -07:00
description : "Follow the product's inventory policy and claim inventory, if possible" ,
2020-04-23 17:56:53 -07:00
} ,
] ,
default : 'bypass' ,
2022-05-06 14:01:25 -07:00
description : 'The behaviour to use when updating inventory' ,
2020-04-23 17:56:53 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Location Name or ID' ,
2020-04-23 17:56:53 -07:00
name : 'locationId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getLocations' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The ID of the physical location where the order was processed. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Note' ,
name : 'note' ,
type : 'string' ,
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'An optional note that a shop owner can attach to the order' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Send Fulfillment Receipt' ,
name : 'sendFulfillmentReceipt' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to send a shipping confirmation to the customer' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Send Receipt' ,
name : 'sendReceipt' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to send an order confirmation to the customer' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Shipping Address' ,
name : 'shippingAddressUi' ,
placeholder : 'Add Shipping' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-04-23 17:56:53 -07:00
typeOptions : {
multipleValues : false ,
} ,
options : [
{
name : 'shippingAddressValues' ,
2022-06-03 10:23:49 -07:00
displayName : 'Shipping Address' ,
2020-04-23 17:56:53 -07:00
values : [
{
displayName : 'First Name' ,
name : 'firstName' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Last Name' ,
name : 'lastName' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Company' ,
name : 'company' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Country' ,
name : 'country' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Address Line 1' ,
name : 'address1' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Address Line 2' ,
name : 'address2' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'City' ,
name : 'city' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Province' ,
name : 'province' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Zip Code' ,
name : 'zip' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Phone' ,
name : 'phone' ,
type : 'string' ,
default : '' ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Source Name' ,
name : 'sourceName' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Where the order originated. Can be set only during order creation, and is not writeable afterwards.' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Tags' ,
name : 'tags' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Tags attached to the order, formatted as a string of comma-separated values' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Test' ,
name : 'test' ,
type : 'boolean' ,
2022-04-22 09:29:51 -07:00
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether this is a test order' ,
2020-04-23 17:56:53 -07:00
} ,
] ,
} ,
{
displayName : 'Line Items' ,
name : 'limeItemsUi' ,
placeholder : 'Add Line Item' ,
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'order' ] ,
operation : [ 'create' ] ,
2020-04-23 17:56:53 -07:00
} ,
} ,
default : { } ,
options : [
{
displayName : 'Line Item' ,
name : 'lineItemValues' ,
values : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Product Name or ID' ,
2020-04-23 17:56:53 -07:00
name : 'productId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getProducts' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The ID of the product that the line item belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Variant ID' ,
name : 'variantId' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The ID of the product variant' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Title' ,
name : 'title' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The title of the product' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Grams' ,
name : 'grams' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The weight of the item in grams' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Quantity' ,
name : 'quantity' ,
type : 'number' ,
typeOptions : {
minValue : 1 ,
} ,
default : 1 ,
2022-05-06 14:01:25 -07:00
description : 'The number of items that were purchased' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Price' ,
name : 'price' ,
type : 'string' ,
default : '' ,
} ,
] ,
} ,
] ,
} ,
2020-08-10 05:44:18 -07:00
/* -------------------------------------------------------------------------- */
/* order:delete */
/* -------------------------------------------------------------------------- */
2020-04-23 17:56:53 -07:00
{
displayName : 'Order ID' ,
name : 'orderId' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'order' ] ,
operation : [ 'delete' ] ,
2020-04-23 17:56:53 -07:00
} ,
} ,
required : true ,
} ,
2020-08-10 05:44:18 -07:00
/* -------------------------------------------------------------------------- */
/* order:get */
/* -------------------------------------------------------------------------- */
2020-04-23 17:56:53 -07:00
{
displayName : 'Order ID' ,
name : 'orderId' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'order' ] ,
operation : [ 'get' ] ,
2020-04-23 17:56:53 -07:00
} ,
} ,
required : true ,
} ,
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Field' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'get' ] ,
resource : [ 'order' ] ,
2020-04-23 17:56:53 -07:00
} ,
} ,
default : { } ,
options : [
{
displayName : 'Fields' ,
name : 'fields' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Fields the order will return, formatted as a string of comma-separated values. By default all the fields are returned.' ,
2020-04-23 17:56:53 -07:00
} ,
] ,
} ,
2020-08-10 05:44:18 -07:00
/* -------------------------------------------------------------------------- */
/* order:getAll */
/* -------------------------------------------------------------------------- */
2020-04-23 17:56:53 -07:00
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'order' ] ,
operation : [ 'getAll' ] ,
2020-04-23 17:56:53 -07:00
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'order' ] ,
operation : [ 'getAll' ] ,
returnAll : [ false ] ,
2020-04-23 17:56:53 -07:00
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 250 ,
} ,
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'getAll' ] ,
resource : [ 'order' ] ,
2020-04-23 17:56:53 -07:00
} ,
} ,
options : [
{
displayName : 'Attribution App ID' ,
name : 'attributionAppId' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Show orders attributed to a certain app, specified by the app ID. Set as current to show orders for the app currently consuming the API.' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Created At Min' ,
name : 'createdAtMin' ,
type : 'dateTime' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Show orders created at or after date' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Created At Max' ,
name : 'createdAtMax' ,
type : 'dateTime' ,
default : '' ,
description : 'Show orders created at or before date' ,
} ,
{
displayName : 'Financial Status' ,
name : 'financialStatus' ,
type : 'options' ,
options : [
{
name : 'Any' ,
value : 'any' ,
2022-05-06 14:01:25 -07:00
description : 'Show orders of any financial status' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Authorized' ,
value : 'authorized' ,
description : 'Show only authorized orders' ,
} ,
{
name : 'Paid' ,
value : 'paid' ,
description : 'Show only paid orders' ,
} ,
{
name : 'Partially Paid' ,
value : 'partiallyPaid' ,
description : 'Show only partially paid orders' ,
} ,
{
name : 'Partially Refunded' ,
value : 'partiallyRefunded' ,
description : 'Show only partially refunded orders' ,
} ,
{
name : 'Pending' ,
value : 'pending' ,
description : 'Show only pending orders' ,
} ,
{
name : 'Refunded' ,
value : 'refunded' ,
description : 'Show only refunded orders' ,
} ,
{
name : 'Unpaid' ,
value : 'unpaid' ,
2022-05-06 14:01:25 -07:00
description : 'Show authorized and partially paid orders' ,
2020-04-23 17:56:53 -07:00
} ,
2022-06-03 10:23:49 -07:00
{
name : 'Voided' ,
value : 'voided' ,
description : 'Show only voided orders' ,
} ,
2020-04-23 17:56:53 -07:00
] ,
default : 'any' ,
2022-05-06 14:01:25 -07:00
description : 'Filter orders by their financial status' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Fulfillment Status' ,
name : 'fulfillmentStatus' ,
type : 'options' ,
options : [
{
name : 'Any' ,
value : 'any' ,
2022-05-06 14:01:25 -07:00
description : 'Show orders of any fulfillment status' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Partial' ,
value : 'partial' ,
2022-05-06 14:01:25 -07:00
description : 'Show partially shipped orders' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Shipped' ,
value : 'shipped' ,
2022-08-17 08:50:24 -07:00
description :
'Show orders that have been shipped. Returns orders with fulfillment_status of fulfilled.' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Unfulfilled' ,
value : 'unfulfilled' ,
2022-05-06 14:01:25 -07:00
description : 'Returns orders with fulfillment_status of null or partial' ,
2020-04-23 17:56:53 -07:00
} ,
2022-06-03 10:23:49 -07:00
{
name : 'Unshipped' ,
value : 'unshipped' ,
2022-08-17 08:50:24 -07:00
description :
'Show orders that have not yet been shipped. Returns orders with fulfillment_status of null.' ,
2022-06-03 10:23:49 -07:00
} ,
2020-04-23 17:56:53 -07:00
] ,
default : 'any' ,
2022-05-06 14:01:25 -07:00
description : 'Filter orders by their fulfillment status' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Fields' ,
name : 'fields' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Fields the orders will return, formatted as a string of comma-separated values. By default all the fields are returned.' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'IDs' ,
name : 'ids' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Retrieve only orders specified by a comma-separated list of order IDs' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Processed At Max' ,
name : 'processedAtMax' ,
type : 'dateTime' ,
default : '' ,
description : 'Show orders imported at or before date' ,
} ,
{
displayName : 'Processed At Min' ,
name : 'processedAtMin' ,
type : 'dateTime' ,
default : '' ,
description : 'Show orders imported at or after date' ,
} ,
{
displayName : 'Status' ,
name : 'status' ,
type : 'options' ,
options : [
{
name : 'Any' ,
value : 'any' ,
2022-05-06 14:01:25 -07:00
description : 'Show orders of any status, including archived orders' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Cancelled' ,
value : 'Cancelled' ,
2022-05-06 14:01:25 -07:00
description : 'Show only canceled orders' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Closed' ,
value : 'closed' ,
2022-05-06 14:01:25 -07:00
description : 'Show only closed orders' ,
2020-04-23 17:56:53 -07:00
} ,
{
name : 'Open' ,
value : 'open' ,
2022-05-06 14:01:25 -07:00
description : 'Show only open orders' ,
2020-04-23 17:56:53 -07:00
} ,
] ,
default : 'open' ,
2022-05-06 14:01:25 -07:00
description : 'Filter orders by their status' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Since ID' ,
name : 'sinceId' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Show orders after the specified ID' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Updated At Max' ,
name : 'updatedAtMax' ,
type : 'dateTime' ,
default : '' ,
description : 'Show orders last updated at or after date' ,
} ,
{
displayName : 'Updated At Min' ,
name : 'updatedAtMin' ,
type : 'dateTime' ,
default : '' ,
description : 'Show orders last updated at or before date' ,
} ,
] ,
} ,
2020-08-10 05:44:18 -07:00
/* -------------------------------------------------------------------------- */
/* order:update */
/* -------------------------------------------------------------------------- */
2020-04-23 17:56:53 -07:00
{
displayName : 'Order ID' ,
name : 'orderId' ,
type : 'string' ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'order' ] ,
operation : [ 'update' ] ,
2020-04-23 17:56:53 -07:00
} ,
} ,
required : true ,
} ,
{
displayName : 'Update Fields' ,
name : 'updateFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
operation : [ 'update' ] ,
resource : [ 'order' ] ,
2020-04-23 17:56:53 -07:00
} ,
} ,
default : { } ,
options : [
{
displayName : 'Email' ,
name : 'email' ,
type : 'string' ,
2022-06-20 07:54:01 -07:00
placeholder : 'name@email.com' ,
2020-04-23 17:56:53 -07:00
default : '' ,
2022-08-17 08:50:24 -07:00
description : "The customer's email address" ,
2020-04-23 17:56:53 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Location Name or ID' ,
2020-04-23 17:56:53 -07:00
name : 'locationId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getLocations' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The ID of the physical location where the order was processed. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Note' ,
name : 'note' ,
type : 'string' ,
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'An optional note that a shop owner can attach to the order' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Shipping Address' ,
name : 'shippingAddressUi' ,
placeholder : 'Add Shipping' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-04-23 17:56:53 -07:00
typeOptions : {
multipleValues : false ,
} ,
options : [
{
name : 'shippingAddressValues' ,
2022-06-03 10:23:49 -07:00
displayName : 'Shipping Address' ,
2020-04-23 17:56:53 -07:00
values : [
{
displayName : 'First Name' ,
name : 'firstName' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Last Name' ,
name : 'lastName' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Company' ,
name : 'company' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Country' ,
name : 'country' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Address Line 1' ,
name : 'address1' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Address Line 2' ,
name : 'address2' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'City' ,
name : 'city' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Province' ,
name : 'province' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Zip Code' ,
name : 'zip' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Phone' ,
name : 'phone' ,
type : 'string' ,
default : '' ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Source Name' ,
name : 'sourceName' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Where the order originated. Can be set only during order creation, and is not writeable afterwards.' ,
2020-04-23 17:56:53 -07:00
} ,
{
displayName : 'Tags' ,
name : 'tags' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Tags attached to the order, formatted as a string of comma-separated values' ,
2020-04-23 17:56:53 -07:00
} ,
] ,
} ,
2021-12-03 00:44:16 -08:00
] ;