Outbound sync data structures

This page describes the data types, structures and examples for each field for each sync operation.

Outbound syncs require certain fields to be specific data types.

Supported Outbound Sync operations:

Note: 1. * means the field is REQUIRED to be filled and cannot be null. 2. enum fields only accepts certain terms as strings which are shown in its corresponding example.

Customer

Outbound Sync: Create

This operation creates a new customer in Shopify.

Field NameTypeExample

*first_name

string

John

*last_name

number

Smith

tags

string

first

phone

string

+60123456789

email

string

testexample@gmail.com

note

string

Bulk Customer

tax_exempt

boolean

TRUE | FALSE

email_marketing_consent

object

sms_marketing_consent

object

addresses

array of objects

Outbound Sync: Update

This operation updates the details of an existing customer in Shopify. Will not update if no existing customer ID is found.

Field NameTypeExample

*record_id

number

651023456789

first_name

string

John

last_name

number

Smith

tags

string

first

phone

string

+60123456789

email

string

testexample@gmail.com

note

string

Bulk Customer

tax_exempt

boolean

TRUE | FALSE

email_marketing_consent

object

sms_marketing_consent

object

addresses

array of objects

Outbound Sync: Upsert

This operation creates a customer if the customer has never been created with this sync operation. This operation will update the existing customer's details if the customer was previously created from this sync operation.

Field NameTypeExample

*record_id

number

651023456789

*first_name

string

John

*last_name

number

Smith

tags

string

first

phone

string

+60123456789

email

string

testexample@gmail.com

note

string

Bulk Customer

tax_exempt

boolean

TRUE | FALSE

email_marketing_consent

object

sms_marketing_consent

object

addresses

array of objects

Outbound Sync: Delete

This operation deletes an already existing customer. Will not delete if existing customer ID is not found.

Field NameTypeExample

*record_id

number

651023456789

Object Examples (Customer)

[
    { 
        // first_name, last_name is required
        "address1": "123 Oak St",
        "city":"Ottawa",
        "province":"ON",
        "phone":"555-1212",
        "zip":"123 ABC",
        "first_name":"Mother",
        "last_name":"Lastnameson",        
        "country":"CA"
    }
]

Objects or array of objects should not be empty. At least one field of the object should be present when performing a sync operation.


Product

Outbound Sync: Create

This operation creates a new product in Shopify.

Field NameTypeExample

*title

string

Computer Laptop 32 inch

body_html

string

Silent, powerful and affordable laptop!

product_type

string

Laptop

published_scope

string (enum)

web | global

status

string (enum)

active | archived | draft

tags

string

Affordable, Big Screen

variants

array of objects

vendor

string

Steve Jobs

Outbound Sync: Update

This operation updates the details of an existing product in Shopify. Will not update if no existing product ID is found.

Field NameTypeExample

*record_id

number

632910392

title

string

Computer Laptop 32 inch

body_html

string

Silent, powerful and affordable laptop!

product_type

string

Laptop

published_scope

string (enum)

web | global

status

string (enum)

active | archived | draft

tags

string

Affordable, Big Screen

variants

array of objects

vendor

string

Steve Jobs

Outbound Sync: Upsert

This operation creates a product if the product has never been created with this sync operation. This operation will update the existing product's details if the product was previously created from this sync operation.

Field NameTypeExample

*record_id

number

632910392

*title

string

Computer Laptop 32 inch

body_html

string

Silent, powerful and affordable laptop!

product_type

string

Laptop

published_scope

string (enum)

web | global

status

string (enum)

active | archived | draft

tags

string

Affordable, Big Screen

variants

array of objects

vendor

string

Steve Jobs

Outbound Sync: Delete

This operation deletes an already existing product. Will not delete if existing product ID is not found.

Field NameTypeExample

*record_id

number

632910392

Object Examples (Product)

// Each item represents one variant of the product
[
  {
    "option1":"First",
    "price":"10.00",
    "sku":"123"
  },
  {
    "option1":"Second",
    "price":"20.00",
    "sku":"123"
  }
]

Each variant item in the object can accept more parameters than stated in the example.

Reference: https://shopify.dev/docs/api/admin-rest/2024-07/resources/product-variant


Order

Outbound Sync: Create

This operation creates a new order in Shopify.

Field NameTypeExample

*line_items

array of objects

email

string

testuser@example.com

phone

string

+60123456789

billing_address

object

shipping_address

object

discount_codes

array of objects

financial_status

string (enum)

pending | paid | authorized | partially_paid | partially_refunded | refunded | voided

tax_lines will fail if line_items have tax_lines object

array of objects

customer

object

fulfillment_status

string

fulfilled | null | partial | restocked

note

string

Bulk order

note_attributes

array of objects

buyer_accepts_marketing

boolean

TRUE | FALSE

tags

string

RTX, Intel, SSD, Music

The entire create operation for the record will FAIL if the line_items field, which also accepts a tax_lines field in the object, has a present tax_lines field as part of the object.

It is advisable to fill the tax_lines field as part of each item if each individual item has it's own tax details.

If all items share the same tax details, it is advisable to not have any tax_lines objects in each line_item but part of the optional parameter instead.

In Object Examples (Order) demonstrates the usage of the tax_lines object in line_items.

Outbound Sync: Update

This operation updates the details of an existing order in Shopify. Will not update if no existing order ID is found.

Field NameTypeExample

*record_id

number

50123456789

note

string

Bulk order

note_attributes

array of objects

buyer_accepts_marketing

boolean

TRUE | FALSE

tags

string

RTX, Intel, SSD, Music

phone

string

shipping_address

object

customer

null

null

The customer field only accepts a null argument. This will remove the customer that placed the order. Shopify API has not provided a way to insert an existing customer into an order after creation.

Outbound Sync: Upsert

This operation creates an order if the order has never been created with this sync operation. This operation will update the existing order's details if the product was previously created from this sync operation.

Field NameTypeExample

*line_items

array of objects

Example under "Object Examples"

*record_id

number

50123456789

email

string

testuser@example.com

phone

string

+60123456789

billing_address

object

shipping_address

object

discount_codes

array of objects

financial_status

string (enum)

pending | paid | authorized | partially_paid | partially_refunded | refunded | voided

tax_lines will fail if line_items have tax_lines object

array of objects

customer

object | null

fulfillment_status

string (enum)

fulfilled | null | partial | restocked

note

string

Bulk order

note_attributes

array of objects

buyer_accepts_marketing

boolean

TRUE | FALSE

tags

string

RTX, Intel, SSD, Music

If this operation performs a create operation, the customer field will be able to accept the object.

If this operation performs an update operation, the customer field can only accept a null object. If this field remains filled with a customer object, it will be ignored and the corresponding customer will not be updated in the order. A null object will remove the customer from the order.

Outbound Sync: Delete

This operation deletes an already existing order. Will not delete if existing order ID is not found.

Field NameTypeExample

*record_id

number

50123456789

Object Examples (Order)

[
  {
    "title":"Big Brown Bear Boots",
    "price":74.99,
    "grams":"1300",
    "quantity":3
  }
]
{
    "first_name":"John",
    "last_name":"Smith",
    "address1":"123 Fake Street",
    "phone":"555-555-5555",
    "city":"Fakecity",
    "province":"Ontario",
    "country":"Canada",
    "zip":"K2P 1L4"
}

Fulfillment

Outbound Sync: Create

This operation fulfills an existing unfulfilled order's items given the fulfillment order ID. Orders that have all items fulfilled will be marked as fulfilled. Orders that have only part of it's items fulfilled will be marked as partially fulfilled.

Field NameTypeExample

*line_items_by_fulfillment_order

array of objects

message

string

Leave at doorstep

notify_customer

boolean

TRUE | FALSE

origin_address

object

tracking_info

object

Outbound Sync: Update

This operations updates an existing fulfilled order's details, such as the tracking information and delivery company.

Field NameTypeExample

*record_id

number

4123456789

tracking_info

object

notify_customer

boolean

TRUE | FALSE

Outbound Sync: Upsert

This operation will fulfill an order if the order has never been fulfilled with this sync operation. This operation will update the existing fulfillment's details if the order was previously fulfilled from this sync operation.

Field NameTypeExample

*line_items_by_fulfillment_order

array of objects

*record_id

number

4123456789

tracking_info

object

notify_customer

boolean

TRUE | FALSE

Outbound Sync: Delete

This operation will unfulfill an order, changing the items of orders from fulfilled into unfulfilled state.

Field NameTypeExample

*record_id

number

4123456789

Object Examples (Fulfillment)

[
  // only fulfillment_order_id is required
  // fulfillment_order_line_items is optional
  {
    "fulfillment_order_id":1046000819,
    "fulfillment_order_line_items":[{ "id":1058737537, "quantity":1 }]
  }
]

Last updated