ByteChef LogoByteChef
Components

Klaviyo

Klaviyo is a marketing automation platform primarily used for email and SMS marketing, especially by e-commerce businesses.

Categories: Marketing Automation

Type: klaviyo/v1


Connections

Version: 1

API Key

Properties

NameLabelTypeDescriptionRequired
keyKeySTRINGtrue

Actions

Get Lists

Name: getLists

Get all lists in an account.

Properties

NameLabelTypeDescriptionRequired
listFieldsList FieldsARRAY
Items [STRING]
List of fields to include for each related list object.true

Example JSON Structure

{
  "label" : "Get Lists",
  "name" : "getLists",
  "parameters" : {
    "listFields" : [ "" ]
  },
  "type" : "klaviyo/v1/getLists"
}

Output

Type: OBJECT

Properties

NameTypeDescription
dataARRAY
Items [{STRING(type), STRING(id), {STRING(name), STRING(created), STRING(updated), STRING(opt_in_process)}(attributes), {STRING(self)}(links), {{{STRING(self), STRING(related)}(links)}(profiles), {[{STRING(type), STRING(id)}](data), {STRING(self), STRING(related)}(links)}(tags), {[{STRING(type), STRING(id)}](data), {STRING(self), STRING(related)}(links)}(flow-triggers)}(relationships)}]
linksOBJECT
Properties {STRING(self), STRING(first), STRING(last), STRING(prev), STRING(next)}

Output Example

{
  "data" : [ {
    "type" : "",
    "id" : "",
    "attributes" : {
      "name" : "",
      "created" : "",
      "updated" : "",
      "opt_in_process" : ""
    },
    "links" : {
      "self" : ""
    },
    "relationships" : {
      "profiles" : {
        "links" : {
          "self" : "",
          "related" : ""
        }
      },
      "tags" : {
        "data" : [ {
          "type" : "",
          "id" : ""
        } ],
        "links" : {
          "self" : "",
          "related" : ""
        }
      },
      "flow-triggers" : {
        "data" : [ {
          "type" : "",
          "id" : ""
        } ],
        "links" : {
          "self" : "",
          "related" : ""
        }
      }
    }
  } ],
  "links" : {
    "self" : "",
    "first" : "",
    "last" : "",
    "prev" : "",
    "next" : ""
  }
}

Subscribe Profiles

Name: subscribeProfiles

Subscribe one or more profiles to email marketing, SMS marketing, or both.

Properties

NameLabelTypeDescriptionRequired
profileIdProfile IDARRAY
Items [STRING]
The IDs of the profile to subscribe.true
subscriptionSubscriptionARRAY
Items [STRING]
The subscription parameters to subscribe to on the email or sms channel.true

Example JSON Structure

{
  "label" : "Subscribe Profiles",
  "name" : "subscribeProfiles",
  "parameters" : {
    "profileId" : [ "" ],
    "subscription" : [ "" ]
  },
  "type" : "klaviyo/v1/subscribeProfiles"
}

Output

This action does not produce any output.

Update Profile

Name: updateProfile

Update the profile with the given profile ID.

Properties

NameLabelTypeDescriptionRequired
profileIdProfile IDSTRINGPrimary key that uniquely identifies this profile.true
emailEmailSTRINGIndividual's email address.false
phone_numberPhone NumberSTRINGIndividual's phone number in E.164 format.false
first_nameFirst NameSTRINGIndividual's first name.false
last_nameLast NameSTRINGIndividual's last name.false
organizationOrganizationSTRINGName of the company or organization within the company for whom the individual works.false
localeLocaleSTRINGThe locale of the profile, in the IETF BCP 47 language tag format like (ISO 639-1/2)-(ISO 3166 alpha-2).false
titleTitleSTRINGIndividual's job title.false
imageImageSTRINGURL pointing to the location of a profile image.false
address1Address1STRINGFirst line of street address.false
address2Address2STRINGSecond line of street address.false
cityCitySTRINGCity name.false
countryCountrySTRINGCountry name.false
regionRegionSTRINGRegion within a country, such as state or province.false
zipZipSTRINGZip code.false
timezoneTimezoneSTRINGTime zone name. We recommend using time zones from the IANA Time Zone Database..false
ipIPSTRINGIP address.false

Example JSON Structure

{
  "label" : "Update Profile",
  "name" : "updateProfile",
  "parameters" : {
    "profileId" : "",
    "email" : "",
    "phone_number" : "",
    "first_name" : "",
    "last_name" : "",
    "organization" : "",
    "locale" : "",
    "title" : "",
    "image" : "",
    "address1" : "",
    "address2" : "",
    "city" : "",
    "country" : "",
    "region" : "",
    "zip" : "",
    "timezone" : "",
    "ip" : ""
  },
  "type" : "klaviyo/v1/updateProfile"
}

Output

Type: OBJECT

Properties

NameTypeDescription
dataOBJECT
Properties {STRING(type), STRING(id), {STRING(email), STRING(phone_number), STRING(external_id), STRING(anonymous_id), STRING(first_name), STRING(last_name), STRING(organization), STRING(locale), STRING(title), STRING(image), STRING(created), STRING(updated), STRING(last_event_date), {STRING(address1), STRING(address2), STRING(city), STRING(country), {}(latitude), {}(longitude), STRING(region), STRING(zip), STRING(timezone), STRING(ip)}(location), {}(properties), {{{BOOLEAN(can_receive_email_marketing), STRING(consent), DATE_TIME(consent_timestamp), DATE_TIME(last_updated), STRING(method), STRING(method_detail), STRING(custom_method_detail), BOOLEAN(double_optin), [STRING($reason), DATE_TIME($timestamp)](suppression), [STRING($list_id), STRING($reason), DATE_TIME($timestamp)](list_suppressions)}(marketing)}(email), {{BOOLEAN(can_receive_sms_marketing), STRING(consent), DATE_TIME(consent_timestamp), STRING(method), STRING(method_detail), DATE_TIME(last_updated)}(marketing), {BOOLEAN(can_receive_sms_transactional), STRING(consent), DATE_TIME(consent_timestamp), STRING(method), STRING(method_detail), DATE_TIME(last_updated)}(transactional)}(sms), {{BOOLEAN(can_receive_push_marketing), STRING(consent), DATE_TIME(consent_timestamp)}(marketing)}(mobile_push)}(subscriptions), {NUMBER(historic_clv), NUMBER(predicted_clv), NUMBER(total_clv), NUMBER(historic_number_of_orders), NUMBER(predicted_number_of_orders), NUMBER(average_days_between_orders), NUMBER(average_order_value), NUMBER(churn_probability), DATE_TIME(expected_date_of_next_order)}(predictive_analytics)}(attributes), {STRING(self)}(links), {{{STRING(type), STRING(id)}(data), {STRING(self), STRING(related)}(links)}(lists), {{STRING(type), STRING(id)}(data), {STRING(self), STRING(related)}(links)}(segments), {{STRING(type), STRING(id)}(data), {STRING(self), STRING(related)}(links)}(push-tokens)}(relationships)}
linksOBJECT
Properties {STRING(self)}
Links.

Output Example

{
  "data" : {
    "type" : "",
    "id" : "",
    "attributes" : {
      "email" : "",
      "phone_number" : "",
      "external_id" : "",
      "anonymous_id" : "",
      "first_name" : "",
      "last_name" : "",
      "organization" : "",
      "locale" : "",
      "title" : "",
      "image" : "",
      "created" : "",
      "updated" : "",
      "last_event_date" : "",
      "location" : {
        "address1" : "",
        "address2" : "",
        "city" : "",
        "country" : "",
        "latitude" : { },
        "longitude" : { },
        "region" : "",
        "zip" : "",
        "timezone" : "",
        "ip" : ""
      },
      "properties" : { },
      "subscriptions" : {
        "email" : {
          "marketing" : {
            "can_receive_email_marketing" : false,
            "consent" : "",
            "consent_timestamp" : "2021-01-01T00:00:00",
            "last_updated" : "2021-01-01T00:00:00",
            "method" : "",
            "method_detail" : "",
            "custom_method_detail" : "",
            "double_optin" : false,
            "suppression" : [ "", "2021-01-01T00:00:00" ],
            "list_suppressions" : [ "", "", "2021-01-01T00:00:00" ]
          }
        },
        "sms" : {
          "marketing" : {
            "can_receive_sms_marketing" : false,
            "consent" : "",
            "consent_timestamp" : "2021-01-01T00:00:00",
            "method" : "",
            "method_detail" : "",
            "last_updated" : "2021-01-01T00:00:00"
          },
          "transactional" : {
            "can_receive_sms_transactional" : false,
            "consent" : "",
            "consent_timestamp" : "2021-01-01T00:00:00",
            "method" : "",
            "method_detail" : "",
            "last_updated" : "2021-01-01T00:00:00"
          }
        },
        "mobile_push" : {
          "marketing" : {
            "can_receive_push_marketing" : false,
            "consent" : "",
            "consent_timestamp" : "2021-01-01T00:00:00"
          }
        }
      },
      "predictive_analytics" : {
        "historic_clv" : 0.0,
        "predicted_clv" : 0.0,
        "total_clv" : 0.0,
        "historic_number_of_orders" : 0.0,
        "predicted_number_of_orders" : 0.0,
        "average_days_between_orders" : 0.0,
        "average_order_value" : 0.0,
        "churn_probability" : 0.0,
        "expected_date_of_next_order" : "2021-01-01T00:00:00"
      }
    },
    "links" : {
      "self" : ""
    },
    "relationships" : {
      "lists" : {
        "data" : {
          "type" : "",
          "id" : ""
        },
        "links" : {
          "self" : "",
          "related" : ""
        }
      },
      "segments" : {
        "data" : {
          "type" : "",
          "id" : ""
        },
        "links" : {
          "self" : "",
          "related" : ""
        }
      },
      "push-tokens" : {
        "data" : {
          "type" : "",
          "id" : ""
        },
        "links" : {
          "self" : "",
          "related" : ""
        }
      }
    }
  },
  "links" : {
    "self" : ""
  }
}