KWIGA help center Services, integrations, API, Settings General setting Using variables on the project, list of available variables

Using variables on the project, list of available variables

Articles:

This article explains how to use variables in your project—where to apply them, what data is available, and how to use them for automation and personalization. Includes a list with descriptions and examples for emails, webhooks, buttons, lessons, and more.


In this article:


General information about variables

Variables are a convenient way to insert personalized data into various elements of your project. They can be used in places like:

1. Webhooks in automations

Variables can be inserted:

  • in the webhook URL, for example:
    https://example.com/hook?user={user.email}
    in the request body parameters or headers

This allows personal data to be automatically sent to third-party services.

2. CTA (Call to Action)

In buttons and links, variables can be used for:

  • personalizing button text

  • passing data through links, such as user ID or UTM tags

3. In parameters

Variables can be used in form parameters or other elements:

  • user email

  • subscription ID

  • unique codes and tags

  • any other variable available in the context

4. In redirect link (if not using payment transition)

Variables can be manually added to the redirect link:

https://my.site.com/thanks?email={user.email}&course={course.title}

5. In lesson info blocks

Variables work within the texts of info blocks. For example:

  • Addressing by name: Hi, {user.first_name}!

  • Displaying course name, date, status, etc.

6. In emails

Using variables in emails makes communication more personalized and effective. With variables like {name}, {date}, or {course name}, the email appears personally addressed to the client. This increases trust, engagement, and the likelihood that the user will read the email to the end or take the desired action. Additionally, variables simplify the automation of mass mailings without losing a personal touch.

List of available variables

List of available variables that are accessible in all places where variables can be used.

Variable Value
contact.id Contact ID
contact.user_id User ID
contact.first_name Contact name
contact.last_name Contact surname
contact.name Contact full name
contact.email Contact email
contact.phone Contact phone
contact.country Contact country. For example: Ukraine
contact.timezone Contact timezone. For example: Europe/Kyiv
contact.currency Contact currency. For example: USD
contact.city Contact city
contact.utm_source List of unique contact utm_source (separator ", ")
contact.utm_medium List of unique utm_medium of the contact (delimiter ", ")
contact.utm_campaign List of unique utm_campaign of the contact (delimiter ", ")
contact.utm_term List of unique utm_term of the contact (delimiter ", ")
contact.utm_content List of unique utm_content of the contact (delimiter ", ")
contact.field_<id> Custom fields (description below)
datetime Date and time in UTC format YYYY-MM-DD HH:mm:ss
contact.visit_source Visit source

Custom fields

{contact.field_<id>}

Example {contact.field_123}

<id> - field ID, which can be obtained in the contact field settings (example https://sampleschool.kwiga.com/expert/crm/contacts?view=settings)

Custom fields example

Variables that can be additionally used in CTA

  • in parameters

  • in redirect link (if not using payment transition)

Variable Value
first_name First name from application
last_name Last name from application
name Full name from application
email Email from application
phone Phone from application
utm_source utm_source - specifically from the visit where the application was submitted
utm_medium utm_medium - specifically from the visit where the application was submitted
utm_campaign utm_campaign - specifically from the visit where the application was submitted
utm_term utm_term - specifically from the visit where the application was submitted
utm_content utm_content - specifically from the visit where the application was submitted
widget_landing Landing page URL from which the application was sent
widget_landign_referer Referrer that was on the landing page when the application was sent

Also, in certain forms, variables described below in Variables available in automation webhooks may be accessible

By order ({order.*}) - If the Access to product (Full access/By offer) form option is selected

By product({product.*}) - If the Access to product + Full access form option is selected

By offer ({offer.*}) - If the Access to product + By offer form option is selected

If on the page where the CTA or Kwiga tracking script is placed, there were visits with utm tags, and the client submitted a request on the landing page without utm tags, they will be absent in these variables. But they will be available in the variables {contact.utm_...}, which are described above.

CTA form variables

Variable Value
cta.id CTA form ID
cta.uuid CTA form UUID
cta.title CTA form name
cta_request.form_data List of user-entered data (separated by line breaks)
The list can be expanded.

Available when the following events occur:

  • CTA application submitted

Variables available in automation webhooks (url, parameters)

Variable Value
referrer Referrer from the first known visit of the contact (Kwiga / landing with CTA)
initial_page URL of the first known visit of the contact (Kwiga / landing with CTA)
reg_from URL of the page where registration occurred (Kwiga / landing with CTA)
tags Contact tags (delimiter ", ")
description Description of the event that triggered the automation. For example: Tag test_tag added to contact

Product variables

Variable Value
product.id Product ID
product.title Product name
product.productable_type Product type. Possible options: course, webinar, closed_group, custom_product
product.productable_id ID of the course/webinar/closed group/custom product

Available when the following events occur:

  • Access to product opened
  • Access to product closed
  • Registered for webinar
  • Course completed
  • Quiz completion
  • Previous quiz result annulled
  • Quiz status changed
  • Subscription access started
  • Subscription access ended
  • Started watching lesson
  • Watched lesson
  • Lesson access opened
  • Lesson practice completed

Order variables

Variable Value
order.id Order ID
order.price Final price. Example 10.99
order.currency_code Order currency in code format. Example: USD
order.currency_symbol Order currency in symbol format. Example: $
order.currency_short_title Order currency in abbreviated name. Example: usd
order.order_stage_id Funnel status ID
order.order_stage_title Funnel status name
order.funnel_id Funnel ID
order.funnel_title Funnel name
order.paid_status Order payment status not_paid / partial_paid / paid
order.paid_status_title Payment status in English words
The list can be expanded.

Available when the following events occur:

  • Subscription started
  • Subscription renewed
  • Successful order payment
  • New order
  • Successful offer payment
  • Offer payment refund
  • Access to product opened
  • Subscription access started
  • Subscription access ended

Payment variables

Variable Value
payment.id Payment ID
payment.price Payment price
payment.currency_code Payment currency in code format. Example: USD
payment.currency_symbol Payment currency in symbol format. Example: $
payment.currency_short_title Payment currency in abbreviated name. Example: usd
payment.created_at Payment creation date. Format YYYY-MM-DD HH:mm:ss
payment.paid_at Payment date. Format YYYY-MM-DD HH:mm:ss
payment.schedule_payment_at Scheduled payment date. Format YYYY-MM-DD HH:mm:ss
платіж.номер Sequential payment number in the order
The list can be expanded.

Available when the following events occur:

  • Successful offer payment
  • Offer payment refund

Offer variables

Variable Value
offer.id Offer ID
offer.title Offer name
The list can be expanded.

Available when the following events occur:

  • Successful offer payment
  • Offer payment refund
  • Free offer accepted
  • Subscription started
  • Subscription renewed
  • Successful order payment
  • New order
  • Access to product opened
  • Subscription access started
  • Subscription access ended

Product subscription variables

Variable Value
subscription.id Product subscription ID
subscription.start_at Subscription start date. YYYY-MM-DD HH:mm:ss
subscription.end_at Final subscription end date. YYYY-MM-DD HH:mm:ss
subscription.order_end_at Subscription end date, considering only paid payments. YYYY-MM-DD HH:mm:ss
subscription.paid_at First subscription payment date. YYYY-MM-DD HH:mm:ss
The list can be expanded.

Available when the following events occur:

  • Access to product opened
  • Subscription access started
  • Subscription access ended

Quiz attempt variables

Variable Value
quiz_attempt.id Attempt ID
quiz_attempt.number_version Version number of completion
quiz_attempt.quiz_id Quiz ID
quiz_attempt.course_id Course ID
quiz_attempt.course_lesson_id Lesson ID
quiz_attempt.status_id Status ID
quiz_attempt.status Status in text form
quiz_attempt.scores Points scored
quiz_attempt.created_at Attempt start. Format YYYY-MM-DD HH:mm:ss
quiz_attempt.finished_at Attempt end. Format YYYY-MM-DD HH:mm:ss
quiz_attempt.count_questions Number of questions in the quiz
quiz_attempt.count_questions_incorrect Number of questions answered incorrectly
quiz_attempt.count_questions_correct Number of correctly answered questions
quiz.title Quiz name
The list can be expanded.

Available when the following events occur:

  • Quiz completion
  • Previous quiz result annulled
  • Quiz status changed

Lesson variables

Variable Value
lesson.id Lesson ID
lesson.title Lesson name
The list can be expanded.

Available when the following events occur:

  • Quiz completion
  • Previous quiz result annulled
  • Quiz status changed
  • Started watching lesson
  • Watched lesson
  • Lesson access opened
  • Lesson practice completed