Add a Create New Action to a Combobox
Add a New contact action inside a Combobox dropdown that opens a short flow, so agents create a missing contact without leaving the case screen.
A support agent logging a case searches for the caller in a Contact combobox. When the caller is not in Salesforce yet, leaving the screen to create the contact loses the case in progress. A New contact action inside the dropdown opens a short flow in a dialog, prefilled with what the agent typed, then refreshes the list so the agent can pick the new contact.

Before you start
A Contact combobox with a Query data source on Contact and Show Search on. Search Large Lists in a Combobox sets it up. In this tutorial its API Name is
Contact_Picker.An active screen flow that creates the contact, for example
New_Contact:a Text variable
lastName, Available for input;a screen with First Name, Last Name (default value
{!lastName}) and Email;a Create Records element for the Contact;
a Text variable
newContactId, Available for output, that holds the new record Id.
Steps
Add the action to the dropdown
In the Properties tab, open the Actions group and add an action.
Set Label to
New contactand Name tonew_contact. The interaction finds the action by its Name, so keep it unique.Set Icon Name to
utility:add.Turn on Display on Search, so the action shows while the agent types a name.

Choose when the action shows:
Always visible, pinned at the bottom of the list
Position Bottom, Fixed on
Only while the agent types
Display on Search on
Only when a search finds nothing
Display on Search on, then Display When No Results on
Position and Fixed apply to an action that is always visible: the panel hides them once Display on Search is on. Display When No Results only appears after Display on Search is on.
Open the New contact flow on click
In the Interactions tab, add an interaction under Action Click.
In Target Name, select the New contact action (the picker lists actions by label). Each action needs its own Action Click interaction.
Set the type to Open Flow Dialog and, in API Name, select your New contact flow (the picker lists flows by label).
Under Input Variables, add a row: Name
lastName, Type Text, Value Search Term. The flow opens with the text the agent typed.Set Modal Header to
New contact.

See Open Flow Dialog for the dialog size and footer options.
Refresh the list when the flow finishes
In the same interaction, under On Finish, add Refresh Query. Components to refresh already holds this combobox by default: keep it.
Optional: add Show Toast after it to confirm the contact was created.
On Finish runs only when the flow completes. If the agent closes the dialog, On Close runs instead, so the list stays as it was.
Reuse the new contact Id and the clicked action (optional)
To use the new contact later in the flow, add a row under Output Variables: API Name
newContactId, Variable NumberVariable 1. After the dialog finishes, read it as{!Contact_Picker.flowInteractionOutputVariables.variable1.textValue}. Flow Interaction Output Variables explains the slots.The combobox output Clicked Action Name (
clickedActionName) holds the Name of the action the agent clicked. With several actions, use it in a Decision after the screen.
Save and test
Save the flow and click Debug or Run. Interactions do not run in the Component Builder preview.
Type a name that has no contact, for example
Lena Park: New contact appears in the dropdown.Click it: the dialog opens with
Lena Parkin Last Name.Finish the flow: the dialog closes and the Contact combobox reloads. Search again and pick the new contact.
Troubleshooting
Related tutorials
Search Large Lists in a Combobox: the searchable Contact combobox this action sits in.
Use a Combobox Selection in a Query or Flow: pass the picked contact to the rest of the flow.
Build Combobox Options: choose the data source before adding actions.
Was this helpful?
