Skip to main content

Klaviyo Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow, DB-CDC, Spark ETL, or Replication data flow that sends data to a Klaviyo location.
klaviyo.png

Klaviyo

Create a Klaviyo Destination

  1. Click the + icon on the Nexset that will be sent to the Klaviyo destination, and select the Send to Destination option from the menu.

  2. Select the Klaviyo connector from the list of available destination connectors. Then, select the credential that will be used to connect to the Klaviyo account, and click Next; or, create a new Klaviyo credential for use in this flow.

  3. In Nexla, Klaviyo destinations can be created using pre-built endpoint templates, which expedite destination setup for common Klaviyo endpoints. Each template is designed specifically for the corresponding Klaviyo endpoint, making destination configuration easy and efficient.
    • To configure this destination using a template, follow the instructions in Configure Using a Template.

    Klaviyo destinations can also be configured manually, allowing you to send data to Klaviyo endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this destination manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Klaviyo endpoints. Each template is designed specifically for the corresponding Klaviyo endpoint, making destination setup easy and efficient.

  • To configure this destination using a template, select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

    Add Profiles to a List

    Add profiles to a list. This endpoint is functionally equivalent to adding profiles to a list via a CSV upload and will immediately add profiles to the list.

    • Enter the List ID in the List ID field. This is the unique identifier for a Klaviyo list to which you want to add profiles. You can obtain List IDs from the "Get Lists" endpoint or from your Klaviyo account dashboard.
    • The endpoint uses POST requests to https://a.klaviyo.com/api/v2/list/{list_id}/members where {list_id} is the List ID you configured. The endpoint URL is automatically constructed based on the Klaviyo API base URL and the List ID you specify.
    • The endpoint sends data from your Nexset as the request body in JSON format. The request body is automatically formatted according to the schema fields and data mapping you configure. The body transformation function automatically wraps your data with the api_key and profiles structure required by the Klaviyo API.
    • Batch mode is enabled by default for this endpoint (batch.mode: true), which means multiple profiles from your Nexset can be combined into a single API request. This allows you to add multiple profiles to a list efficiently in a single API call.
    • This endpoint does not automatically create a data source to track the responses received from the Klaviyo API after each call.

    The request body must be properly formatted JSON that matches the Klaviyo API specification for adding profiles to a list. The endpoint requires API key authentication via the api_key field in the request body, which is handled automatically by your credential configuration. The Content-Type: application/json header is automatically included in requests. The request body is automatically transformed to include the api_key and wrap your profile data in a profiles array. Batch mode is enabled by default, which allows multiple profiles to be added in a single API request. The List ID identifies which list to add profiles to. For detailed information about adding profiles to lists, including required fields, request formats, and batch processing, see the Klaviyo API documentation.

Configure Manually

Klaviyo destinations can be manually configured to send data to any valid Klaviyo API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations.

With manual configuration, you can also create more complex Klaviyo destinations, such as destinations that use custom request headers, different HTTP methods, or custom data formatting.

Content Format

  1. Select the format in which the Nexset data will be sent to the Klaviyo API from the Content Format pulldown menu. Nexla will automatically convert the data to the selected format for each API call. The Klaviyo API typically uses JSON format for request bodies.

API Endpoint URL

  1. Enter the URL of the Klaviyo API endpoint to which you want to send the Nexset data in the URL field. This should be the complete URL including the protocol (https://), the API base URL, and any required path parameters. Klaviyo API endpoints typically follow the pattern https://a.klaviyo.com/api/v1/{endpoint_path} or https://a.klaviyo.com/api/v2/{endpoint_path}. Include the api_key query parameter in the URL, or ensure it's included in the request body as required by the specific endpoint.

Ensure the API endpoint URL is correct and accessible with your current credentials. You can test the endpoint using the Test button after configuring the URL. The endpoint requires API key authentication via the api_key query parameter or in the request body, depending on the specific endpoint. The API key is sent as a query parameter in the URL or included in the request body for all API requests to the Klaviyo API. For detailed information about Klaviyo API endpoints, authentication, and available APIs, see the Klaviyo API documentation.