AISET
| Name | AISET |
|---|---|
| Description | AISET sets the value of an attribute with the result of an AI prompt. It uses the default AI model to process the prompt. |
| Parameter 1 | Attribute, which should be set. |
| Parameter 1 type | Attribute |
| Parameter 2 | AI Prompt |
| Parameter 2 type | string - Constant, Formatted string or Interpolate |
| Parameter 3 | Timeout, ms (optional) Default = 2000 ms. |
| Parameter 3 type | string - Constant, Formatted string or Interpolate |
| Examples | See the Example section below |
| Version | Introduced in: 24 |
Compatible events chart
AISET is compatible with all events.
| Event type | Compatibility with AISET |
|---|---|
| Client commit (e.g. CLIENTCOMMIT, AGGREGATECLIENTCOMMIT) | compatible |
| Client committed (e.g. CLIENTCOMMITTED, AGGREGATECLIENTCOMMITTED) | compatible |
| Document events - (e.g. STATECHANGING, STATECHANGED, VOIDING) | compatible |
| Commit (e.g. COMMIT) | compatible |
| Committed (e.g. COMMITTED) | compatible |
| Front-end (e.g. CREATENEW, ATTRIBUTECHANGING, ATTRIBUTECHANGED) | compatible |
Example:
А business rule triggers when a product name is changed and generates its abbreviated version (i.e., Product.ShortName).
| Repository | |||||||
|---|---|---|---|---|---|---|---|
| General.Products.Products | |||||||
| Events | |||||||
| Event type | Event parameter | Execution priority | |||||
| ATTRIBUTECHANGED | Name | Normal | |||||
| Actions | |||||||
| Action No | Action type | Parameter1 type | Parameter1 value | Parameter2 type | Parameter2 value | Parameter3 type (optional) | Parameter3 value |
| 1 | AISET | Attribute | ShortName | Interpolate | Just return a 4-symbol abbreviation of this input: {Name}. | Constant | 2000 |
The parameters are as follows:
- Specifies that we'll set a new value in the ShortName attribute.
- Specifies an AI prompt, instructing for the desired result.
- Specifies that there's a timeout of 2000 milliseconds.
Key points and specific limitations
- The results depend entirely on the AI engine and the specified prompt.
- With vaguer instructions, it's possible to receive different output for the same input.
- If the AI engine doesn't respond within the specified timeout, you will receive an empty string.