Assign a Default Value
J
Written by James Gilray
Updated this week

This article will show you how to set a default value in your Flow. It will also serve as the foundation article for other examples in this section. In this example, we will set the field Acknowledgement Status (npsp__Acknowledgment_Status__c) on the Opportunity record to always be Acknowledged.

Create Flow

To create your Flow, go to Setup β†’ Process Automation β†’ Flows and click New Flow. Select Autolaunched Flow (No Trigger) from the available options and click Create.

Create Record Variable

Open Toolbox and click New Resource. Create a new resource with the following information:

Item

Value

Comment

Resource Type

Variable

API Name

Record

Autogenerated

Data Type

Record

Object

Opportunity

The object this Flow relates to

Available for Input

True

Available for Output

True

Assign Value

In your Flow click the + icon to add a new Element and select Assignment. Configure your assignment with the following information:

Item

Value

Comment

Label

Set Acknowledgement Status

API Name

Set_Acknowledgement_Status

Autogenerated

Variable

{!Record.npsp__Acknowledgment_Status__c}

  • Record is the object the logic is to apply to (in this case the Opportunity record)

  • npsp__Acknowledgment_Status__c is the field the logic is to apply to

Operator

Equals

Value

Acknowledged

The value the logic is to set

Your Flow should now look like:

Save Flow

You can now save your Flow. The naming convention is not used by the integration, but we recommend applying a format which mimics the MoveData Managed Flows. Since this Flow will be running alongside the Managed Flow [MoveData] Donation: Donation - Mapping we recommend using a format like:

Item

Value

Flow Label

[MoveData Extension] Donation: Donation - Mapping

Flow API Name

MoveData_Donation_Donation_Mapping_Ext

Register Flow

Assumption

To register your Flow, go to Setup β†’ Custom Code β†’ Custom Metadata Types and click Manage Records next to MoveData Pipeline Setting.

We recommend finding the existing entry which points to the Managed Flow your newly developed Flow will be running alongside of. In this case it is PIPELINE_DONATION_DONATION_MAPPING. Open the entry and click Clone.

Configure your metadata entry with the following information and click Save:

Item

Value

Comment

Handler

MoveData_Donation_Donation_Mapping_Ext

API Name of your Flow

Type

Flow

Label

PIPELINE_DONATION_DONATION_MAPPING

MoveData Pipeline Setting Name

DONATION_DONATION_MAPPING_EXT

Order

6

Your Flow is now registered in MoveData.

Reprocess Notification

You can now open a relevant notification and click Reprocess:

Observe that the value Acknowledged is set in the execution log and resultant record:

Did this answer your question?