Skip to content

Field Mapping

Field mapping defines how data flows between your connected systems. This guide covers the different mapping types, transformations, and best practices.

When you create a sync between two systems, you need to tell Sync or Swim which fields in System A correspond to which fields in System B.

The simplest type - one field maps directly to another:

Source FieldTarget FieldNotes
first_nameFirstNameDirect 1:1 mapping
emailEmailSame data, different names

Combine or transform fields during sync:

Combine multiple source fields into one target field:

Source: first_name + " " + last_name
Target: Full_Name__c
Result: "John" + " " + "Doe" → "John Doe"

Set a value when the source field is empty:

Source: priority (nullable)
Target: Priority__c
Default: "Normal"
Result: NULL → "Normal"

Map relationships between records:

Sync or Swim automatically handles common type conversions:

Source TypeTarget TypeConversion
stringstringDirect
integernumberDirect
timestampdatetimeTimezone-aware
booleancheckboxtrue/false → checked/unchecked
decimalcurrencyPrecision preserved
text[]multipicklistArray to semicolon-separated

Date and time fields require special attention:

  • Timestamps are converted to the target system’s timezone
  • Date-only fields strip time components
  • Time-only fields strip date components

Control which records sync based on conditions:

Only sync records that match:

WHERE status = 'active'
AND created_at > '2024-01-01'

Skip records that match:

WHERE type != 'internal'
AND is_test != true

Filters apply in both directions. A record excluded from sync:

  • Won’t be created in the target system
  • Won’t be updated if it changes
  • Won’t be deleted if removed from source

Ensure all required fields in the target system have mappings before enabling sync.

Decide how null/empty values should behave:

  • Skip - Don’t update target if source is null
  • Clear - Set target to null/empty
  • Default - Use a default value

Before syncing production data:

  1. Create a few test records
  2. Verify mappings work as expected
  3. Check computed fields calculate correctly
  4. Validate lookup relationships resolve

If you use complex transformations, document:

  • What the transformation does
  • Why it’s needed
  • Example input/output values

PostgreSQL → Salesforce:

first_name → FirstName
last_name → LastName

Or combined:

first_name + ' ' + last_name → Name

Map structured address fields:

street_address → BillingStreet
city → BillingCity
state → BillingState
postal_code → BillingPostalCode
country → BillingCountry

Map enums/picklists with value translation:

Source: 'new', 'in_progress', 'done'
Target: 'New', 'In Progress', 'Completed'
  1. Check the field is included in your mapping
  2. Verify the source field has data
  3. Check for type conversion errors in logs
  4. Ensure the target field is writable
  1. Check for type mismatches
  2. Review any transformations applied
  3. Verify timezone handling for dates
  4. Check for encoding issues with special characters
  1. Ensure the referenced record exists
  2. Verify the external ID field is mapped
  3. Check the lookup field configuration
  4. Review dependency ordering