Configure a Single Flow Handler
The NPSP extensions use a multi-phase collection of flows but sometimes, you just want a single flow to get the job done.
Occasionally, an organisation wants to process a notification in a single flow (or Apex) handler. Often this is because the organisation has invested in 'staging objects' that will import data per their business rules using traditional workflow or similar and don't want to rework their implementation.
To support this, the MoveData handlers can be configured to execute a single flow. It is worth noting this does not require the NPSP extensions and can be performed with just the MoveData managed package installed.
The below steps detail how to complete this to support donation (fundraising) notifications.
Configuration Steps
At the conclusion of these steps, you will be routing all donation notifications into a single flow.
Perquisites
Install and configure MoveData per normal instructions.
Create Metadata for Notification Handler
Open Setup -> Custom Code -> Custom Metadata Types
Click "Manage Records" for MoveData Schema Maps
Click "New" and create a new Metadata record with the following settings:
Field Name | Value |
---|---|
MoveData Schema Map Name | donation |
Label | donation |
Handler | MoveDataDonationPipeline |
Type | Apex |
Version | 1.00 |
Click "Save"
Create Metadata to enable Single Flow Handler
Open Setup -> Custom Code -> Custom Metadata Types
Click "Manage Records" for MoveData Pipeline Setting
Click "New" and create a new Metadata record with the following settings:
Field Name | Value |
---|---|
MoveData Schema Map Name | EXTENSION_DONATION_MODE |
Label | EXTENSION_DONATION_MODE |
Handler | single_step |
Type | Config |
Create Metadata to nominate Flow to handle notifications
This requires you to have created a flow to handle notifications.
Open Setup -> Custom Code -> Custom Metadata Types
Click "Manage Records" for MoveData Pipeline Setting
Click "New" and create a new Metadata record with the following settings:
Field Name | Value |
---|---|
MoveData Schema Map Name | PIPELINE_DONATION_SINGLE_STEP |
Label | PIPELINE_DONATION_SINGLE_STEP |
Handler | {Flow Name} |
Order | 5 |
Type | Flow |
Special Considerations
Logging
A single flow supports flow logging. Steps on how to complete this can be found below:
pageAdd Logging to your ExecutionOutputting Records
If you want to output created or modified records from your flow, you will need to create an output-enabled text collection variable named "RecordList".
Using an assignment, you can output an Object ID to the RecordList collection as below:
You will see the added record in the notification detail page like below:
Last updated