1. Home
  2. Docs
  3. Flexie CRM Methods
  4. getSmartLink method

getSmartLink method

Method

getSmartLink get the Smart Link URL from the Templates / Smart Link menu.

Description

Minimum number of  arguments for this method is 3. The first argument is the URL of the smart link. The second is the entity it belongs to, and the third is the ID of that record.

Last parameter is for shortening the link or not.

Structure of the method:

getSmartLink('Smart Link Alias', 'entity', 'entityId', Shorten Link true/false)

Parameters

Smart Link Alias — The alias of the smart link like shown below.

Entity — The entity smart link belongs to, like lead, contact, account or any custom entity. Note that for default entities the plural ‘s’ is not used, but for custom entities it must be used.

Entity ID — The ID of the record itself, like lead id or contact id. Typically used as {{id}} dynamically in email templates or anywhere when you want to parse it dynamically.

Shorten Link Condition — Defaults to false; If set to true will shorten the smart link.

Examples

In the example below, we generate a short link and then we are sending it by email to a lead.

We can create workflows to listen to the click of this smart link and choose actions like redirect to another link.

//Find all cases for a specific contact. 
Hello {{first_name}},

{% set smartLink = getSmartLink('google_webmaster', 'lead', {{id}}, false)%} 

Check our <a href= "{{ smartlink }}">BLOG</a>

//Output: Generates tracked smart link. If setup to workflow to redirect then it will redirect.

To stay updated with the latest features, news and how-to articles and videos, please join our group on Facebook, Flexie CRM Academy and subscribe to our YouTube channel Flexie CRM.

How can we help?