How to make dynamic templates based on user requirements (using Field type)

This guide explains how the Xink admin can make the company templates flexible to meet specific end-user requirements - Without additional workload on the Xink administrator. 

To let employees manage field content in their own signatures, the Xink admin adds dynamic content to the email signature template based on the employees’ selection.

Scenario

Employees are allowed to remove their mobile number, add their own headshot photo to their email signature, and they can select among approved banners before sending the email.

Open Preferences in the top right corner of the window:

Click Fields in the top menu:

Edit the field and check it as 'Editable by the employee':

The marked fields will appear in employees' 'Edit contact details' form in the Xink app in the systray. 

Here the employees can adjust their fields' values and check their results after updating the sig in their emails.

But before giving such access to the employees, the Xink admin should make a little coding to make the template dynamic and flexible to meet employee requirements.

This is the original signature without any individual changes from the employees' side:

How to allow employees to remove their photo

If the employee doesn't want her photo on the signature, she just 'Clear' it in her Contact Details in the Xink app in the tray and save.

After the update she will get the signature with RED X in Outlook:

To avoid a Red X, when users delete their photo, the Photo field should be wrapped into the {$$NULL( )$$VALUE( )$$} statement:

{$$NULL( )$$VALUE( )$$}

How to allow employees to remove their phone number

If the employee doesn't want to show her cell number in her email, she unselects 'Show cell number' and saves it.

The below statement says that when the 'Cello' field is empty/unchecked (False), then the value from THEN its removed, ELSE 'Cell: ((Mobile))' will show: 

{$$CASE(Cello)$$WHEN(False)$$THEN()$$ELSE(cell: ((Mobile)) )$$} 

 

Remember (from above) that 'Cello' is the name of the field, 'Show cell number' is the description of the field and the field type is 'Check':

Now check the result in Outlook and see that the coding has removed the cell number because the cell number was unchecked by the employee:

How to allow employees to choose their campaign from a drop-down list

The employee also can select the values from the drop-down list, for instance, the banners, for her signature. 

But first, the administrator should insert the next condition to the signature to make the banners display correctly as the employee wishes.

We use the CASE statement:   

{$$CASE(Banner)$$WHEN(Integration API promotion)$$THEN(Integration API promo)$$WHEN(eBook promotion)$$THEN(eBook promo)$$ELSE()$$}

So when the employee chooses the 'Integration API promotion' value, then the Integration API promo banner will render in her signature.

when she selects the 'eBook promotion' value from the drop-down list, the eBook promo banner displays.

If nothing is chosen, the ELSE value is applied, and it is empty in our case, so no banner will be placed under the signature.

The employee chose the 'Integration API promotion' from the drop-down list 'Show this banner' in the Xink app in the tray and saved it.

After updating the Integration API promo banner displays in Outlook.

The employee selected the 'eBook promotion' from the drop-down list 'Show this banner' in the Xink app in the tray and saved it.

After updating the eBook promo banner displays in Outlook.

How to allow the employee to remove their LinkedIn icon

Below, the admin let the employee manage her LinkedIn info as a string and check types. So we'll consider both versions in different conditions.

If an employee doesn't want the LinkedIn icon to be rendered in the signature, the employee uncheck 'Show LinkedIn icon':

{$$CASE(bja)$$WHEN(False)$$THEN()$$ELSE(
<a href="https://((linkedIn))">
<img alt="LinkedIn" border="0" height="25" nosend="1" src="/Images/Get/G3/L82.jpg" width="21" />
</a>
)$$}

If the employee clears the value in the 'My LinkedIn link', another statement is required

This statement will show the company link if the user doesn't enter their link:

{$$IFNULL(LinkedIn)$$THEN(
<a href="https://www.company.com/linkedinURL"><img alt="LinkedIn" border="0" height="25" nosend="1" src="/Images/Get/G3/L82.jpg" width="21" /></a>)$$ELSE(((LinkedIn))
)$$}

More examples 

Q: We would leverage a drop-down list with a selection of blogs.  
If someone selects Blog A, then we would want the associated blog picture added to the signature with a hyperlink going to the particular blog page.

A: Assume that the blog page is www.company.com/blog1 (blog dropdown name is 'blog') and that the icon associated with this is /img/ab1 (URL given by Xink) and another blog ../blog2 and image /ab2.

{$$CASE(blog)
$$WHEN(www.company.com/blog1)$$THEN(<td><a href=www.company.com/blog1><img src="/img/ab1"></a></td>)
$$WHEN(www.company.com/blog2)$$THEN(<td><a href=www.company.com/blog2><img src="/img/ab2"></a></td>)
$$ELSE(Some default)$$}

Q: If someone wanted to add their LinkedIn or Twitter, we would want them to select an option (maybe a checkbox) and then allow them to add in their personal LinkedIn or Twitter information that gets linked to the icons.
 If no item is selected then no icon would appear.

A: There is already a LI field, let''s call it 'Linkedin' and it contains the URL.
There is also a checkmark "include my LI profile", this checkmark we call 'chkLI'.   

{$$CASE(chkLI)
$$WHEN(true)$$THEN(<a href=((Linkedin))><img src=inkedinurl></a>)
$$ELSE()$$}

Q: Secondary office address. 

We would want users to have the ability to choose a secondary office (some of our partners have multiples office locations) perhaps from a drop-down list and then we can have the address populated, but would still need them to enter in their secondary office phone number. 

A: Checkmark called 'chkAddress' with the text "Use my second address". You have a field for secondary tel number ((2ndtel)), first, tel number is ((Telephone)).

When checkmark set, the second address will display and the second phone. Else you want the primary. 

{$$CASE(chkAddress)
$$WHEN(true)$$THEN(<b>67000 First Address Drive<br>Beverly Hills, 90210<br>Tel: ((Telephone))</b>)
$$WHEN(false)$$THEN(<b>870 The Strip<br>Las Vegas, 80780<br>Tel: ((2ndtel))</b>)
$$ELSE()$$}

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
Quick 1-on-1 Demo | Ⓒ 2024 Xink