Documentation Index

Fetch the complete documentation index at: https://knowledge.lightico.com/llms.txt

Use this file to discover all available pages before exploring further.

Create a function Attribute

Prev Next

A function Attribute automatically generates its value based on a calculation or rule defined in the Attribute itself. Instead of entering a value manually, the value is calculated using other Attributes or system data.

Function Attributes are useful when you want values to be generated automatically—for example, combining multiple fields into one value, generating an ID number, or calculating the difference between two dates.

Note

Calculations in Lightico can be configured in two places. A Function Attribute performs the calculation within the Attribute itself and stores the result in that same Attribute. A function step in a Workflow performs the calculation during the Workflow and writes the result to a selected Attribute.


Create a function Attribute

To create a function Attribute:

  1. Go to Attribute mapping.

  2. Click Create new and select Function.

  3. Enter an Attribute name and Attribute label.

  4. Select the Function Type.

  5. Configure the function, see below.

  6. Click Save.

Once created, the Attribute value will be generated automatically based on the function configuration.


Function types

When creating a Function Attribute, you can choose from several function types.

Concatenate

The Concatenate function combines multiple Attributes and text strings into a single value.

This is useful for creating formatted values such as full names or reference strings.

Example:

Mrs. @first_name @last_name

In this example, the value of the Attribute will combine the text Mrs. with the values of the first_name and last_name Attributes.

Random Number

The Random Number function generates a random number within a defined range. You can optionally add a prefix and suffix.

Settings include:

  • Prefix – text added before the number

  • Min number – the minimum number that can be generated

  • Max number – the maximum number that can be generated

  • Suffix – text added after the number

Example result:

AA123ZZ

This can be useful for generating reference numbers, IDs, or tracking codes.

Date Difference

The Date Difference function calculates the difference between two date Attributes.

You select two date fields, and the function calculates the time difference between them.

Typical use cases include:

  • Calculating the number of days between two events

  • Determining the duration of a process

  • Measuring time between submission and approval dates


Available system values

When building a function expression, you can insert system values alongside Attributes and built-in functions. System values are automatically resolved by the platform — you do not need to enter or configure them manually.

Note

The system values available in the function Attribute editor are specific to this context. They are not the same as the system values available elsewhere in the platform.

To insert a system value, click the system values icon above the function expression box and select a value from the list.

The following system values are available:

  • Current date — the date at the moment the function executes, in ISO 8601 format (UTC)

  • Current time — the time at the moment the function executes, in ISO 8601 format (UTC)

  • Case creation date — the date the case was created

  • Case creation time — the time the case was created

  • Case creator employee ID — the employee ID of the user who originally opened the case

  • Case ID — the unique identifier of the case

  • Case owner ID — the unique identifier of the agent currently assigned to the case

  • Case owner full name — the full name of the agent currently assigned to the case

  • Team ID — the unique identifier of the team

Note

Current date and Current time resolve at the moment the function runs — not when the case was created. Case owner ID and Case owner full name reflect the current assignee and update if the case is reassigned, unlike Case creator employee ID, which is fixed at case creation.


When to use a function Attribute

Use a Function Attribute when:

  • The value should always be calculated automatically

  • The logic should be defined once and reused

  • The value is needed in multiple places (Workflows, documents, integrations)

Examples include:

  • Creating a full name from first and last name

  • Generating unique reference numbers

  • Calculating time differences between dates

Note

Function Attributes generate values automatically and cannot be manually edited by users.