How to Use Search Forms in Salesforce Marketing Cloud
Search forms are essential tools in SFMC for locating various objects within the platform. Some searches lack simple search functionality. For example, searching Data Extensions is almost impossible without using extensions or a custom cloud application that locates Data Extensions for you.
Naming convention
Let’s first talk about naming conventions. All names for automations, journeys, and activities can simply use spaces—there is no need to add underscores. It is a common practice for teams to use underscores everywhere, and while it’s not a major issue, it’s worth considering that these labels are meant for human readability, not for computers. In APIs, external keys are used, and these can be implemented with any of the naming conventions listed below. Using underscores might cause small issues when searching your items, as _
is used as a wildcard character, which can lead to unintended search results.
Common Naming Conventions
Benefits: Useful for hierarchical naming but may not be supported in all systems.
Camel Case
Format: Start with a lowercase letter; each subsequent word starts with an uppercase letter.
Example: customerData
, emailSubscribersList
Benefits: Compact, readable, and widely used in coding environments. It works with all the objects and won’t cause any issues.
Pascal Case
Format: similar to camel case, but the first word also starts with an uppercase letter.
Example: CustomerData
, EmailSubscribersList
Benefits: Clear word separation and commonly used for naming classes or entities. Same as camel case, it won’t cause any issues on the platform and can be used straight away.
Snake Case
Format: words are separated by underscores and written in lowercase. This is also fine, but within the platform, searches treat underscores as a wildcard character and might return incorrect results.
Example: customer_data
, email_subscribers_list
Benefits: Easy to read and common in database naming, but _
may cause issues in searches.
Kebab Case
Format: Words are separated by hyphens and written in lowercase.
Example: customer-data
, email-subscribers-list
Benefits: Visually clean and avoids wildcard conflicts, but less commonly used in some environments.
Downsides: you would need to wrap data extension names in [ ] to include them in any SQL activity, which makes this formatting not useful at all.
Dot Notation
Format: Words are separated by periods.
Example: customer.data
, email.subscribers.list
Downsides: Dot is a reserved character and will throw a syntax error in any SQL activity.
Errors: The table.name
table has a multi-part specification. This is not allowed.
Understanding Wildcard Characters
In all the search forms we can use wild characters to search our objects:
%
: Represents zero or more characters. For example, searchingmar%
could returnmarketing
,marvel
, ormars
._
: Represents a single character. For example, searchingmar_
could returnmars
but notmarketing
.
Escaping _
in Searches
This is not possible in form searches, so when you use underscores in your names, you might sometimes get results that are slightly different from what you originally thought you would get.
Searching in data extensions
This is one of the most commonly used features, but Salesforce has yet to deliver a fully functional full-text search that works across all folders. As a result, many users resort to external solutions, such as using extensions or building custom Cloud Pages with SSJS to locate data extensions.
Even in the newer Contact Builder, a fully operational full-text search that traverses all folders has not been implemented. The same limitations persist, requiring users to find alternative methods to address these challenges.
Salesforce Marketing Cloud’s search capabilities have certain limitations. For instance, full-text search doesn’t support wildcard characters like asterisks (*) or question marks (?). Additionally, some special characters are ignored, which can lead to unexpected search results.
In Contact Builder, while it’s possible to view and manage contact data, the search functionality doesn’t traverse all folders comprehensively. This limitation often necessitates the use of external tools or custom solutions to effectively locate specific data extensions or contact records.
To mitigate these challenges, users have developed workarounds, such as:
- Browser Extensions: Utilizing third-party extensions to enhance search capabilities within the platform. Everybody that I saw using one used deselect search extension. Not for me though I like pain for the breakfast.
- Custom Cloud Pages with SSJS: Building tailored Cloud Pages that leverage Server-Side JavaScript (SSJS) to perform more advanced searches across data extensions. (Will write blog about this soon)
These approaches, while effective, require additional effort and technical expertise, highlighting the need for more robust native search functionalities within Salesforce Marketing Cloud.
Searching in Automation studio
In Automation Studio, unlike the Data Extension search, the search functionality works properly and provides results from all folders when you search for something. Additionally, you can use wildcard characters to refine your searches, making the process more efficient and effective.
Searching automation activities
There is no search feature that allows you to match all activities at once, instead, you need to select the activity type and then perform the search. This process also ignores the folder where the activity is located and simply provides the results.
However, the search functionality does support the use of wildcard characters, offering a better experience and more flexibility in refining your searches.
Searching in Journey builder
Similar to Automation Studio, you can search all journeys within the space, regardless of the folder they are in. You can also use wildcard characters to make your searches more precise and well-defined.
In Salesforce Marketing Cloud’s Journey Builder, the search functionality allows users to locate journeys by their titles and descriptions, irrespective of their folder locations. This feature enables efficient navigation and management of various customer journeys.
Additionally, Journey Builder supports the use of wildcard characters in search queries, enhancing the precision of search results. For example, using an asterisk (*) can substitute for multiple characters, allowing for broader search criteria. However, it’s important to note that certain characters, such as underscores (_), may be treated as wildcard characters, potentially leading to unexpected search outcomes.
To optimize search effectiveness, it’s advisable to use specific keywords and be mindful of how special characters are interpreted within the platform’s search functionality. This approach ensures that searches yield accurate and relevant results, facilitating better management of journeys within the platform.
Searching in Content builder
Content Builder utilizes a full-text search feature that operates across all folders within the content space. This functionality allows users to locate specific content by typing keywords or filenames into the search field. The search processes information based on categories such as content name and content within files. However, it’s important to note that certain characters, like underscores, are treated as wildcard characters, which can lead to unexpected search results.
Searching in Cloud pages
Cloud Pages’ new user interface introduces a robust search feature that effectively retrieves results from all folders, providing path information for each item.
This search functionality focuses on exact word matches, disregarding wildcard characters like asterisks (*) and question marks (?). Notably, it treats underscores (_) and spaces interchangeably, matching both strings in the search results. This behavior aligns with Salesforce’s search capabilities, where certain special characters are ignored or treated as wildcards, potentially leading to unexpected matches.
By concentrating on exact word matches and standardizing the treatment of underscores and spaces, the new search feature enhances the accuracy and relevance of search results within Cloud Pages.