Skip to content

Latest commit

 

History

History
 
 

klaviyo

Saleor App Klaviyo

The application provides integration with Klaviyo. It allows you to send metrics to Klaviyo.

What's included?

  • 🧩 Connection between Saleor and Klaviyo
  • 🏆 4 built-in, example webhooks, that trigger Klaviyo metrics
  • 🎨 Add new webhooks with ease

How to use this project

Requirements

Running app in development mode

  1. Install the dependencies by running the following command in the shell:
pnpm install
  1. Create a file named .env and use the contents of the .env.example file as a reference.

  2. Start the development server by running the following command in the shell:

pnpm dev
  1. Data importer app will be available under http://localhost:3000

  2. Tunnel the app by running:

ngrok http localhost:3000

Note

See How to tunnel an app for more info.

  1. Go to Dashboard, open Apps tab and click Install external app, provide your tunnel URL with path for the manifest file. For example ${YOUR_TUNNEL_URL}/api/manifest

Configuration

Here you can find doc how configure the app

Generated schema and typings

Commands build and dev would generate schema and typed functions using Saleor's GraphQL endpoint. Commit generated folder to your repo as they are necessary for queries and keeping track of the schema changes.

Learn more about GraphQL code generation.

Storing registration data - APL

During the registration process, Saleor API passes the auth token to the app. With this token, the app can query Saleor API with privileged access (depending on permissions requested during installation). To store this data, app-template uses a different APL interface.

The choice of the APL is done using APL environment variable. If the value is not set, FileAPL is used. Available choices:

  • file: no additional setup is required. Good choice for local development. Can't be used for multi tenant-apps or be deployed (not intended for production)
  • upstash: use Upstash Redis as storage method. Free account required. Can be used for development and production and supports multi-tenancy. Requires UPSTASH_URL and UPSTASH_TOKEN environment variables to be set

If you want to use your own database, you can implement your own APL. Check the documentation to read more.

Learn more about Saleor Apps

Apps guide

Configuring apps in dashboard