String Wizard is an Invocable Action that can be used in Flow. It provides no-code access to all of the string functions that Apex developers have access to use.
It enables you to do string processing that was previously only accessible in apex and not in the Salesforce formula.
1. Lets you process your String (or text) with selected method
2. Minimizes the need for complex Flow formulas
Configuration Part 1: Select the Method
This picklist lists the available string functions.
When you select a string function, the custom property editor displays its description and provides a link to official documentation.
The admin is also shown the anticipated outputs.
Configuration Part 2: Configure the Inputs
Based on the method you select, appropriate inputs are shown, taking advantage of the dynamic capabilities of custom property editors. In the example below, the method substringBetween has been selected. This method lets you provide three strings and searches the first string to return everything between the second string and the third string. Here’s what it looks like in the property editor of StringWizard:
To check what types of input allowed, you can also use popup help text.
There, you can also check whether the field is required.
To accommodate the many different string functions, the StringWizard makes 6 different types of output available:
- String Result : Text Variable
- Integer Result : Number Variable
- Boolean Result : Boolean Variable
- String List Result : Collection of Text Variable
- Integer List Result : Collection of Number Variable
Make sure you map downstream inputs to the correct output. If you’re having difficulty, use Debug mode to see where the output is showing up.
- Method not Selected
2. Mandatory Input not Filled
3. Wrong data type mapping in the inputs
Your org must first have the ActionBasePack and ScreenComponentsBasePack.
Version 1.0 1-28
InvocableStringWizard 1.0 : Initial Release
All of these are combinations between Invocable Method in Apex and CPE. The invocable method itself is just a collection of small methods that will be invoked based on the method input.
Input variables in Invocable Method (without CPE config):
1. Method (String, mandatory) : Apex String method available in Apex
2. Main String (String, optional) : available whenever the method requires
3. Integer 01 (Integer, optional) : available whenever the method requires
4. Integer 02 (Integer, optional) : available whenever the method requires
5. String 01 (String, optional) : available whenever the method requires
6. String 02 (String, optional) : available whenever the method requires
7. Integer List (List, optional) : available whenever the method requires
8. String List (List, optional) : available whenever the method requires
Output variables in invocable method :
1. Boolean Result
2. Integer List Result
3. Integer Result
4. String Result
5. String List Result
The CPE in this invocable method stored the mapping for the list of methods available, what should be shown to the flow developer, and some validations. Mapping stored inside invocableStringWizardEditorMapping.js and that includes method, description, output, and fields input configuration (to show or not, mandatory or not, what label to show, what help text to show). And utilizing CPE flow combobox to let flow developers be able to see the list of available variables.
List of Mapping from Invocable Method to CPE :