Shopify Native Actions - Orders
In this section, we will talk about the actions related to “Orders”. NicoChat supports the actions below, related to the customer:
- Get Shop Information
- Lookup discount code
- Create discount code
- Search for draft orders
- Create draft order for one product
- Create draft order for multiple products
- Create draft order with custom products
- Send an invoice for the draft order
- Apply discount to draft order
- Complete draft order
- Get draft order information
- Get order information
Now, let’s go over these actions one by one.
Get Shop Information
This action is used to display information about your Shopify store.
Input
.webp)
Response Payload
"shop": {
"id": 1763672130,
"name": "CONNECTDOTS DEMO STORE",
"email": "matthew@NicoChat.com.br",
"domain": "NicoChat Shopify Demo ",
"province": "Queensland",
"country": "AU",
"address1": "49 payne st",
"zip": "4068",
"city": "indooroopilly",
"phone": "0422213688",
"latitude": -27.4940251,
"longitude": 152.9733169,
"primary_locale": "en",
"address2": "",
"country_code": "AU",
"country_name": "Australia",
"currency": "AUD",
"customer_email": "matthew@NicoChat.com.br",
"timezone": "(GMT-05:00) America/New_York",
"iana_timezone": "America/New_York",
"shop_owner": "CONNECTDOTS DEMO STORE Admin",
"myshopify_domain": "NicoChat Shopify Demo "
}
}
"shop": {
"id": 1763672130,
"name": "CONNECTDOTS DEMO STORE",
"email": "matthew@NicoChat.com.br",
"domain": "NicoChat Shopify Demo ",
"province": "Queensland",
"country": "AU",
"address1": "49 payne st",
"zip": "4068",
"city": "indooroopilly",
"phone": "0422213688",
"latitude": -27.4940251,
"longitude": 152.9733169,
"primary_locale": "en",
"address2": "",
"country_code": "AU",
"country_name": "Australia",
"currency": "AUD",
"customer_email": "matthew@NicoChat.com.br",
"timezone": "(GMT-05:00) America/New_York",
"iana_timezone": "America/New_York",
"shop_owner": "CONNECTDOTS DEMO STORE Admin",
"myshopify_domain": "NicoChat Shopify Demo "
}
}
Create draft order for one product
This action is used to create a draft order for a customer, using the customer ID and the product variant ID.
Input

Response Payload
"draft_order": {
"id": 932211818562,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "2023-04-06T23:21:38-04:00",
"updated_at": "2023-04-06T23:21:38-04:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D127",
"status": "open",
"line_items": [
{...} // 20 keys
],
"shipping_address": null,
"billing_address": null,
"invoice_url": "NicoChat Shopify Demo ",
"applied_discount": null,
"order_id": null,
"shipping_line": null,
"tax_lines": [
],
"tags": "",
"note_attributes": [
],
"total_price": "45.90",
"subtotal_price": "45.90",
"total_tax": "0.00",
"payment_terms": null,
"admin_graphql_api_id": "gid://shopify/DraftOrder/932211818562"
}
}
"draft_order": {
"id": 932211818562,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "2023-04-06T23:21:38-04:00",
"updated_at": "2023-04-06T23:21:38-04:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D127",
"status": "open",
"line_items": [
{...} // 20 keys
],
"shipping_address": null,
"billing_address": null,
"invoice_url": "NicoChat Shopify Demo ",
"applied_discount": null,
"order_id": null,
"shipping_line": null,
"tax_lines": [
],
"tags": "",
"note_attributes": [
],
"total_price": "45.90",
"subtotal_price": "45.90",
"total_tax": "0.00",
"payment_terms": null,
"admin_graphql_api_id": "gid://shopify/DraftOrder/932211818562"
}
}
Create draft order for multiple products
This action is used to create a draft order that includes multiple products, using the customer ID.
Input

Response Payload
"draft_order": {
"id": 932213981250,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "2023-04-07T00:18:51-04:00",
"updated_at": "2023-04-07T00:18:51-04:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D128",
"status": "open",
"line_items": [
{...} // 20 keys
],
"shipping_address": null,
"billing_address": null,
"invoice_url": "NicoChat Shopify Demo ",
"applied_discount": null,
"order_id": null,
"shipping_line": null,
"tax_lines": [
],
"tags": "",
"note_attributes": [
],
"total_price": "45.90",
"subtotal_price": "45.90",
"total_tax": "0.00",
"payment_terms": null,
"admin_graphql_api_id": "gid://shopify/DraftOrder/932213981250"
}
}
"draft_order": {
"id": 932213981250,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "2023-04-07T00:18:51-04:00",
"updated_at": "2023-04-07T00:18:51-04:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D128",
"status": "open",
"line_items": [
{...} // 20 keys
],
"shipping_address": null,
"billing_address": null,
"invoice_url": "NicoChat Shopify Demo ",
"applied_discount": null,
"order_id": null,
"shipping_line": null,
"tax_lines": [
],
"tags": "",
"note_attributes": [
],
"total_price": "45.90",
"subtotal_price": "45.90",
"total_tax": "0.00",
"payment_terms": null,
"admin_graphql_api_id": "gid://shopify/DraftOrder/932213981250"
}
}
Create draft order with custom product
This action is used to create a draft order with a custom product.
Input

Response Payload
"draft_order": {
"id": 932221059138,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "2023-04-07T04:17:52-04:00",
"updated_at": "2023-04-07T04:17:52-04:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D129",
"status": "open",
"line_items": [
{...} // 20 keys
],
"shipping_address": null,
"billing_address": null,
"invoice_url": "https://connectdots-demo-store.myshopify.com/1763672130/invoices/dde50cad201cc7a8b29434e65e517f00",
"applied_discount": null,
"order_id": null,
"shipping_line": null,
"tax_lines": [
{...} // 3 keys
],
"tags": "",
"note_attributes": [
],
"total_price": "22.00",
"subtotal_price": "20.00",
"total_tax": "2.00",
"payment_terms": null,
"admin_graphql_api_id": "gid://shopify/DraftOrder/932221059138"
}
}
"draft_order": {
"id": 932221059138,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "2023-04-07T04:17:52-04:00",
"updated_at": "2023-04-07T04:17:52-04:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D129",
"status": "open",
"line_items": [
{...} // 20 keys
],
"shipping_address": null,
"billing_address": null,
"invoice_url": "https://connectdots-demo-store.myshopify.com/1763672130/invoices/dde50cad201cc7a8b29434e65e517f00",
"applied_discount": null,
"order_id": null,
"shipping_line": null,
"tax_lines": [
{...} // 3 keys
],
"tags": "",
"note_attributes": [
],
"total_price": "22.00",
"subtotal_price": "20.00",
"total_tax": "2.00",
"payment_terms": null,
"admin_graphql_api_id": "gid://shopify/DraftOrder/932221059138"
}
}
Send an invoice for the draft order
This action is used to send the customer the invoice for the draft order created. Note that the email used to send it must belong to someone on the staff or to someone with staff privileges.
Input

Response Payload
"draft_order_invoice": {
"to": "hammadsiddiqui788@gmail.com",
"from": "matthew6688@gmail.com",
"subject": "Invoice",
"custom_message": "This is a test message",
"bcc": [
]
}
}
"draft_order_invoice": {
"to": "hammadsiddiqui788@gmail.com",
"from": "matthew6688@gmail.com",
"subject": "Invoice",
"custom_message": "This is a test message",
"bcc": [
]
}
}
Apply discount to a draft order
This action is used to apply a discount offer or code to an existing draft order.
Input

Response Payload
"draft_order": {
"id": 932221059138,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": "2023-04-07T04:24:24-04:00",
"created_at": "2023-04-07T04:17:52-04:00",
"updated_at": "2023-04-07T04:29:06-04:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D129",
"status": "invoice_sent",
"line_items": [
{...} // 20 keys
],
"shipping_address": null,
"billing_address": null,
"invoice_url": "https://connectdots-demo-store.myshopify.com/1763672130/invoices/dde50cad201cc7a8b29434e65e517f00",
"applied_discount": {
"description": "Start of summer clearance",
"value": "20.0",
"title": "Summer sale",
"amount": "4.00",
"value_type": "percentage"
},
"order_id": null,
"shipping_line": null,
"tax_lines": [
{...} // 3 keys
],
"tags": "",
"note_attributes": [
],
"total_price": "17.60",
"subtotal_price": "16.00",
"total_tax": "1.60",
"payment_terms": null,
"admin_graphql_api_id": "gid://shopify/DraftOrder/932221059138"
}
}
"draft_order": {
"id": 932221059138,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": "2023-04-07T04:24:24-04:00",
"created_at": "2023-04-07T04:17:52-04:00",
"updated_at": "2023-04-07T04:29:06-04:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D129",
"status": "invoice_sent",
"line_items": [
{...} // 20 keys
],
"shipping_address": null,
"billing_address": null,
"invoice_url": "https://connectdots-demo-store.myshopify.com/1763672130/invoices/dde50cad201cc7a8b29434e65e517f00",
"applied_discount": {
"description": "Start of summer clearance",
"value": "20.0",
"title": "Summer sale",
"amount": "4.00",
"value_type": "percentage"
},
"order_id": null,
"shipping_line": null,
"tax_lines": [
{...} // 3 keys
],
"tags": "",
"note_attributes": [
],
"total_price": "17.60",
"subtotal_price": "16.00",
"total_tax": "1.60",
"payment_terms": null,
"admin_graphql_api_id": "gid://shopify/DraftOrder/932221059138"
}
}
Complete draft order
This action is used to mark a draft order as paid or unpaid.
Input

Response Payload
"draft_order": {
"id": 932221059138,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": "2023-04-07T04:24:24-04:00",
"created_at": "2023-04-07T04:17:52-04:00",
"updated_at": "2023-04-07T04:35:41-04:00",
"tax_exempt": false,
"completed_at": "2023-04-07T04:35:41-04:00",
"name": "#D129",
"status": "completed",
"line_items": [
{...} // 20 keys
],
"shipping_address": null,
"billing_address": null,
"invoice_url": "https://connectdots-demo-store.myshopify.com/1763672130/invoices/dde50cad201cc7a8b29434e65e517f00",
"applied_discount": {
"description": "Start of summer clearance",
"value": "20.0",
"title": "Summer sale",
"amount": "4.00",
"value_type": "percentage"
},
"order_id": 4877204291650,
"shipping_line": null,
"tax_lines": [
{...} // 3 keys
],
"tags": "",
"note_attributes": [
],
"total_price": "17.60",
"subtotal_price": "16.00",
"total_tax": "1.60",
"payment_terms": null,
"admin_graphql_api_id": "gid://shopify/DraftOrder/932221059138"
}
}
"draft_order": {
"id": 932221059138,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": "2023-04-07T04:24:24-04:00",
"created_at": "2023-04-07T04:17:52-04:00",
"updated_at": "2023-04-07T04:35:41-04:00",
"tax_exempt": false,
"completed_at": "2023-04-07T04:35:41-04:00",
"name": "#D129",
"status": "completed",
"line_items": [
{...} // 20 keys
],
"shipping_address": null,
"billing_address": null,
"invoice_url": "https://connectdots-demo-store.myshopify.com/1763672130/invoices/dde50cad201cc7a8b29434e65e517f00",
"applied_discount": {
"description": "Start of summer clearance",
"value": "20.0",
"title": "Summer sale",
"amount": "4.00",
"value_type": "percentage"
},
"order_id": 4877204291650,
"shipping_line": null,
"tax_lines": [
{...} // 3 keys
],
"tags": "",
"note_attributes": [
],
"total_price": "17.60",
"subtotal_price": "16.00",
"total_tax": "1.60",
"payment_terms": null,
"admin_graphql_api_id": "gid://shopify/DraftOrder/932221059138"
}
}
Delete draft order
This action is used to delete the draft order using the draft order ID.
Input

Response Payload
]
]
Get draft order information
This action is used to fetch information for a specific draft order, using the draft order ID.
Input

Response Payload
"draft_order": {
"id": 932222074946,
"note": "",
"email": null,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "2023-04-07T04:44:07-04:00",
"updated_at": "2023-04-07T04:44:07-04:00",
"status": "open",
"line_items": [
{...} // 20 keys
],
"invoice_url": "NicoChat Shopify Demo ",
"subtotal_price": "20.00"
}
}
"draft_order": {
"id": 932222074946,
"note": "",
"email": null,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "2023-04-07T04:44:07-04:00",
"updated_at": "2023-04-07T04:44:07-04:00",
"status": "open",
"line_items": [
{...} // 20 keys
],
"invoice_url": "NicoChat Shopify Demo ",
"subtotal_price": "20.00"
}
}
Get order information
This action is used to fetch information for a specific order, using the order ID.
Input

Response Payload
"order": {
"id": 4861820502082,
"cancelled_at": null,
"closed_at": null,
"confirmed": true,
"contact_email": "hammadsiddiqui788@gmail.com",
"created_at": "2023-03-27T18:03:31-04:00",
"currency": "AUD",
"email": "hammadsiddiqui788@gmail.com",
"financial_status": "pending",
"fulfillment_status": null,
"name": "#1036",
"number": 36,
"order_number": 1036,
"order_status_url": "Thank you Test! - CONNECTDOTS DEMO STORE - Checkout",
"phone": null,
"processed_at": "2023-03-27T18:03:30-04:00",
"reference": "019761d686838bd5f9056c44b791e4ac",
"subtotal_price": "24.87",
"tax_lines": [
],
"total_discounts": "0.00",
"total_line_items_price": "24.87",
"total_price": "44.87",
"updated_at": "2023-03-27T18:03:32-04:00"
}
}
"order": {
"id": 4861820502082,
"cancelled_at": null,
"closed_at": null,
"confirmed": true,
"contact_email": "hammadsiddiqui788@gmail.com",
"created_at": "2023-03-27T18:03:31-04:00",
"currency": "AUD",
"email": "hammadsiddiqui788@gmail.com",
"financial_status": "pending",
"fulfillment_status": null,
"name": "#1036",
"number": 36,
"order_number": 1036,
"order_status_url": "Thank you Test! - CONNECTDOTS DEMO STORE - Checkout",
"phone": null,
"processed_at": "2023-03-27T18:03:30-04:00",
"reference": "019761d686838bd5f9056c44b791e4ac",
"subtotal_price": "24.87",
"tax_lines": [
],
"total_discounts": "0.00",
"total_line_items_price": "24.87",
"total_price": "44.87",
"updated_at": "2023-03-27T18:03:32-04:00"
}
}

