FieldsRaven developer docs
  • Welcome!
  • Quick Start
  • App embeds
    • Sitemap manager
    • Customer Birthday Popup
  • FAQ
  • Code examples
    • Create a single_line_text_field metafield
    • Delete a metafield
    • Create a product_reference metafield
    • Create a list.product_reference metafield
    • Create a json metafield
    • Create multiple metafields (aka flock)
  • Example features
    • Customer Birthday Popup (WIP)
    • Sitemap Manager (WIP)
    • Page SEO Editor (TBD)
    • Product FOMO (TBD)
    • Show off live traffic (TBD)
    • Collect custom customer attributes
    • Wish List
    • Customer registration with custom attributes
    • Customer Product Registration
  • Troubleshooting
  • Klaviyo
  • Airtable
Powered by GitBook
On this page

Klaviyo

PreviousTroubleshootingNextAirtable

Last updated 7 months ago

To sync Shopify metafields with Klaviyo you need to create a "Private API Key" in Klaviyo

Setup Klaviyo sync in FieldsRaven

Klaviyo sync only works with the customer resource

When creating a new Raven toggle the "Sync with Klaviyo" button and add the Klaviyo's API key.

It takes about 10 seconds after the Shopify metafiled is created/updated for the KlaviyoSync job to kick in

Sync Shopify metafield into Klaviyo customer profile

When you sync a metafield into Klaviyo's customer profiles, property name in Klaviyo will be the metafield's key in Shopify. For example if you're syncing this metafield customer.metafields.social_media_profiles.facebook then property name in Klaviyo will be facebook

Sync Shopify JSON metafield into Klaviyo customer profile

When you sync a JSON type metafield, each property of the JSON object gets converted into a customer property in Klaviyo, this object:

{
  "facebook": "Share on Facebook",
  "twitter": "Tweet on Twitter",
  "pinterest": "Pin on Pinterest",
  "timestamp": `${Date.now()}`
}

Or this:

{
  "Serial Number": "000123456789",
  "Country of Residence": "Canada",
  "Where did you purchase your meter?": "Amazon"
}

Becomes as follows in Klaviyo:

Nested JSON metafield

TBC

{
  "name": "Ram",
  "age": 27,
  "vehicles": {
    "car": "limousine",
    "bike": "ktm-duke",
    "plane": "lufthansa"
  }
}
{
  "name": "Ram",
  "age": 27,
  "vehicles": ["limousine", "ktm-duke", "lufthansa"]
}

Array of JSON metafields

[
  {
    "name": "Martha",
    "age": 37,
    "other": {
      "Favorite color": "Blue",
      "Vehicle": "2009 SSC Aero",
      "GUID": "890d954a-4a57-4659-b10d-e16427358b99"
    }
  },
  {
    "name": "Bonnie",
    "age": 29,
    "other": {
      "Favorite color": "Orange",
      "Vehicle": "1998 Daewoo Prince",
      "GUID": "b902c384-2e1c-44de-a8d3-59b92a2afddd"
    }
  },
  {
    "name": "Bridgette",
    "age": 41,
    "other": {
      "Favorite color": "Purple",
      "Vehicle": "1997 Suzuki Cappuccino",
      "GUID": "aad8ceb9-566e-4b9f-a64a-23af8671eb96"
    }
  }
]

Demo ->

https://monosnap.com/file/DB1bRi7qixXvlVdVws37f4grQdJo1J
Klaviyo customer property name example
Sync Shopify JSON metafield into Klaviyo customer profile
Syncing nested JSON metafield with Klaviyo
Syncing nested JSON with nested array with Klaviyo
Syncing an array of objects with Klaviyo
Klaviyo customer property name screenshot
Sync Shopify JSON metafield into Klaviyo customer profile
Syncing nested JSON metafield with Klaviyo
Syncing nested JSON with nested array with Klaviyo
Syncing an array of objects with Klaviyo