Skip to main content

Search Kit Tokens

Create your own tokens using search kit

C
Written by CiviPlus Helpdesk
Updated over a month ago

The following functionality requires the "Search Kit Tokens" extension to be enabled on your site. If the "Tokens" display option at step 5 is not present please contact your account manager who can enable this for you.

Introduction:

CiviCRM has many tokens that you can use out of the box, but in fact you can create your own!

Steps:

Out of the box CiviCRM only has tokens for your primary address. Using search kit tokens you can create tokens for other address location types.

Here, we will use an example of creating a token to pull addresses with location type = insurance. Insurance is a custom location type that we have created for this example.

Step:

Details

Screenshot

1

Go to Search > SearchKit

2

Click on NEW SEARCH and start creating a Search Kit search

3

Set the search criteria

  • Search for = Contacts

  • With (required) = Contact Addresses

  • if Address location type = value “Insurance”

4

Add any columns you'd like to use as tokens. Feel free to use field transformations, grouping, etc.

  • Contact Addresss: Street Address

  • Contact Address: Supplemental Address 1

  • Contact Address: Supplemental Address 2

  • Contact Address: Supplemental Address 3

  • Contact Address: City

  • Contact Address: Country

  • Contact Address: Postal Code

5

Create a new display of type "Tokens"

6

Specify a label you'd like to see in your token browser under each field you'd like to use as a token

7

These tokens will appear in the dropdown list of tokens for emails, message templates, certificates etc

8

Select the relevant tokens from the dropdown and they will be populated in emails, documents and letters etc

9

The tokens will feed the value in your email, document and letters etc as per the Search Kit search.


Did this answer your question?