Common Events

specifications for the most common ShopMessage events

ViewProduct

attribute

type

description

product_id

string|number

required. unique product identifier

title

string

required. title of product

product_url

string (url)

required. URL of product

vendor

string

vendor of product

product_type

string

type of product (e.g. "socks")

product_tags

string[]

list of product tags

image

string (url)

required. URL of product image

_shopmsg('trigger', 'ViewProduct', {
  "product_id": 8257325317,
  "title": "Blue Shirt",
  "product_url": "https://bklyn-demo.myshopify.com/collections/mens/products/ayers-chambray",
  "vendor": "United By Blue",
  "product_type": "Mens",
  "product_tags": [
    "Shirts"
  ],
  "image": "https://cdn.shopify.com/s/files/1/2123/3399/products/chambray_5f232530-4331-492a-872c-81c225d6bafd.jpg?v=1498247863"
});

UpdateCart

attribute

type

description

total_price

number

total price of all items in cart

cta_url

string (url)

required. clickthru destination to return to cart

items

CartItem[]

required. list of products in cart, must have at least one

CartItem

attribute

type

description

title

string

required. title of product

image

string (url)

required. URL of product image

price

number

required. price of one product

quantity

number

number of this product in cart

product_url

string (url)

required. URL of product

_shopmsg('trigger', 'UpdateCart', {
  "total_price": 29.99,
  "cta_url": "https://bklyn-demo.myshopify.com/cart/32659788101:1,32659610053:1",
  "items": [
    {
      "title": "Red Boot - 7",
      "image": "https://cdn.shopify.com/s/files/1/2123/3399/products/boot.jpg?v=1498247953",
      "price": 310.00,
      "quantity": 1,
      "product_url": "https://bklyn-demo.myshopify.com/products/redwing-iron-ranger?variant=32659788101"
    },
    {
      "title": "Blue Shirt - L",
      "image": "https://cdn.shopify.com/s/files/1/2123/3399/products/chambray_5f232530-4331-492a-872c-81c225d6bafd.jpg?v=1498247863",
      "price": 98.00,
      "quantity": 1,
      "product_url": "https://bklyn-demo.myshopify.com/products/ayers-chambray?variant=32659610053"
    }
  ]
});

PurchaseComplete

attribute

type

description

order_id

string|number

required.

created_at

string (timestamp)

date and time order was created in ISO 8601 format

order_status_url

string (url)

items

PurchaseItem[]

required. list if items purchased

total_price

number

total_tax

number

total_shipping

number

currency

string (currency code)

currency code of transaction amount (e.g. USD, CAD, GBP)

shipping_address

Address

shipping address for order

PurchaseItem

attribute

type

description

variant_id

string|number

product_id

string|number

title

string

price

number

quantity

number

sku

string

image

string (url)

Address

attribute

type

description

first_name

string

last_name

string

address1

string

address2

string

city

string

province_code

string

country

string

zip

string

_shopmsg('trigger', 'PurchaseComplete', {
  "order_id": 933318361139,
  "created_at": "2019-07-01T20:06:09-04:00",
  "order_status_url": "https://platform.shopmsg.me/shopify/vGdKhZNgWeTo/order/933318361139/status",
  "checkout_token": "6cc5bcfa7f588bfe2fd989885321cc63",
  "items": [
    {
      "variant_id": 32659788101,
      "product_id": 8257347973,
      "title": "Red Boot",
      "price": "310.00",
      "quantity": 2,
      "sku": "RW8111-7",
      "image": "https://cdn.shopify.com/s/files/1/2123/3399/products/boot.jpg?v=1498247953"
    },
    {
      "variant_id": 32659610053,
      "product_id": 8257325317,
      "title": "Blue Shirt",
      "price": "98.00",
      "quantity": 1,
      "sku": "43MCHBL4",
      "image": "https://cdn.shopify.com/s/files/1/2123/3399/products/chambray_5f232530-4331-492a-872c-81c225d6bafd.jpg?v=1498247863"
    }
  ],
  "total_price": 780.08,
  "subtotal_price": 718.00,
  "total_tax": 58.90,
  "total_shipping": 3.18,
  "currency": "USD",
  "shipping_address": {
    "first_name": "Bryan",
    "last_name": "Testrada",
    "address1": "123 45th St",
    "city": "Beverly Hills",
    "province": "California",
    "province_code": "CA",
    "country": "United States",
    "country_code": "US",
    "zip": "90210",
    "state": "California"
  }
}