Skip to content

This reference documents the custom metadata entries (movedata__Movedata_Pipeline__mdt) that configure the Commerce Pipeline for NPSP implementations using the Commerce Extension.

NPSP only

The Commerce Extension is designed for organisations using the Nonprofit Success Pack (NPSP) or standard Salesforce. If you are using Nonprofit Cloud (NPC), commerce functionality is built into the NPC Extension instead. Do not install the Commerce Extension alongside NPC.

Extension configuration#

Extension namespace#

Metadata entry: EXTENSION_COMMERCE_NAMESPACE

Field Value
Label EXTENSION_COMMERCE_NAMESPACE
Handler md_comm_pack
Order 5
Type Config

Purpose: Identifies the package namespace for all Commerce Extension components. This namespace prefix (md_comm_pack) is used throughout the configuration to reference flows, fieldsets, and other extension resources.

Extension mode#

Metadata entry: EXTENSION_COMMERCE_MODE

Field Value
Label EXTENSION_COMMERCE_MODE
Handler single_step or multi_step
Order 5
Type Config

Purpose: Controls the commerce processing mode. When set to single_step, all commerce processing occurs in a single transaction. When set to multi_step (default), the pipeline executes through all stages sequentially, providing greater control and extensibility.

Pipeline schema registration#

Commerce schema#

Metadata entry: movedata__Movedata_Schema_Map__mdt.commerce

Field Value
MasterLabel commerce
Handler MoveDataCommercePipeline
Version 1
Type Apex

Purpose: Registers the Commerce Pipeline for processing e-commerce and merchandise transactions. This is the primary entry point that routes commerce notifications to the multi-stage processing engine.


Commerce pipeline architecture#

The Commerce Pipeline processes e-commerce transactions, product catalogue management, and order fulfilment. It follows a multi-stage architecture optimised for merchandise sales, event registrations, ticketing, and other commercial transactions.

The pipeline operates through seven distinct stages:

  1. Configuration -- Pipeline configuration and setup
  2. Pre-processing -- Pre-processing transformations (optional)
  3. Account -- Customer account management
  4. Contact -- Customer contact management
  5. Campaign -- Marketing campaign association
  6. Catalogue -- Product catalogue management (Product2)
  7. Order -- Order processing (Opportunity)

Salesforce objects used#

Unlike the NPC Extension (which uses person accounts, GiftTransaction, and GiftCommitment), the Commerce Extension works with standard Salesforce and NPSP objects:

Pipeline stage Salesforce object Notes
Account Account Organisation accounts (not person accounts)
Contact Contact Standard Contact object
Campaign Campaign Standard Campaign object
Catalogue Product2 Standard Product object
Order Opportunity Uses NPSP Opportunity model with Opportunity Products

Stage 0: Configuration#

Metadata key: PIPELINE_COMMERCE_CONFIGURATION

Purpose: Enables configuration flows that set conditional values or advanced settings not exposed through the Settings interface. Configuration flows execute before all other stages.

Stage 1: Pre-processing#

Metadata key: PIPELINE_COMMERCE_PREPROCESS

Purpose: Allows transformation or enhancement of commerce notifications before main processing begins. Common use cases include:

  • Notification transformation or enrichment
  • Conditional routing logic
  • Data validation and cleansing

Stage 2: Account processing#

The Account stage creates or updates Account records for customer organisations involved in commerce transactions.

Account disable#

Metadata entry: COMMERCE_ACCOUNT_DISABLE

Field Value
Label PIPELINE_COMMERCE_ACCOUNT_DISABLE
Handler false
Order 5
Type Config

Purpose: Controls whether account processing is enabled. Set to false by default, meaning account processing is active. Change to true to bypass account creation and updates entirely.

Account fieldset#

Metadata entry: COMMERCE_ACCOUNT_FIELDSET_001

Field Value
Label PIPELINE_COMMERCE_ACCOUNT_FIELDSET
Handler md_comm_pack__MoveData_Commerce_Account_Fieldset
Type Fieldset

Purpose: Specifies the fieldset that defines which Account fields should be loaded when existing account records are located during duplicate matching. This ensures all necessary fields are available for mapping and comparison operations.

Account platform key#

Metadata entry: COMMERCE_ACCOUNT_PLATFORM_KEY_001

Field Value
Label PIPELINE_COMMERCE_ACCOUNT_PLATFORM_KEY
Handler md_comm_pack.MoveData_Commerce_Account_Key
Order 5
Type Flow

Purpose: Lightning Flow that generates the unique platform identifier used to track account records across systems. This key enables reliable duplicate detection and maintains data lineage from commerce platforms.

Flow: md_comm_pack.MoveData_Commerce_Account_Key

Account duplicate detection#

Metadata entry: COMMERCE_ACCOUNT_DUPLICATE_001

Field Value
Label PIPELINE_COMMERCE_ACCOUNT_DUPLICATE
Handler md_comm_pack.MoveData_Commerce_Account_Duplicate
Order 5
Type Flow

Purpose: Lightning Flow that implements duplicate matching logic to locate existing account records before creating new ones. Prevents duplicate account creation by checking platform keys, external IDs, and other matching criteria.

Flow: md_comm_pack.MoveData_Commerce_Account_Duplicate

Account field mapping#

Metadata entry: COMMERCE_ACCOUNT_MAPPING_001

Field Value
Label PIPELINE_COMMERCE_ACCOUNT_MAPPING
Handler md_comm_pack.MoveData_Commerce_Account_Mapping
Order 5
Type Flow

Purpose: Primary Lightning Flow that maps notification data to Account fields. Handles standard field mappings including organisation name, address information, phone, website, and account type classifications. Includes name protection mechanisms and configurable field processing controls.

Flow: md_comm_pack.MoveData_Commerce_Account_Mapping

Account post-processing#

Metadata entry: COMMERCE_ACCOUNT_POST_001

Field Value
Label PIPELINE_COMMERCE_ACCOUNT_POST
Handler md_comm_pack.MoveData_Commerce_Account_Post
Order 5
Type Flow

Purpose: Lightning Flow that executes after account records are created or updated. Handles post-upsert operations including platform key association to link accounts with external platform identifiers.

Flow: md_comm_pack.MoveData_Commerce_Account_Post


Stage 3: Contact processing#

The Contact stage creates or updates Contact records for individual customers, event registrants, and ticket holders.

Standard Contact object

Unlike the NPC Extension, the Commerce Extension does not override the Contact SObject to use person accounts. It processes standard Salesforce Contact records.

Contact disable#

Metadata entry: COMMERCE_CONTACT_DISABLE

Field Value
Label PIPELINE_COMMERCE_CONTACT_DISABLE
Handler false
Order 5
Type Config

Purpose: Controls whether contact processing is enabled. Set to false by default for active processing.

Contact fieldset#

Metadata entry: COMMERCE_CONTACT_FIELDSET_001

Field Value
Label PIPELINE_COMMERCE_CONTACT_FIELDSET
Handler md_comm_pack__MoveData_Commerce_Contact_Fieldset
Type Fieldset

Purpose: Defines which Contact fields should be loaded when existing contact records are located during duplicate matching.

Contact platform key#

Metadata entry: COMMERCE_CONTACT_PLATFORM_KEY_001

Field Value
Label PIPELINE_COMMERCE_CONTACT_PLATFORM_KEY
Handler md_comm_pack.MoveData_Commerce_Contact_Key
Order 5
Type Flow

Purpose: Generates unique platform identifiers for contact records to enable cross-system tracking and duplicate prevention.

Flow: md_comm_pack.MoveData_Commerce_Contact_Key

Contact duplicate detection#

Metadata entry: COMMERCE_CONTACT_DUPLICATE_001

Field Value
Label PIPELINE_COMMERCE_CONTACT_DUPLICATE
Handler md_comm_pack.MoveData_Commerce_Contact_Duplicate
Order 5
Type Flow

Purpose: Implements duplicate matching logic for contacts using platform keys, email, and name matching.

Flow: md_comm_pack.MoveData_Commerce_Contact_Duplicate

Contact field mapping#

Metadata entry: COMMERCE_CONTACT_MAPPING_001

Field Value
Label PIPELINE_COMMERCE_CONTACT_MAPPING
Handler md_comm_pack.MoveData_Commerce_Contact_Mapping
Order 5
Type Flow

Purpose: Maps notification data to Contact fields including names, email, phone, address, and newsletter preferences. Supports multi-level protection (names only, names plus contact details, or full record protection) and configurable case transformation.

Flow: md_comm_pack.MoveData_Commerce_Contact_Mapping

Contact post-processing#

Metadata entry: COMMERCE_CONTACT_POST_001

Field Value
Label PIPELINE_COMMERCE_CONTACT_POST
Handler md_comm_pack.MoveData_Commerce_Contact_Post
Order 5
Type Flow

Purpose: Executes post-upsert operations for contact records, focusing on platform key association. Supports a configurable disable option (Config_ContactDisablePlatformKey) to bypass platform key processing when needed.

Flow: md_comm_pack.MoveData_Commerce_Contact_Post


Stage 4: Campaign processing#

The Campaign stage creates or updates Campaign records representing events, fundraising initiatives, and marketing campaigns associated with commerce transactions.

Campaign disable#

Metadata entry: COMMERCE_CAMPAIGN_DISABLE

Field Value
Label PIPELINE_COMMERCE_CAMPAIGN_DISABLE
Handler false
Order 5
Type Config

Purpose: Controls campaign processing. Set to false for active processing.

Campaign fieldset#

Metadata entry: COMMERCE_CAMPAIGN_FIELDSET_001

Field Value
Label PIPELINE_COMMERCE_CAMPAIGN_FIELDSET
Handler md_comm_pack__MoveData_Commerce_Campaign_Fieldset
Type Fieldset

Purpose: Defines Campaign fields to load during duplicate matching and processing.

Campaign platform key#

Metadata entry: COMMERCE_CAMPAIGN_PLATFORM_KEY_001

Field Value
Label PIPELINE_COMMERCE_CAMPAIGN_PLATFORM_KEY
Handler md_comm_pack.MoveData_Commerce_Campaign_Key
Order 5
Type Flow

Purpose: Generates unique platform identifiers for campaign records. Supports both typed (Platform:Type:Key) and untyped (Platform:Key) key formats depending on available data.

Flow: md_comm_pack.MoveData_Commerce_Campaign_Key

Campaign name generation#

Metadata entry: COMMERCE_CAMPAIGN_NAME_001

Field Value
Label PIPELINE_COMMERCE_CAMPAIGN_NAME
Handler md_comm_pack.MoveData_Commerce_Campaign_Name
Order 5
Type Flow

Purpose: Generates hierarchical campaign names based on parent-child campaign relationships. Supports single-tier, two-tier (colon separator), and multi-tier (hyphen separator) naming formats. Respects name protection settings and campaign code preferences.

Flow: md_comm_pack.MoveData_Commerce_Campaign_Name

Campaign duplicate detection#

Metadata entry: COMMERCE_CAMPAIGN_DUPLICATE_001

Field Value
Label PIPELINE_COMMERCE_CAMPAIGN_DUPLICATE
Handler md_comm_pack.MoveData_Commerce_Campaign_Duplicate
Order 5
Type Flow

Purpose: Locates existing campaign records using platform keys and the movedata__Platform_Key__c field to prevent duplicates.

Flow: md_comm_pack.MoveData_Commerce_Campaign_Duplicate

Campaign field mapping#

Metadata entry: COMMERCE_CAMPAIGN_MAPPING_001

Field Value
Label PIPELINE_COMMERCE_CAMPAIGN_MAPPING
Handler md_comm_pack.MoveData_Commerce_Campaign_Mapping
Order 5
Type Flow

Purpose: Maps notification data to Campaign fields including name, type, status, dates, target amount, description, and parent campaign relationships. Includes NPSP-specific field mappings for campaign URL, fundraising contact, and fundraising account.

Flow: md_comm_pack.MoveData_Commerce_Campaign_Mapping

Campaign post-processing#

Metadata entry: COMMERCE_CAMPAIGN_POST_001

Field Value
Label PIPELINE_COMMERCE_CAMPAIGN_POST
Handler md_comm_pack.MoveData_Commerce_Campaign_Post
Order 5
Type Flow

Purpose: Handles post-upsert operations for campaigns including NPSP campaign member structure initialisation, GAU (General Accounting Unit) allocation copying from parent campaigns, and campaign member creation with commerce-specific statuses (Sale, Ticket Holder).

Flow: md_comm_pack.MoveData_Commerce_Campaign_Post


Stage 5: Catalogue processing#

The Catalogue stage manages Product2 records representing products, tickets, merchandise, and other items available for purchase through commerce platforms.

Catalogue disable#

Metadata entry: COMMERCE_CATALOG_DISABLE

Field Value
Label PIPELINE_COMMERCE_CATALOG_DISABLE
Handler false
Order 5
Type Config

Purpose: Controls product catalogue processing. Default is false (enabled).

Catalogue fieldset#

Metadata entry: COMMERCE_CATALOG_FIELDSET_001

Field Value
Label PIPELINE_COMMERCE_CATALOG_FIELDSET
Handler md_comm_pack__MoveData_Commerce_Product_Fieldset
Type Fieldset

Purpose: Defines Product2 fields to load during catalogue processing and duplicate matching.

Catalogue platform key#

Metadata entry: COMMERCE_CATALOG_PLATFORM_KEY_001

Field Value
Label PIPELINE_COMMERCE_CATALOG_PLATFORM_KEY
Handler md_comm_pack.MoveData_Commerce_Catalog_Key
Order 5
Type Flow

Purpose: Generates unique platform identifiers for product catalogue items using the Platform:Key format.

Flow: md_comm_pack.MoveData_Commerce_Catalog_Key

Catalogue name generation#

Metadata entry: COMMERCE_CATALOG_NAME_001

Field Value
Label PIPELINE_COMMERCE_CATALOG_NAME
Handler md_comm_pack.MoveData_Commerce_Catalog_Name
Order 5
Type Flow

Purpose: Generates product names for catalogue items. This flow uses a pass-through approach, preserving the original product name from the external platform without modification.

Flow: md_comm_pack.MoveData_Commerce_Catalog_Name

Catalogue field mapping#

Metadata entry: COMMERCE_CATALOG_MAPPING_001

Field Value
Label PIPELINE_COMMERCE_CATALOG_MAPPING
Handler md_comm_pack.MoveData_Commerce_Catalog_Mapping
Order 5
Type Flow

Purpose: Maps commerce notification data to Product2 fields including name, product code, SKU, description, active status, currency, and platform key. Supports configurable field replacement policies that control whether existing values are overwritten or preserved.

Flow: md_comm_pack.MoveData_Commerce_Catalog_Mapping

Catalogue post-processing#

Metadata entry: COMMERCE_CATALOG_POST_001

Field Value
Label PIPELINE_COMMERCE_CATALOG_POST
Handler md_comm_pack.MoveData_Commerce_Catalog_Post
Order 5
Type Flow

Purpose: Executes post-upsert operations for product catalogue records. Validates the presence of an active Standard Price Book, then creates or updates PricebookEntry records to ensure products are properly configured for sales operations. Supports multi-currency environments with proper currency handling.

Flow: md_comm_pack.MoveData_Commerce_Catalog_Post


Stage 6: Order processing#

The Order stage manages Opportunity records representing complete customer transactions including merchandise purchases, event registrations, and ticket sales.

Order disable#

Metadata entry: COMMERCE_ORDER_DISABLE

Field Value
Label PIPELINE_COMMERCE_ORDER_DISABLE
Handler false
Order 5
Type Config

Purpose: Controls order processing. Default is false (enabled).

Order fieldset#

Metadata entry: COMMERCE_ORDER_FIELDSET_001

Field Value
Label PIPELINE_COMMERCE_ORDER_FIELDSET
Handler md_comm_pack__MoveData_Commerce_Order_Fieldset
Type Fieldset

Purpose: Defines Opportunity fields to load during order processing.

Order platform key#

Metadata entry: COMMERCE_ORDER_PLATFORM_KEY_001

Field Value
Label PIPELINE_COMMERCE_ORDER_PLATFORM_KEY
Handler md_comm_pack.MoveData_Commerce_Order_Key
Order 5
Type Flow

Purpose: Generates unique platform identifiers for order records.

Flow: md_comm_pack.MoveData_Commerce_Order_Key

Order name generation#

Metadata entry: COMMERCE_ORDER_NAME_001

Field Value
Label PIPELINE_COMMERCE_ORDER_NAME
Handler md_comm_pack.MoveData_Commerce_Order_Name
Order 5
Type Flow

Purpose: Generates order names using configurable name patterns. The Commerce Extension settings provide two patterns: one for account-based orders (Config_OrderNameAccount) and one for contact-based orders (Config_OrderNameContact).

Flow: md_comm_pack.MoveData_Commerce_Order_Name

Order field mapping#

Metadata entry: COMMERCE_ORDER_MAPPING_001

Field Value
Label PIPELINE_COMMERCE_ORDER_MAPPING
Handler md_comm_pack.MoveData_Commerce_Order_Mapping
Order 5
Type Flow

Purpose: Maps commerce notification data to Opportunity fields including totals, status, close date, and payment details.

Flow: md_comm_pack.MoveData_Commerce_Order_Mapping

Order duplicate detection#

Metadata entry: COMMERCE_ORDER_DUPLICATE_001

Field Value
Label PIPELINE_COMMERCE_ORDER_DUPLICATE
Handler md_comm_pack.MoveData_Commerce_Order_Duplicate
Order 5
Type Flow

Purpose: Locates existing Opportunity records using platform keys and order identifiers to prevent duplicate orders.

Flow: md_comm_pack.MoveData_Commerce_Order_Duplicate

Order post-processing#

Metadata entry: COMMERCE_ORDER_POST_001

Field Value
Label PIPELINE_COMMERCE_ORDER_POST
Handler md_comm_pack.MoveData_Commerce_Order_Post
Order 5
Type Flow

Purpose: Executes post-upsert operations for order records.

Flow: md_comm_pack.MoveData_Commerce_Order_Post

Order final processing#

Metadata entry: COMMERCE_ORDER_FINAL_001

Field Value
Label PIPELINE_COMMERCE_ORDER_FINAL
Handler md_comm_pack.MoveData_Commerce_Order_Final
Order 5
Type Flow

Purpose: Executes final order processing after all order items have been processed. This is the last step in the commerce pipeline and handles order-level calculations, status updates, and fulfilment triggers.

Flow: md_comm_pack.MoveData_Commerce_Order_Final


Stage 7: Order item processing#

The Order Item stage manages individual line items within orders, linking products to Opportunities with quantities and pricing. Order items are represented as Opportunity Products (OpportunityLineItem) in Salesforce.

Order item disable#

Metadata entry: COMMERCE_ORDERITEM_DISABLE

Field Value
Label PIPELINE_COMMERCE_ORDERITEM_DISABLE
Handler false
Order 5
Type Config

Purpose: Controls order item processing. Default is false (enabled).

Order item fieldset#

Metadata entry: COMMERCE_ORDERITEM_FIELDSET_001

Field Value
Label PIPELINE_COMMERCE_ORDERITEM_FIELDSET
Handler md_comm_pack__MoveData_Commerce_Order_Item_Fieldset
Type Fieldset

Purpose: Defines OpportunityLineItem fields to load during processing.

Order item platform key#

Metadata entry: COMMERCE_ORDERITEM_PLATFORM_KEY_001

Field Value
Label PIPELINE_COMMERCE_ORDERITEM_PLATFORM_KEY
Handler md_comm_pack.MoveData_Commerce_Order_Item_Key
Order 5
Type Flow

Purpose: Generates unique platform identifiers for order line items.

Flow: md_comm_pack.MoveData_Commerce_Order_Item_Key

Order item name generation#

Metadata entry: COMMERCE_ORDERITEM_NAME_001

Field Value
Label PIPELINE_COMMERCE_ORDERITEM_NAME
Handler md_comm_pack.MoveData_Commerce_Order_Item_Name
Order 5
Type Flow

Purpose: Generates order item names and handles line item naming conventions.

Flow: md_comm_pack.MoveData_Commerce_Order_Item_Name

Order item field mapping#

Metadata entry: COMMERCE_ORDERITEM_MAPPING_001

Field Value
Label PIPELINE_COMMERCE_ORDERITEM_MAPPING
Handler md_comm_pack.MoveData_Commerce_Order_Item_Mapping
Order 5
Type Flow

Purpose: Maps commerce notification data to OpportunityLineItem fields including product reference, quantity, unit price, discounts, and line totals.

Flow: md_comm_pack.MoveData_Commerce_Order_Item_Mapping

Order item duplicate detection#

Metadata entry: COMMERCE_ORDERITEM_DUPLICATE_001

Field Value
Label PIPELINE_COMMERCE_ORDERITEM_DUPLICATE
Handler md_comm_pack.MoveData_Commerce_Order_Item_Duplicate
Order 5
Type Flow

Purpose: Locates existing order item records to prevent duplicate line items within orders.

Flow: md_comm_pack.MoveData_Commerce_Order_Item_Duplicate

Order item post-processing#

Metadata entry: COMMERCE_ORDERITEM_POST_001

Field Value
Label PIPELINE_COMMERCE_ORDERITEM_POST
Handler md_comm_pack.MoveData_Commerce_Order_Item_Post
Order 5
Type Flow

Purpose: Executes post-upsert operations for order items including inventory updates and fulfilment triggers.

Flow: md_comm_pack.MoveData_Commerce_Order_Item_Post

Other resources#

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