Associate Context Definitions with Unified Catalog
Enlist your context definitions in Unified Catalog to make them available for building
service processes. After creating a context definition, you must make it available within Unified
Catalog. This step allows its predefined attributes to be selected and included in the process
type—Case, Incident, or Service Request.
Unified Catalog uses only the Output and Input-Output attribute types for each node.
Associate ApexClass with Context Definition
From Setup, in the Quick Find box, enter Unified Catalog, and then
select Unified Catalog.
Click New Context Definition.
Specify the context definition details.
Select the context definition that you want to associate with Unified
Catalog.
Select the mappings for Read and
Write.
To handle custom logic, click New Apex Class and create your own
custom Apex classes. Else, use the provided default options.
This process requires Apex classes. They define the specific Data Structure required to
transfer information from a Salesforce Flow to an invocable Apex action.
Note All custom Apex classes must use the context definition's API name as a prefix. Also,
all classes must include the tag name of the Context Definition attributes as properties or
class fields.
Save your context definition.
The context definition is now available for selection within the Unified Catalog's selected
process type.
Configure Custom Dataflow in Flow Builder
Define and send custom data through Apex-Defined resources: To send the custom data
collected through the Flow to an invocable action, you must first define Data Structure. You
define Data Structure by using Apex-Defined Resources in the flow.
In Flow Builder, go to the Manager tab and click New
Resource.
Set Resource Type to Variable.
Enter API Name (for example, contextDef) and
optionally a description.
Set Data Type to Apex-Defined.
Select the Apex Class that you defined when creating the context
definition.
If your data structure requires deep nesting, you must repeat these steps to create
separate Apex-Defined Variables for the nested custom types.
Check the Available for input or Available for
output options if the variable requires access outside the Flow.
Click Done.
Populate the Data Structure by adding an Assignment element to the flow and specify its
name and API name (for example, assignContextData).
In the Set Variable Values section, populate the custom data structure:
Assign values to the attributes of the variables.
Use the Add operator to build the nested structure by adding
the nested Apex-Defined variables into their parent variable.
To send the data to the invocable action, add an Action element to the flow for the
invocable action (for example, SampleService).
In the Set Input Values section, turn on the Context Attributes switch to include context
resources and add the new resource.
Locate the input field for the context data (contextDef) and apply the fully populated
Apex-Defined variable from the Assignment step as the input value.
Save and activate the flow.
Heeft dit artikel uw probleem opgelost?
Laat ons weten wat we kunnen doen om te verbeteren!
Wordt geladen
Salesforce Help | Article
Cookie Consent Manager
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.