Configuration¶
You can either configure actions in Lime admin in the view config for a limetype.
Or you can trigger the commands in your custom flow.
Add Action in View config¶
Go to Lime admin => Views => <Any limetype>.
Decide if you want a Promoted or Unpromoted action and click the add button you decide.
Add the command you want:
Common parameters
There are some common configs that apply to all commands below:
- notification parameters - Show notification to user
- confirmation parameters - User needs to confirm before running
- next command - Chaining of commands
Open create new¶
Command id: limepkg_standard_actions.open-create-new
Parameters:
| Name | Required | Type | Default value | Descriptive |
|---|---|---|---|---|
| limeType | X |
string, LimeType |
- |
What limetype to create |
| limeObject | Record<string, ValueConfig> |
{} |
What value to set in each field (ValueConfig) | |
| route | boolean |
false |
Specifies if routing to limeobject should be done after confirmation |
Update lime object¶
Command id: limepkg_standard_actions.update-limeobject
Parameters:
| Name | Required | Type | Default value | Descriptive |
|---|---|---|---|---|
| limeObject | X |
Record<string, ValueConfig> |
- |
What value to set in each field (ValueConfig) |
Open form¶
Command id: limepkg_standard_actions.open-form
Parameters:
| Name | Required | Type | Default value | Descriptive |
|---|---|---|---|---|
| properties | X |
Record<string, FieldConfig> |
- |
What value to set in each field (FieldConfig) |
| limeObject | Record<string, ValueConfig> |
- |
What values to set on each field but isn't shown in the form (ValueConfig) | |
| dialog | FormDialogSettings |
- |
Settings for the dialog visualization (FormDialogSettings) |
Field Config¶
| Name | Required | Type | Default value | Descriptive |
|---|---|---|---|---|
| value | ValueConfig |
- |
Override the existing value of the field (ValueConfig) | |
| options | FieldPropertySettings |
- |
Override the card view settings for the property (FieldPropertySettings) |
Field Property Settings¶
You can override all properties on the šLimeSchemaOptions from Lime Elements
This is some extra settings that can be overridden.
| Name | Required | Type | Default value | Descriptive |
|---|---|---|---|---|
| required | boolean |
- |
Override required | |
| readOnly | boolean |
- |
Override read-only |
Form Dialog Settings¶
| Name | Required | Type | Default value | Descriptive |
|---|---|---|---|---|
| heading | FormDialogHeading |
- |
Heading settings for the dialog (FormDialogHeading) | |
| size | FormDialogSize |
x-small |
Size of the dialog (FormDialogSize) | |
| autoHeight | boolean |
true |
If the height should be increased based on the field sizes, instead of a fixed height | |
| closingActions | closingActions |
{"escapeKey": true, "scrimClick": false} |
šClosingActions from Lime Elements |
Form Dialog Heading¶
You can override all properties on the šDialogHeading from Lime Elements
This is some extra settings that can be overridden.
| Name | Required | Type | Default value | Descriptive |
|---|---|---|---|---|
| color | string |
Limetype color |
Color of heading |
Form Dialog Size¶
Available sizes:
| Name | Descriptive |
|---|---|
x-small |
Single column view |
small |
Two column view |
medium |
5 column view |
large |
Bigger 5 column view |
fullscreen |
5 column view in full screen |
Create new¶
Command id: limepkg_standard_actions.create-new
Parameters:
| Name | Required | Type | Default value | Descriptive |
|---|---|---|---|---|
| limeType | X |
string, LimeType |
- |
What limetype to create |
| limeObject | Record<string, ValueConfig> |
{} |
What value to set in each field (ValueConfig) | |
| autoAttachRelation | string |
Takes first relation that matches LimeType to create | What relation tab on the current object to use for relating the created object |
Open link¶
Command id: limepkg_standard_actions.open-link
Parameters:
| Name | Required | Type | Default value | Descriptive |
|---|---|---|---|---|
| link | X |
ValueConfig |
- |
What value to set in each field (ValueConfig) |
| openInNewTab | boolean |
true |
If the tab should open in a new tab by default | |
| type | LinkType |
url |
What type of link it is (LinkType) |
Link type¶
| Name | Descriptive |
|---|---|
url |
A URL link (Adds https:// if it's missing) |
email |
An email link (Adds mailto: if it's missing) |
phone |
A phone number link (Adds tel: if it's missing) |
custom |
A custom link (Doesn't add anything) |
AI Assist¶
Opens AI Assist and sends a configured prompt. This action is only available when the useGlobalAiChat feature is enabled for the solution.
Command id: limepkg_standard_actions.ai-assist
Parameters:
| Name | Required | Type | Default value | Descriptive |
|---|---|---|---|---|
| prompt | X |
ValueConfig |
- |
The prompt authored as a formula, e.g. Summarise the deal {{ name }} for {{ company.name }}. It is rendered against the current object when the action is clicked (ValueConfig) |
| sendImmediately | boolean |
true |
When enabled, the rendered prompt is sent immediately and appears in the chat as a user message. When disabled, the prompt is placed in the chat composer for the user to review and send |
The prompt is appended to any existing conversation. If AI Assist is not available in the running solution, the action shows a notification instead of doing nothing. See Common config for the shared notification, confirmation, and next-command settings.
Common config¶
Value config¶
Must set either constant OR formula
| Name | Type | Default value | Descriptive |
|---|---|---|---|
| constant | unknown |
- |
Hard coded output value |
| formula | string |
- |
A formula that will be rendered. Read more about it here |
| expectedOutputType | OutputType |
auto |
What type data type the output should be casted to (OutputType) |
Notification parameters¶
| Name | Required | Type | Default value | Descriptive |
|---|---|---|---|---|
| notificationMessage | X |
string |
- |
What message the user should see |
| notificationOptions | NotificationOptions |
{} |
Settings for the notifications Read more here | |
| notificationActionCommand | CommandConfig |
- |
A command to run when the notification's action button is pressed |
When notificationActionCommand is set, the notification's action button runs the configured command when pressed.
The button's label comes from notificationOptions.actionText, so both notificationMessage and notificationOptions.actionText
must be set for the button to show. The action command is a { id, params } config like Next command and can
itself chain a nextCommand, so its steps pass output forward via previousCommand.output.
Confirmation parameters¶
In each command it's possible to configure the following under the confirm parameter in the command.
| Name | Required | Type | Default value | Descriptive |
|---|---|---|---|---|
| title | X |
string |
`` | What title the user should see in the confirmation box |
| message | X |
string |
`` | What message the user should see in the confirmation box |
| options | ConfirmOptions |
{} |
Settings for the notifications Read more here |
Output type¶
| Name | Descriptive |
|---|---|
auto |
If property given, cast based on property type. Otherwise tries to guess the type based on the output value |
int |
Cast to int defaults to null |
float |
Cast to float defaults to null |
str |
Return raw result as string |
datetime |
Cast to datetime if possible |
list |
Cast to a list if possible |
Translations¶
All text parameters you can give is translatable using translation keys. And it also supports placeholders that can be replaced to the commands context.
| Name | Support | Descriptive | Example value |
|---|---|---|---|
limeTypeName |
All commands | Singular name of the limetype you're on | Company |
limeTypeNameLowerCase |
All commands | Singular name in lowercase of the limetype you're on | company |
limeTypeNamePlural |
All commands | Plural name of the limetype you're on | Companies |
limeTypeNamePluralLowerCase |
All commands | Plural name in lowercase of the limetype you're on | companies |
descriptive |
All commands | Descriptive of the limeobject you're on | Lime Technologies |
toCreateLimeTypeName |
Open create new and Create new |
Singular name of the limetype you're about to create | Person |
toCreateLimeTypeNameLowerCase |
Open create new and Create new |
Singular name in lowercase of the limetype you're about to create | person |
toCreateLimeTypeNamePlural |
Open create new and Create new |
Plural name of the limetype you're about to create | Persons |
toCreateLimeTypeNamePluralLowerCase |
Open create new and Create new |
Plural name in lowercase of the limetype you're about to create | persons |
Next command¶
We support something we call Chained commands, meaning that all commands can configure a Next Command that will be executed after the success of the current, this could be a new Standard action or a completly different one.
There are some rules we follow:
- We will pass the same context (Limeobject and LimeType) to all commands in the chain.
- You cannot have any conditions like "Only run command if condition X is met"
- If one command fails, it will show a error message and it won't continue to run the next command.
- The previous command's result is exposed to the next command as
previousCommand.output, usable in formulas. See Chained command output for what's accessible.
In each command it's possible to configure the following under the nextCommand parameter in the command.
| Name | Descriptive |
|---|---|
id |
Id of the command to execute after this one |
params |
What extra params to pass to the nextCommand |
Actions that open a dialog
Open create new is treated as successful as soon as the dialog opens, not when the user saves the new object. If you chain something after it, the next command runs immediately, before the user has clicked Save (or Cancel).
Open form is the exception. It waits for the user to save or cancel before continuing the chain.
For a worked example, see Chain a create-new and update-limeobject command in the examples.