Skip to content

Note

This flow is self-documenting and should be viewed within Salesforce (Setup > Process Automations > Flows). This document is to support working through a visual flow. The flow commentary in this document was generated with AI assistance.

Overview#

Flow name: MoveData_Commerce_Catalog_Duplicate Label: [MoveData] Commerce: Catalog - Record Match Type: Auto-Launched Flow Template API version: 56.0 Status: Active

This flow detects duplicate catalog records in Salesforce using a hierarchical matching strategy with multiple fallback options.

Purpose#

The flow identifies existing Product2 records to support update operations using a hierarchical matching strategy with multiple fallback options.

Salesforce fields#

Field API name Field type Purpose in flow
Product2.Platform_Key__c Text Primary product matching via platform key
Product2.ProductCode Text Secondary matching mechanism
Product2.StockKeepingUnit Text Tertiary matching approach
Product2.Id ID Returned product record identifier

Input variables#

Core matching data#

Variable Type Required Description
PlatformKey String No Generated platform key for direct lookup
Code String No Product code from external platform
Type String No Item type for filtering exclusions

Configuration variables#

Variable Type Default Description
Config_CatalogMatchProductCode Boolean true Enable Product Code matching
Config_CatalogMatchProductSku Boolean false Enable SKU matching
Config_CatalogProductSkuUseCode Boolean true Use Code instead of PlatformKey for SKU
Config_OrderExcludeFeePlatform Boolean false Exclude platform fee items

Output variables#

Variable Type Description
Result String Salesforce Record ID of matching product
Continue Boolean Processing continuation flag

Flow logic#

1. Type-based filtering#

The flow evaluates whether processing should proceed based on item classification:

  • When Config_OrderExcludeFeePlatform equals true AND Type equals "feePlatform", the flow sets Continue = true and terminates

2. Platform key matching (primary)#

The initial matching attempt queries Product2 records where Platform_Key__c matches the provided platform key, returning the product ID if found.

3. Product code matching (secondary)#

When platform key matching yields no result and Config_CatalogMatchProductCode = true, the flow searches Product2 records using the ProductCode field.

4. SKU matching (tertiary)#

If previous attempts fail and Config_CatalogMatchProductSku = true, the flow searches by StockKeepingUnit field using the calculated SKU value.

5. SKU value calculation#

The formula evaluates:

IF(Config_CatalogProductSkuUseCode == TRUE, Code, PlatformKey)

Error handling#

Missing data scenarios#

The flow gracefully skips unavailable matching steps:

  • Absent platform keys bypass that stage
  • Missing product codes prevent both code and SKU matching

Data quality validation#

  • Handles null values gracefully
  • Respects configuration flags
  • Prioritises reliable matches first

Processing control#

The Continue flag enables upstream processes to determine further execution, allowing early termination when matches are identified or exclusions apply.

Dependencies#

None

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