Roboteka
Roboteka · Robots · Customer LTV

Customer LTV

The Customer LTV robot calculates customer lifetime value in Bitrix24 (Alaio) CRM: the total, count, and average check of won deals or paid invoices, plus the last purchase date and days since it. The values return to the workflow — for VIP segmentation, win-back campaigns, and writing LTV into a field.

The robot calculates customer LTV right inside a Bitrix24 (Alaio) workflow. The data source is won deals or paid invoices; the customer is resolved from the current entity automatically (contact, company, deal, or lead with a linked client) or set explicitly by company or contact ID. Periods: all time, current year, previous year, or the last N days; deals can be limited to a single pipeline. Amounts in different currencies are converted to the portal base currency using its own exchange rates. The robot returns the total (LTV), the number of purchases, the average check, the last purchase date and days since it, plus a Calculated flag (Y/N) for conditions. Typical scenarios: recalculate LTV after a deal is won and write it into a customer field, grant VIP status by threshold, or start a win-back flow based on how long ago the last purchase happened.

What input parameters does the robot accept?

Parameter Type Required? Default
Data source select Won deals, Paid invoices yes deals
Customer select Customer of the current entity, Company by ID, Contact by ID yes auto
Company or contact ID (for the "by ID" modes) string
Period select All time, Current year, Previous year, Last N days yes all
N days (for the "Last N days" period) string
Deal pipeline ID (empty = all; deals mode only) string

What does the robot return?

Parameter Type
LTV — total in the portal base currency double
Number of purchases (deals/invoices) int
Average check double
Last purchase date (YYYY-MM-DD) string
Days since the last purchase string
Result currency string
Calculated (Y/N) string

What errors can the robot return?

The robot writes these messages to the business process log when it cannot complete a step. The text tells you what to fix in the settings or the data.

  • Customer not resolved: the entity has no linked company or contact. Set the customer explicitly (the "by ID" mode).
  • For the "Last N days" period, set a positive number of days.
  • Invalid pipeline ID: set a numeric ID or leave the field empty.
  • The customer has more than {max} records — calculation stopped. Contact us if you need this volume.
  • API error

Scenario: win back a dormant customer

  1. A recurring workflow runs on the company
  2. The robot calculates LTV and the days since the last purchase
  3. If it exceeds 180 days, the manager gets a follow-up task with the past purchase total in the description

Related robots