Skip to content

Pipeline context variables are input variables that MoveData passes into your Lightning Flows during pipeline execution. They provide information about the current processing state, the type of record being processed, and records created in earlier stages.

Understanding these variables is essential when you build custom flows that need to apply different logic depending on the record type, access records from earlier stages, or read notification data from the source platform.

Viewing available variables

You can see every variable available at each stage by clicking View Variables in the execution log within the MoveData app. This shows variable names, types, descriptions, and current values at that processing stage.

Variable categories#

MoveData pipeline context variables fall into four categories:

Category Purpose Example
Stage context variables Indicate what type of record is being processed within the current stage Context_ContactType, CampaignIndex
Record variables Provide the Salesforce SObject record for reading and writing field values Record, CampaignRecordAlt
Cross-stage record variables Reference records created or matched in earlier pipeline stages ParentAccount, DonorContact, DonationCampaign
Notification and platform variables Supply data from the source fundraising platform notification Platform, PlatformKey, Config_* variables

For flow command variables (Cancel, Break, Continue, PostUpsert) and execution context variables (DuplicateCheck, IsActor), see the flow command reference and flow variable reference.

Stage context variables#

Each pipeline stage can process multiple record types. For example, the contact stage processes donors, fundraisers, tribute contacts, and matched gift contacts. Stage context variables tell your flow which type of record is being processed in the current iteration.

Donation pipeline#

Account stage context#

The account stage runs once for each account type present in the notification.

Variable Type Values Description
Context_AccountType Text donor, fundraiser, matchedDonor, recurringDonor The type of account being processed.
Context_Fundraiser Boolean true / false The current account is a fundraising organisation.
Context_Donor Boolean true / false The current account is a donation source organisation.
Context_RecurringDonor Boolean true / false The current account is a recurring donor organisation.
Context_MatchedDonor Boolean true / false The current account is a matched gift company.

Contact stage context#

The contact stage runs once for each contact type present in the notification.

Variable Type Values Description
Context_ContactType Text donor, fundraiser, matchedDonor, recurringDonor, tributeContact The type of contact being processed.
Context_Fundraiser Boolean true / false The current contact is an individual fundraiser.
Context_Donor Boolean true / false The current contact is an individual donor.
Context_RecurringDonor Boolean true / false The current contact is a recurring donor.
Context_MatchedDonor Boolean true / false The current contact is a matched gift contact.
Context_TributeContact Boolean true / false The current contact is a tribute or memorial contact.

Campaign stage context#

The campaign stage runs once for each campaign in the hierarchy. A peer-to-peer fundraising notification can contain multiple campaigns (event, team, fundraiser page).

Variable Type Description
CampaignIndex Number Zero-based position of the current campaign within the hierarchy. The top-level campaign has index 0.
CampaignCount Number Total number of campaigns in the hierarchy for this notification.
CampaignIdList Text Comma-separated list of Salesforce IDs for campaigns processed so far. Use this to reference previously created campaigns.
HasCampaignAccount Boolean The current campaign has a linked account (fundraising organisation).
HasCampaignContact Boolean The current campaign has a linked contact (individual fundraiser).
HasParentCampaign Boolean The current campaign has a parent campaign in the hierarchy.

Campaign hierarchy example

For a peer-to-peer notification with an event campaign, a team, and an individual fundraiser page, CampaignCount would be 3. The event campaign processes first (CampaignIndex = 0), followed by the team (1), then the fundraiser page (2).

Recurring and donation stages#

The recurring and donation stages do not have stage-specific context variables because they each process a single record type per notification. The recurring stage only runs when the notification contains a recurring donation.

Commerce pipeline#

The commerce pipeline shares the Account, Contact, and Campaign stages (and their context variables) with the donation pipeline.

The Catalogue, Order, and Order Item stages do not define additional stage context variables. They each process a single record type per iteration.

Record variables#

Every pipeline stage passes a record variable into your flows. This variable represents the Salesforce SObject record that MoveData is creating or updating for the current stage.

The Record variable#

Variable Direction Type Available in
Record Input/Output SObject (stage-specific) Mapping flows, record match flows, post-upsert flows

The SObject type of Record depends on the stage and the extension:

Stage NPSP SObject type Nonprofit Cloud SObject type
Account Account Account
Contact Contact Account (Person Account)
Campaign Campaign Campaign
Recurring npe03__Recurring_Donation__c GiftCommitment
Donation Opportunity GiftTransaction
Catalogue Product2 Product2
Order Opportunity Opportunity
Order Item OpportunityLineItem OpportunityLineItem

In mapping flows, Record is available for both input and output. You read existing field values and assign new values to it. MoveData upserts the record after the mapping flows complete.

In post-upsert flows, Record is input-only. The record has already been saved to Salesforce and includes the Salesforce record ID.

Alt record variables#

When you change the SObject type for a stage (either through static metadata or a dynamic SObject flow), MoveData renames the record variable to prevent type conflicts in existing flows.

The renamed variable follows the pattern {Stage}RecordAlt. For example:

  • If the Campaign stage SObject is changed from Campaign to Opportunity, the record variable in downstream flows becomes CampaignRecordAlt.
  • If the Contact stage SObject is changed from Contact to Lead, the record variable becomes ContactRecordAlt.

Update your variable references

If you change the SObject type for a stage, you must update all references to the record variable in your custom flows to use the Alt suffix. Flows that reference the original variable name receive null instead of the record data.

The Alt naming applies not only within the current stage's flows but also when the record is passed as a cross-stage variable to later stages.

Fieldset scope#

The fields available on the Record variable are determined by the fieldset configured for the stage. Only fields included in the fieldset are queried from Salesforce when an existing record is matched.

If you need to read or write a field that is not on the record variable, add it to the relevant fieldset in Salesforce Setup.

Cross-stage record variables#

As MoveData processes each pipeline stage, records created or matched in earlier stages become available as input variables in later stages. This enables your flows to reference related records without querying Salesforce.

Donation pipeline cross-stage variables#

The following table shows which cross-stage record variables are available at each donation pipeline stage.

Variable Type Available from stage Description
ParentAccount Account SObject Contact, Campaign, Recurring, Donation The account record created or matched in the account stage. Available to the contact stage for linking contacts to accounts, and to later stages for relationship management.
DonorContact Contact SObject Recurring, Donation The primary donor contact record created or matched in the contact stage. Used in later stages to link donations and recurring records to the donor.
CampaignContact Contact SObject Campaign (post-upsert) The contact associated with the current campaign (for creating campaign members).
DonationCampaign Campaign SObject Recurring, Donation The campaign record relevant to the current donation or recurring donation. Used to link financial records to campaigns.
CampaignIdList Text collection Campaign, Recurring, Donation The Salesforce IDs of all campaigns processed so far. Used for campaign member creation across the hierarchy.
RecurringRecord SObject Donation The recurring donation record created or matched in the recurring stage. Used in the donation stage to link individual donations to their parent recurring donation.
IsNewRecord Boolean Post-upsert flows (all stages) Indicates whether the record was newly created (true) or matched and updated (false). Useful for applying logic only to new records.

Commerce pipeline cross-stage variables#

The commerce pipeline shares Account, Contact, and Campaign cross-stage variables with the donation pipeline. It adds the following commerce-specific variables:

Variable Type Available from stage Description
PrimaryContact Contact SObject Order, Order Item The primary contact (buyer) for the commerce transaction.
PrimaryAccount Account SObject Order, Order Item The account associated with the buyer.
OrderCampaign Campaign SObject Order, Order Item The campaign associated with the commerce transaction.
CatalogRecord Product2 SObject Order Item The product record created or matched in the catalogue stage. Used to link order line items to products.
OrderRecord Opportunity SObject Order Item The order (opportunity) record created in the order stage. Used to link line items to their parent order.
StandardPriceBookId Text Order Item The Salesforce ID of the standard price book. Used for price book entry lookups when creating line items.

How cross-stage variables work#

MoveData populates cross-stage variables automatically. You do not need to configure them.

When you create a custom flow for a later stage (such as a donation mapping flow), add the cross-stage variable as an input variable with the exact name and type shown above. MoveData passes the record from the earlier stage into your flow.

Example: Accessing the donor contact in a donation mapping flow

1. Open your donation mapping flow in Flow Builder.
2. Create a new variable:
   - Name: DonorContact
   - Type: Record (Single)
   - Object: Contact
   - Available for input: Yes
3. Use DonorContact.Id or DonorContact.AccountId
   in your flow logic.

Verify with the execution log

If you are unsure which cross-stage variables are available at a particular stage, open a processed notification in the MoveData app and click View Variables on the relevant stage in the execution log. All input variables and their current values are displayed.

Notification and platform variables#

Every flow in the pipeline receives variables containing data from the source platform notification. These variables provide the raw data that your flows map to Salesforce fields.

Platform identification#

Variable Type Available in Description
Platform Text All flows, all stages The identifier of the source fundraising platform (e.g., raisely, grassrootz, justgiving). Use this to apply platform-specific business rules.
PlatformKey Text All flows after the platform key phase The unique key generated for the current record, combining the platform identifier and a record-specific key (e.g., raisely:5dbbaf90-fd8e-11f0-bc9d-7f6353a9f45e).
Key Text All flows The raw unique identifier from the source platform, before it is combined with the platform name.

Notification data variables#

MoveData transforms each notification into a standardised set of variables based on the schema (donation or commerce). These notification variables are available as inputs to every flow in the pipeline.

Common notification data variables include:

Variable category Examples Description
Person data FirstName, LastName, Email, Phone, Salutation, Birthday Contact information from the notification.
Address data MailingAddress_Street, MailingAddress_City, MailingAddress_State, MailingAddress_Country, MailingAddress_Postcode, MailingAddress_StateCode, MailingAddress_CountryCode Address fields from the notification.
Donation data Amount, StartDate, Status, Message, ReceiptNumber, Anonymous Financial transaction details (donation pipeline).
Fee data FeePlatform, FeeGateway, FeeProcessor, FeeCovered Fee breakdowns from the platform.
Campaign data Type, Name, Code, Description Campaign classification from the platform.
Commerce data Quantity, UnitPrice, Total, OrderTotal, Catalog_Type, Action Commerce transaction details (commerce pipeline).
Preferences Newsletter Donor communication preferences.

Notification variables are schema-specific

The exact set of notification variables depends on the schema (donation or commerce) and the source platform. For a complete list of variables available for a specific notification, use the View Variables button in the execution log.

For a detailed reference of notification variables, see the relevant schema documentation:

Configuration variables#

Configuration variables follow the Config_ naming convention and control pipeline behaviour. They can be set through the MoveData settings interface or through a configuration flow at stage 0 of the pipeline.

Common configuration variables include:

Variable Type Description
Config_ContactProtectLevel Number Protection level for contact field overwriting (1 = names only, 2 = names + other, 3 = entire record).
Config_ContactAddressInheritAccount Boolean Inherit address from parent account when the contact has no address.
Config_ContactUseMailingAddress Boolean Use mailing address fields rather than other address fields.
Config_ContactUseStateCode Boolean Use state/province code picklist fields.
Config_ContactUseCountryCode Boolean Use country code picklist fields.
Config_CreateCampaignMembers Boolean Create campaign member records during post-upsert processing.
Config_CampaignMemberDeleteExistingStatuses Boolean Remove existing campaign member statuses before creating new ones.
Config_OrderTotalSubtractFeePlatform Boolean Subtract platform fees from order totals (commerce pipeline).
Config_OrderStageNameDefault Text Default opportunity stage name for commerce orders.
Config_DonationSuppressGiftDesignations Boolean Disable gift designation copying (Nonprofit Cloud).
Config_MoveDataEngine Number Engine version identifier.

Configuration variables are available in every flow across all stages after stage 0 completes.

Variable lifetime and scope#

Understanding when variables are available helps you design flows that reference the correct data.

Within a stage#

Phase Variables available
Platform Key Notification variables, configuration variables
Record Match Notification variables, configuration variables, PlatformKey
Mapping Notification variables, configuration variables, PlatformKey, Record, cross-stage records, IsActor, DuplicateCheck
Post-Upsert Notification variables, configuration variables, PlatformKey, Record (with ID), cross-stage records, IsNewRecord

Across stages#

Variables from earlier stages are carried forward automatically. A flow in the donation stage has access to records from the account, contact, campaign, and recurring stages.

Variables do not flow backwards. A flow in the account stage cannot access records from the contact or campaign stages because those stages have not yet executed.

Account → Contact → Campaign → Recurring → Donation
  │          │          │           │           │
  │          │          │           │           └─ Has: ParentAccount, DonorContact,
  │          │          │           │              DonationCampaign, RecurringRecord
  │          │          │           │
  │          │          │           └─ Has: ParentAccount, DonorContact,
  │          │          │              DonationCampaign
  │          │          │
  │          │          └─ Has: ParentAccount, CampaignContact
  │          │
  │          └─ Has: ParentAccount
  │
  └─ No cross-stage variables (first stage)

How to use pipeline context variables in a flow#

To use any pipeline context variable in your flow:

  1. Open the relevant flow in Salesforce Flow Builder.
  2. Create a new variable with the exact name listed in this reference.
  3. Set the variable's Type to match the type shown (Text, Boolean, Number, or Record).
  4. For record-typed variables, set the Object to the correct SObject type.
  5. Enable the variable as Available for input.
  6. Use the variable in your flow logic (decisions, assignments, formulas).

Variable names are case-sensitive

Variable names must match exactly as shown in this reference. For example, Context_ContactType is valid but context_contacttype or CONTEXT_CONTACTTYPE will not be recognised by MoveData.

Other resources#

Ask MoveData AI
Ask about setup, configuration, or troubleshooting
How can I help you with MoveData today?