Skip to content

Examples

Below you can see a few examples where we use our commands to create promoted actions in the Web client.

You can read more about it in the Lime CRM Platform Documentation

Open create new

Create a todo 7 days in the future

This will open a dialog for creating a new todo with the following pre-filled:

  • Subject: Follow up
  • Start time: 8:30 AM - 7 days from now

How it looks

Example of creating a todo

How to configure

Go to Lime admin => Views => Company.

Add a promoted action with:

Command id:

limepkg_standard_actions.open-create-new

Action label - Write a label that suits the action i.e. Follow up

Icon - Select an icon that suits the action i.e. date_to

Color - Select a color that suits the action i.e. rgb(var(--color-teal-light))

Parameters:

{
    "limeType": "todo",
    "limeObject": {
        "subject": {
            "constant": "Follow up"
        },
        "starttime": {
            "formula": "{{ context.today | add_days(7) | add_hours(8.5) }}"
        }
    }
}

Create a History note with type Sales call with some predefined values

This will open a dialog for creating a new history with the following pre-filled:

  • Type: Sales call
  • Note: Me and <Person firstname> talked about...

How it looks

Example of creating a salescall

How to configure

Go to Lime admin => Views => Person.

Add a promoted action with:

Command id:

limepkg_standard_actions.open-create-new

Action label - Write a label that suits the action i.e. Add sales call

Icon - Select an icon that suits the action i.e. call_female

Color - Select a color that suits the action i.e. rgb(var(--color-gray-default))

Parameters:

{
    "limeType": "history",
    "limeObject": {
        "type": {
            "constant": "salescall"
        },
        "note": {
            "formula": " Me and {{firstname}} talked about..."
        }
    }
}

Update lime object

Mark a person as inactive

Set the person to inactive and gives the user a message. It's only visible when the person is active.

How it looks

Example of marking a person as inactive

How to configure

Go to Lime admin => Views => Person.

Add a promoted action with:

Command id:

limepkg_standard_actions.update-limeobject

Action label - Write a label that suits the action i.e. Set as inactive

Icon - Select an icon that suits the action i.e. remove_user_male

Color - Select a color that suits the action i.e. rgb(var(--color-red-dark))

Parameters:

{
    "limeObject": {
        "inactive": {
            "constant": true
        }
    },
    "notificationMessage": "Person is now inactive, meaning it won't be selectable in relation fields"
}

Visibility:

Read more about visibility at Configuring Custom Action Visibility

  1. Select Custom.
  2. Set Condition ID to:

    limeobject-matches-filter
    
  3. Set the following condition:

    {
        "key": "inactive",
        "op": "IN",
        "exp": [false]
    }
    

Take ticket

Set logged in coworker as responsible, set status to started if new and set the start date to now if not already set.

How it looks

Example of taking an action to take a ticket

How to configure

Go to Lime admin => Views => Ticket/Helpdesk.

Add a promoted action with:

Command id:

limepkg_standard_actions.update-limeobject

Action label - Write a label that suits the action i.e. Take ticket

Icon - Select an icon that suits the action i.e. whole_hand_right

Color - Select a color that suits the action i.e. rgb(var(--color-gray-default))

Parameters:

{
    "limeObject": {
        "helpdeskstatus": {
            "formula": "{{'waiting_us' if helpdeskstatus == 'new' else helpdeskstatus}}"
        },
        "coworker": {
            "formula": "{{context.active_user.id}}"
        },
        "started": {
            "formula": "{{started or context.now}}"
        }
    }
}

Visibility:

Read more about visibility at Configuring Custom Action Visibility

  1. Select Custom.
  2. Set Condition ID to:

    limeobject-matches-filter
    
  3. Set the following condition:

    {
        "key": "coworker",
        "op": "!=",
        "exp": "$me"
    }
    

Open form

Close a deal

A command for closing a deal. This example opens a form where the field Won/Lost reason is required to set before saving. When saved, the information is set and dealstatus is updated to 4. Agreement.

How it looks

Example of closing a deal

How to configure

Go to Lime admin => Views => Deal.

Add a promoted action with:

Command id:

limepkg_standard_actions.open-form

Action label - Write a label that suits the action i.e. Close deal

Icon - Select an icon that suits the action i.e. agreement

Color - Select a color that suits the action i.e. rgb(var(--color-gray-default))

Parameters:

{
    "properties": {
        "wonlostreason": {
            "options": {
                "required": true,
                "help": "When filling in the 'Won/Lost' reason, consider the following:\n\n\n**Specific events or interactions**: Did a particular meeting or conversation sway the decision?\n\n**Product or service factors**: Was there something about our offering that stood out — for better or worse?\n\n**Competitor influence**: Did competitors play a role in the outcome?\n\n**Pricing considerations**: Was the pricing appropriate for the value provided?\n\nYour insights will help us improve and adapt our strategies for future opportunities. Thank you for your contribution!",
                "layout": {
                    "rowSpan": 4
                }
            }
        }
    },
    "limeObject": {
        "dealstatus": {
            "formula": "agreement"
        }
    },
    "dialog": {
        "size": "small",
        "heading": {
            "title": "Won the deal"
        }
    }
}

Visibility:

Read more about visibility at Configuring Custom Action Visibility

  1. Select Custom.
  2. Set Condition ID to:

    limeobject-matches-filter
    
  3. Set the following condition:

    {
        "key": "dealstatus",
        "op": "IN",
        "exp": ["tender", "contact", "requirement", "onhold"]
    }
    

Close helpdesk/ticket

A command for closing a ticket and setting Solution in the same workflow. This example opens a form where the field Solution is required to set before saving. When saved, the information is set and helpdeskstatus is updated to Closed.

How it looks

Example of solving a ticket

How to configure

Go to Lime admin => Views => Ticket/Helpdesk.

Add a promoted action with:

Command id:

limepkg_standard_actions.open-form

Action label - Write a label that suits the action i.e. Mark as solved

Icon - Select an icon that suits the action i.e. checked

Color - Select a color that suits the action i.e. rgb(var(--color-green-default))

Parameters:

{
    "properties": {
        "solution": {
            "options": {
                "required": true
            }
        }
    },
    "limeObject": {
        "helpdeskstatus": {
            "formula": "done"
        }
    },
    "dialog": {
        "size": "small",
        "heading": {
            "title": "Mark ticket as solved",
            "subtitle": "Please provide a solution to the issue",
            "color": "rgb(var(--color-green-default))",
            "icon": "checked"
        }
    }
}

Visibility:

Read more about visibility at Configuring Custom Action Visibility

  1. Select Custom.
  2. Set Condition ID to:

    limeobject-matches-filter
    
  3. Set the following condition:

    {
        "key": "helpdeskstatus",
        "op": "IN",
        "exp": ["waiting_us", "waiting_customer", "new"]
    }
    

Delegate ticket

A command for delegating a ticket to another coworker.

How it looks

Example of delegating a ticket

How to configure

Go to Lime admin => Views => Ticket/Helpdesk.

Add a promoted action with:

Command id:

limepkg_standard_actions.open-form

Action label - Write a label that suits the action i.e. Delegate

Icon - Select an icon that suits the action i.e. add_user_male

Color - Select a color that suits the action i.e. rgb(var(--color-gray-default))

Parameters:

{
    "properties": {
        "coworker": {
            "value": {
                "formula": ""
            },
            "options": {
                "required": true,
                "component": {
                    "name": "lwc-limepkg-hierarchy-picker-card",
                    "props": {
                        "name": "helpdesk-delegate"
                    }
                },
                "layout": {
                    "colSpan": "all"
                }
            }
        }
    },
    "dialog": {
        "size": "small",
        "heading": {
            "icon": "add_user_male",
            "color": "rgb(var(--color-gray-default))",
            "title": "Delegate to agent"
        }
    }
}

Visibility:

Read more about visibility at Configuring Custom Action Visibility

  1. Select Custom.
  2. Set Condition ID to:

    limeobject-matches-filter
    
  3. Set the following condition:

    {
        "key": "helpdeskstatus",
        "op": "IN",
        "exp": ["new", "waiting_us", "waiting_customer"]
    }
    

Create new

Create a todo 7 days in the future

This will create a new todo with the following pre-filled:

  • Subject: Follow up
  • Start time: 8:30 AM - 7 days from now

How it looks

Example of creating a todo

How to configure

Go to Lime admin => Views => Company.

Add a promoted action with:

Command id:

limepkg_standard_actions.create-new

Action label - Write a label that suits the action i.e. Follow up

Icon - Select an icon that suits the action i.e. date_to

Color - Select a color that suits the action i.e. rgb(var(--color-teal-light))

Parameters:

{
    "limeType": "todo",
    "limeObject": {
        "subject": {
            "constant": "Follow up"
        },
        "starttime": {
            "formula": "{{ context.today | add_days(7) | add_hours(8.5) }}"
        }
    }
}

Open a pre-filled email

Pops an e-mail in your mail client.

Prefilled with:

  • Subject with merge codes
  • Recipients (both to and cc)
  • Body with merge codes

How it looks

Example of opening a prefilled email

How to configure

Go to Lime admin => Views => Deal.

Add a promoted action with:

Command id:

limepkg_standard_actions.open-link

Action label - Write a label that suits the action i.e. Send e-mail

Icon - Select an icon that suits the action i.e. email

Color - Select a color that suits the action i.e. rgb(var(--color-gray-default))

Parameters:

{
    "link": {
        "formula": "{{person.email}}?subject=Regarding%20{{name | urlencode}}&[email protected]&body=Hello%20{{person.firstname}}%0A%0AYou%20work%20at%20{{person.company.name | urlencode}}"
    },
    "type": "email"
}

Visibility:

Read more about visibility at Configuring Custom Action Visibility

  1. Select Custom.
  2. Set Condition ID to:

    limeobject-matches-filter
    
  3. Set the following condition:

    {
        "key": "person",
        "op": "!=",
        "exp": null
    }