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
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| key | Key | STRING | true |
Connection Setup
- Login to the dashboard at https://www.klaviyo.com/login?next=/account.
- Click on your account.
- Click on Settings.
- Click on API keys.
- Under the Private API Keys section, select Create Private API Key.
- Name your API key and select Full Access Key.
- Click Create.
- Copy the API key. Use these credentials to create a connection in ByteChef.
Actions
Get Lists
Name: getLists
Get all lists in an account.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| listFields | List Fields | ARRAY 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
| Name | Type | Description |
|---|---|---|
| data | ARRAY 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)}] | |
| links | OBJECT 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
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| profileId | Profile ID | ARRAY Items[STRING] | The IDs of the profile to subscribe. | true |
| subscription | Subscription | ARRAY 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.
Find Profile ID
To find the Profile ID, click here.
Update Profile
Name: updateProfile
Update the profile with the given profile ID.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| profileId | Profile ID | STRING | Primary key that uniquely identifies this profile. | true |
| STRING | Individual's email address. | false | ||
| phone_number | Phone Number | STRING | Individual's phone number in E.164 format. | false |
| first_name | First Name | STRING | Individual's first name. | false |
| last_name | Last Name | STRING | Individual's last name. | false |
| organization | Organization | STRING | Name of the company or organization within the company for whom the individual works. | false |
| locale | Locale | STRING | The locale of the profile, in the IETF BCP 47 language tag format like (ISO 639-1/2)-(ISO 3166 alpha-2). | false |
| title | Title | STRING | Individual's job title. | false |
| image | Image | STRING | URL pointing to the location of a profile image. | false |
| address1 | Address1 | STRING | First line of street address. | false |
| address2 | Address2 | STRING | Second line of street address. | false |
| city | City | STRING | City name. | false |
| country | Country | STRING | Country name. | false |
| region | Region | STRING | Region within a country, such as state or province. | false |
| zip | Zip | STRING | Zip code. | false |
| timezone | Timezone | STRING | Time zone name. We recommend using time zones from the IANA Time Zone Database.. | false |
| ip | IP | STRING | IP 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
| Name | Type | Description |
|---|---|---|
| data | OBJECT 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)} | |
| links | OBJECT 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" : ""
}
}Find Profile ID
To find the Profile ID, click here.
What to do if your action is not listed here?
If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.
To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.
Additional Instructions
How to find Profile ID
- Method 1: Via API
Use the GET /api/profiles endpoint to retrieve a list of all profiles and their IDs.
- Method 2: Via UI
Go to the Klaviyo dashboard. On the left bar, go to Audience and then Profiles. Open the profile that you want to use and you can find Unique ID under Information/Profile details. You can also find the same ID in the URL when you open the profile. For example in https://www.klaviyo.com/profile/123, profile ID is 123.
The Profile ID can also be found in the output of the following actions:
- Update Profile
How is this guide?
Last updated on
Keap
Keap is a customer comprehensive customer relationship management platform designed to help small businesses streamline sales, marketing, and customer management processes in one integrated system.
Knowledge Base
Search ByteChef's internal knowledge base to retrieve relevant document chunks using semantic similarity search powered by vector embeddings.