Skip to content
FlexiPedia logo

Shopify Native Actions - Orders

Flexito OmniAI streamlines your Shopify order management with a suite of powerful actions. Whether you're creating draft orders, applying discounts, or fetching order details, our tools simplify these processes, saving you time and effort. Discover how each action can enhance you

Flexito OmniAI
Beginnerv4
Read in:

Listen to an audio overview

A short, AI-generated podcast-style summary of this article.

Flexito OmniAI streamlines your Shopify order management with a suite of powerful actions. Whether you're creating draft orders, applying discounts, or fetching order details, our tools simplify these processes, saving you time and effort. Discover how each action can enhance your workflow and improve customer satisfaction.

In this section, we'll explore the various order-related actions supported by Flexito OmniAI for customer management.

  • Retrieve shop information

  • Check discount code

  • Generate discount code

  • Find draft orders

  • Create draft order for a single product

  • Create draft order for multiple products

  • Create draft order with custom products

  • Issue an invoice for the draft order

  • Apply a discount to a draft order

  • Finalize draft order

  • Retrieve draft order details

  • Retrieve order details

Let's examine each of these actions in detail.

  • Input details (#ShopifyNativeActions-Orders-Input.1)

  • Response details (#ShopifyNativeActions-Orders-ResponsePayload.1)

  • Input details (#ShopifyNativeActions-Orders-Input.2)

  • Response details (#ShopifyNativeActions-Orders-ResponsePayload.2)

  • Input details (#ShopifyNativeActions-Orders-Input.3)

  • Response details (#ShopifyNativeActions-Orders-ReponsePayload)

  • Input details (#ShopifyNativeActions-Orders-Input.4)

  • Response details (#ShopifyNativeActions-Orders-ResponsePayload.3)

  • Input details (#ShopifyNativeActions-Orders-Input.5)

  • Response details (#ShopifyNativeActions-Orders-ResponsePayload.4)

  • Input details (#ShopifyNativeActions-Orders-Input.6)

  • Response details (#ShopifyNativeActions-Orders-ResponsePayload.5)

  • Input details (#ShopifyNativeActions-Orders-Input.7)

  • Response details (#ShopifyNativeActions-Orders-ResponsePayload.6)

  • Input details (#ShopifyNativeActions-Orders-Input.8)

  • Response details (#ShopifyNativeActions-Orders-ResponsePayload.7)

Retrieve Shop Information

Use this action to access information about your Shopify store.

Input

Response Payload

{
"shop": {
"id": ,
"name": "CONNECTDOTS DEMO STORE",
"email": "",
"domain": " ",
"province": "Queensland",
"country": "AU",
"address1": "49 payne st",
"zip": "4068",
"city": "indooroopilly",
"phone": "",
"latitude": -,
"longitude": ,
"primary_locale": "en",
"address2": "",
"country_code": "AU",
"country_name": "Australia",
"currency": "AUD",
"customer_email": "",
"timezone": "(GMT-05:00) America/New_York",
"iana_timezone": "America/New_York",
"shop_owner": "CONNECTDOTS DEMO STORE Admin",
"myshopify_domain": " "
}
}

Create Draft Order for a Single Product

This action allows you to create a draft order for a customer using their customer ID and a product variant ID.

Input

Response Payload

{
"draft_order": {
"id": ,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "T23:21:38-04:00",
"updated_at": "T23: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": " ",
"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/"
}
}

Create Draft Order for Multiple Products

Use this action to create a draft order that includes multiple products for a customer, using their customer ID.

Input

Response Payload

{
"draft_order": {
"id": ,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "T00:18:51-04:00",
"updated_at": "T00: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": " ",
"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/"
}
}

Create Draft Order with Custom Product

This action enables you to create a draft order using a custom product.

Input

Reponse Payload

{
"draft_order": {
"id": ,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "T04:17:52-04:00",
"updated_at": "T04: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": "",
"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/"
}
}

Send a Draft Order Invoice

This action allows you to send an invoice for the created draft order to the customer. Ensure the email used is associated with a staff member or someone with staff privileges.

Input

Response Payload

{
"draft_order_invoice": {
"to": "",
"from": "",
"subject": "Invoice",
"custom_message": "This is a test message",
"bcc": [
]
}
}

Apply Discount to a Draft Order

Use this action to apply a discount code or offer to an existing draft order.

Input

Response Payload

{
"draft_order": {
"id": ,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": "T04:24:24-04:00",
"created_at": "T04:17:52-04:00",
"updated_at": "T04: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": "",
"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/"
}
}

Finalize Draft Order

This action lets you mark a draft order as either paid or unpaid.

Input

Response Payload

{
"draft_order": {
"id": ,
"note": "",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": "T04:24:24-04:00",
"created_at": "T04:17:52-04:00",
"updated_at": "T04:35:41-04:00",
"tax_exempt": false,
"completed_at": "T04:35:41-04:00",
"name": "#D129",
"status": "completed",
"line_items": [
{...} // 20 keys
],
"shipping_address": null,
"billing_address": null,
"invoice_url": "",
"applied_discount": {
"description": "Start of summer clearance",
"value": "20.0",
"title": "Summer sale",
"amount": "4.00",
"value_type": "percentage"
},
"order_id": ,
"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/"
}
}

Delete Draft Order

Use this action to delete a draft order using its draft order ID.

Input

Respone Payload

[ ]

Retrieve Draft Order Information

This action fetches details of a specific draft order using its draft order ID.

Input

Response Payload

{
"draft_order": {
"id": ,
"note": "",
"email": null,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "T04:44:07-04:00",
"updated_at": "T04:44:07-04:00",
"status": "open",
"line_items": [
{...} // 20 keys
],
"invoice_url": " ",
"subtotal_price": "20.00"
}
}

Retrieve Order Information

Use this action to obtain information about a specific order using its order ID.

Input

Response Payload

{
"order": {
"id": ,
"cancelled_at": null,
"closed_at": null,
"confirmed": true,
"contact_email": "",
"created_at": "T18:03:31-04:00",
"currency": "AUD",
"email": "",
"financial_status": "pending",
"fulfillment_status": null,
"name": "#1036",
"number": 36,
"order_number": 1036,
"order_status_url": " ",
"phone": null,
"processed_at": "T18: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": "T18:03:32-04:00"
}
}