Wildcard “Substitute” Functionality

Overview

The IOC Wildcard Substitute functionality was developed to allow for the insertion of a substitute value in cases where the original requested wildcard value is empty. For example, imagine an email using a wildcard that inserts the client’s US phone number. If a client doesn’t have a US phone number, instead of showing an empty space where the phone number should be you can include the text “No US Phone number on record. ”The substitute value can be either a predetermined string (Ex. “No US Phone Number on record.”) or a different wildcard (Ex. ioc_clientforeignphone). In addition, multiple substitutes can be designated but only the first substitute to return as none empty will be inserted.

Example:

  No Substitute With Substitute
Wildcard Code Dear %name%,
Please confirm that the US phone number listed below is correct.
US Phone Number: %ioc_clientusphone%
Dear %name%,
Please confirm that the US phone number listed below is correct.
US Phone Number: %ioc_clientusphone|’No US Phone on record.’%
Final Email Content  Dear Test Student,
Please confirm that the US phone number listed below is correct.
US Phone Number:
Dear Test Student,
Please confirm that the US phone number listed below is correct.
US Phone Number: No US Phone on record.

Usage

A “Substitute” wildcard is used in much the same way as a regular wildcard but it requires the addition of at least one substitute value after the primary wildcard. The substitutes, which can be a wildcard(s) or a string, are separated from the primary wildcard and each other by the pipe | icon. Example: %wildcard1|’Replacement text’%. Please note the following rules:

Like all wildcards, the start and end of a “Substitute” wildcard is marked by the percent signs %.

There must not be any extra percent signs between the start and end percent signs.

Each substitute is separated by the pipe | icon.

Substitutes can be either wildcards (Ex. ioc_clientusphone) or a text string (‘No phone on record.’).

Text string substitutes must start and end with single quotes.

You can include as many substitutes as you wish, however using one substitute will be the most common configuration.

Usage Example (One substitute):
Wildcard Code: %ioc_clientusphone|’No US phone on file.’%
Behavior: If the client has a US phone listed in their profile it will be inserted. If no US phone is listed, the text “No cellphone on file.” will be inserted.

Usage Example (Two substitutes):
Wildcard Code: %ioc_clientusphone|ioc_clientfrnphone|’No US or foreign phone on file.’%
Behavior: If the client has a US phone it will be inserted. If the client does not have a US phone but they do have a foreign phone, the foreign phone will be inserted. If the client has neither a US or foreign phone, the text “No US or foreign phone on file.” will be inserted.