Common Events

specifications for the most common ShopMessage events

ViewProduct

attributetypedescription
product_idstring|numberrequired. unique product identifier
titlestringrequired. title of product
product_urlstring (url)required. URL of product
vendorstringvendor of product
product_typestringtype of product (e.g. "socks")
product_tagsstring[]list of product tags
imagestring (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

attributetypedescription
total_pricenumbertotal price of all items in cart
cta_urlstring (url)required. clickthru destination to return to cart
itemsCartItem[]required. list of products in cart, must have at least one

CartItem

attributetypedescription
titlestringrequired. title of product
imagestring (url)required. URL of product image
pricenumberrequired. price of one product
quantitynumbernumber of this product in cart
product_urlstring (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

attributetypedescription
order_idstring|numberrequired.
created_atstring (timestamp)date and time order was created in ISO 8601 format
order_status_urlstring (url)
itemsPurchaseItem[]required. list if items purchased
total_pricenumber
total_taxnumber
total_shippingnumber
currencystring (currency code)currency code of transaction amount (e.g. USD, CAD, GBP)
shipping_addressAddressshipping address for order

PurchaseItem

attributetypedescription
variant_idstring|number
product_idstring|number
titlestring
pricenumber
quantitynumber
skustring
imagestring (url)

Address

attributetypedescription
first_namestring
last_namestring
address1string
address2string
citystring
province_codestring
countrystring
zipstring
_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"
  }
}