Klaviyo Integration: Events & Payloads
Events
There are 12 events that Loop can send to Klaviyo via the Loop <> Klaviyo integration. These are:
- Return created: When a return is submitted by the customer via the Returns Portal
- Return status updated: When the status of a return changes (e.g. open, closed, cancelled)
- Label created: When a label is successfully generated by a carrier (e.g. USPS, FedEx)
- Label updated: When the tracking status of a label is updated (e.g. new, in transit, delivered)
- Label resend request: When a Loop admin user clicks a button to resend a return confirmation
- Gift return request: When a customer submits a gift return request
- Exchange out of stock: When we attempt to place a return order and an exchange item is not available
- Out of stock resolved: When we resolve an Out of Stock issue either by issuing a refund or a gift card
- Return expiring: When a return is 21 days old but has not yet been shipped (7 days until expiry)
- Return expired: When a return is 28 days old but has not been shipped (label is expired)
- Payment transaction: When we take a customer payment via Stripe during a Shop Now transaction
- Refund transaction: When we refund a customer's Stripe payment following a return of an exchange
Events are saved as custom
metrics within the corresponding customer's Klaviyo profile.
Payloads
By default, each event contains the following fields in its payload:
- event_id
- return_id (number)
- return_status
- order
- product_names
- product_images
- product_skus
- product_variant_titles
- returned_product_skus
- returned_product_names
- returned_product_variant_titles
- returned_product_images
- returned_product_types
- return_reasons
- return_reason_parents
- return_outcome
- return_destination: {
- name
- street_address
- city
- state
- zip
- country
- country_code
}
- status_page_url
- labels_enabled (boolean)
- keep_item (boolean)
- label
- tracking_number
- tracking_url
- tracking_status
All fields are strings (or an array of strings) unless otherwise noted.
Additional fields
The following events have additional or modified fields in their payload.
Exchange out of stock
In the event an exchange item out of stock, the following fields will contain only the items that are out of stock and unable to be fulfilled:
- product_names
- product_images
- product_variant_titles
- product_skus
Out of stock resolved
When we resolve an out of stock issue, we will also include only the items that are out of stock, as well as the outcome of the resolution (refund or gift card).
- product_names
- product_images
- product_variant_titles
- out_of_stock_outcome
Payment transaction
Includes the following additional fields:
- payment_taken
- charge_amount (number)
- charge_currency
- charge_amount_formatted
- card_type
Refund transaction
Includes the following additional fields:
- refund_processed
- refund_amount (number)
- refund_currency
- refund_amount_formatted
Gift return request
The Gift Return Request does not use the standard payload above; instead the fields are based on a form the customer fills out when submitting a return: