Question

Adding custom fields expressions in Action Templates

  • 5 October 2023
  • 2 replies
  • 85 views

Badge +3

Hi,

I'm working on an Action Template and require the custom field values in a form entered by the user to automatically populate into the template.

As of now, we are only capable of pulling Standard field values of a form, but my question is for Custom field in a form.

 

  1. Is it possible to get them auto-populate by writing expressions? If so, then please let us know.

 

  1. Also is it possible to grab the details of the user from his/her contact-user profile using an expression in the template?

 

Below is a Service Offering Form and we need some of its CUSTOM fields to automatically populate in our Action Template.

A form with Custon fields highlighted.

Thank you in advance.


2 replies

Userlevel 3
Badge +8

Hi Neha, 

Yes you can add custom fields onto an email, you need to use the following:

[SM_CUV_VariableName]

The variable name needs to match the Shortcode of the variable on your form, that variable is named as a single string - eg “ROOTCAUSE” rather than “ROOT CAUSE” or “ROOT-CAUSE”. 

If you wish to email out all system fields you can use:

[SM_CUSTOM_FIELDS]

It is possible to add additional “system” variables to your variables list - by this needs to be done on your integration server, opening the Additional_Variables.lua file found within your action processor. You will need to give the variable a name and then give the path of the field you wish to add example: 

["AV_AFF_USER_EMAIL"] = "event.affectedUserEmail",

Gives us the the affected users email address. These values would be added to your action templates in the following format 

[SM_AV_AFF_USER_EMAIL]

Be careful of adding too many custom variables to your additional variables file though as this can increase your outbound mail processing time significantly. 

I hope this helps 

Kevin

Badge +5

For an action template, you can use the following syntax:

 

For single select lookup:

 

$new.event.W("SHORTCODE").name

 

For string fields:

 

$new.event.W("SHORTCODE")

 

Not sure about other field types (boolean, multi select, date, etc).

Reply