Skip to content

Setting Up a Klaviyo Flow with Webhook Integration


Prerequisites

  • Klaviyo account
  • NaviStone account with IQ Mail feature

Step-by-Step Instructions

  1. Create a New Flow

    • Log into your Klaviyo account.
    • Navigate to "Flows" in the left sidebar.
    • Click "Create Flow" in the upper right corner.
    • Choose your flow trigger (e.g., "Metric," "List," or "Segment").
    • Name your flow appropriately.
  2. Configure Flow Trigger

    • Select your trigger criteria based on your needs:
      • For Metric triggers: Choose the specific metric.
      • For List triggers: Select the relevant list.
      • For Segment triggers: Pick the target segment.
    • Set any additional trigger conditions or filters.
  3. Add Webhook Action

    • From the left sidebar, drag the "Webhook Action" onto the canvas.
    • Click on the webhook and give it a name.
    • Set the status to “Live.”
  4. Configure Webhook Settings

    • Enter the webhook URL: https://integrations.navistone.com/feed
    • Add the API key header:
      • Key: api_key
      • Value: (Paste the value from your campaign configuration.)
  5. Configure Webhook Payload

    • In the "Body" section, format your JSON payload as follows:
    json
    {
      "action": "triggerdm",
      "first_name": "{{person.first_name|default:''}}",
      "last_name": "{{person.last_name|default:''}}",
      "address_line_1": "{{person|lookup:'$address1'|default:''}}",
      "address_line_2": "{{person|lookup:'$address2'|default:''}}",
      "city": "{{person.City|default:''}}",
      "state": "{{person.Region|default:''}}",
      "postal_code": "{{person.Zipcode|default:''}}",
      "reference_id": "{{person.Email}}",
      "campaign_id": "[Insert Your Campaign ID Here]"
    }
    • Field Descriptions:
      • action: Must always be "triggerdm".
      • first_name, last_name, address_line_1, city, state, postal_code: Dynamically mapped from user data in Klaviyo.
      • campaign_id: Unique identifier for the campaign you’re integrating.
    • Important Note: Replace [Insert Your Campaign ID Here] with the actual campaign ID for your setup.
  6. Test the Webhook

    • Click "Preview" in the webhook configuration.
    • Select a sample profile for testing.
    • Review the webhook payload preview.
    • Click “Send Test Request.”
    • Check your webhook endpoint logs to confirm receipt. Successful logs will display a 200 OK status and reflect the payload data sent.
  7. Flow Configuration

    • Add any additional flow steps as needed.
    • Configure timing between steps if applicable.
    • Set up any conditional splits or filters.
  8. Activate the Flow

    • Review the entire flow configuration.
    • Click "Review & Deploy" or "Activate."
    • Confirm the activation.

Error Handling

  • Ensure the API key is valid and correctly entered.
  • Verify the campaign ID matches the one in your NaviStone account.
  • Check for any typos in the webhook URL or payload structure.