Tableau Connector for Klaviyo

Build 25.0.9434

CouponCodes

Manages coupon codes for promotions. Supports querying, creating, and updating coupon code records linked to a coupon.

Select

The connector uses the Klaviyo API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client-side within the connector.

  • Id supports the following operator: =
  • ExpiresAt supports the following operators: =, <=, >=, >
  • Status supports the following operator: =

For example, the following queries are processed server-side:

SELECT * FROM CouponCodes WHERE Id = 'couponcode-id'
SELECT * FROM CouponCodes WHERE ExpiresAt <= '2025-08-07'
SELECT * FROM CouponCodes WHERE Status = 'ASSIGNED_TO_PROFILE'

Insert

You can create a new coupon code by using an INSERT statement.

Note: You must specify the CouponId of the coupon that this code belongs to.

INSERT INTO CouponCodes (CouponId, UniqueCode) 
VALUES ('coupon-id', 'secret-couponcode-value')

Update

You can update a coupon code by specifying the Id of the record and setting one or more updatable fields.

The following fields can be updated:

  • Status
  • ExpiresAt

UPDATE CouponCodes 
SET ExpiresAt = '2026-05-07' 
WHERE Id = 'couponcode-id'

Delete

You can delete a coupon code by specifying the Id of the record you want to remove.

DELETE FROM CouponCodes 
WHERE Id = 'couponcode-id'

Columns

Name Type ReadOnly References Description
Id [KEY] String True

The unique identifier for the coupon code. This Id is a composite value combining the coupon's unique code with the Id of the parent coupon.

CouponId String False

Coupons.Id

The unique identifier of the coupon associated with this coupon code. Use this value to retrieve all codes linked to a specific coupon.

ExpiresAt Datetime False

The date and time when the coupon code expires. If not specified or set to null, the expiration date defaults to one year from creation.

Status String True

Indicates the current status of the coupon code. Supported values are ASSIGNED_TO_PROFILE, DELETING, PROCESSING, UNASSIGNED, USED, and VERSION_NOT_ACTIVE.

UniqueCode String False

The unique code string assigned to an individual customer or profile, representing a single-use or profile-specific coupon instance.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434