Input mapping
What is Step Input Mapping?
Section titled “What is Step Input Mapping?”Step Input Mapping helps you translate your data from one format to another as it moves through your workflows. Think of it like a GPS for your data—it tells SyncMyOrders where to find the info and where to send it next.
If one system calls it customerName and another expects name, no problem—mapping bridges the gap automatically.
How It Works
Section titled “How It Works”Each mapping rule tells the platform:
- What to fetch: using the source expression (e.g. {{ customerName }})
- Where to place it: using the destination path (e.g. name)
You set the rules—SyncMyOrders handles the transformation behind the scenes.
Basic Examples
Section titled “Basic Examples”Copying Values
Section titled “Copying Values”Source: { "customerName": "John Smith", "customerAge": 35 }
Mapping:- name → {{ customerName }}- age → {{ customerAge }}
Result: { "name": "John Smith", "age": 35 }
Creating Nested Structures
Section titled “Creating Nested Structures”
Mapping:- profile.name → {{ firstName }}- profile.surname → {{ lastName }}- contact.email → {{ email }}
Result:{ "profile": { "name": "John", "surname": "Smith" },}
Mapping Arrays
Section titled “Mapping Arrays”Source: { "products": ["apple", "banana", "orange"] }
Mapping:- items.0 → {{ products[0] }}- items.1 → {{ products[1] }}- items.2 → {{ products[2] }}
Result: { "items": ["apple", "banana", "orange"] }
Mapping Types
Section titled “Mapping Types”Standard Mapping (default)
Section titled “Standard Mapping (default)”Copies and converts values automatically.
price → {{ cost }}
Text Mapping (!text)
Section titled “Text Mapping (!text)”Forces output to be text—useful when you want to avoid numbers being treated as numbers.
productCode!text → {{ id }}
Raw Mapping(!raw)
Section titled “Raw Mapping(!raw)”Disables variable processing—great for static text or templates.
template!raw → "Hello {{ name }}"
Advanced Mapping Examples
Section titled “Advanced Mapping Examples”Accessing Nested Data
Section titled “Accessing Nested Data”Source:{ "customer": { "personal": { "name": "John", "age": 30 }, "address": { "city": "New York" } }}
Mapping:- userName → {{ customer.personal.name }}- userAge → {{ customer.personal.age }}- location → {{ customer.address.city }}
Complex Arrays
Section titled “Complex Arrays”Source:{ "orders": [ { "id": "001", "total": 100 }, { "id": "002", "total": 250 } ]}
Mapping:- firstOrder.id → {{ orders[0].id }}- firstOrder.amount→ {{ orders[0].total }}- secondOrder.id → {{ orders[1].id }}- secondOrder.amount→ {{ orders[1].total }}
Common Use Cases
Section titled “Common Use Cases”Rename Fields
Section titled “Rename Fields”newField → {{ oldField }}
Organize Related Info
Section titled “Organize Related Info”user.profile.name → {{ firstName }}user.profile.email → {{ email }}
Pick from Lists
Section titled “Pick from Lists”latestOrder → {{ orders[0] }}
Set Static Values
Section titled “Set Static Values”status!raw → activeversion!raw → 1.0
Best Practices
Section titled “Best Practices”Do:
- Use {{ fieldName }} to reference data
- Use dot notation for nesting (user.name.first)
- Use array indexes (items.0, items.1)
- Use !text when needed
- Use !raw for static values
Avoid:
- Multiple {{ }} expressions in a single rule
- Quotes inside {{ }} (e.g., {{ “name” }})
Troubleshooting Tips
Section titled “Troubleshooting Tips”Problem | Cause | Fix |
---|---|---|
null in result | Missing or incorrect field | Check field name and path |
Number turned into text | Accidental !text | Remove the suffix |
Literal output (e.g., {{ name }} shown) | Used !raw | Remove !raw if processing is needed |
Nested field not found | Incorrect path | Recheck source data structure |
Real-World Example
Section titled “Real-World Example”Source data:
{ "client_info": { "full_name": "Jane Doe", "signup_date": "2024-01-15" }, "preferences": { "newsletter": true, "promotions": false }}
Mapping rules:
contact.name → {{ client_info.full_name }}contact.email → {{ client_info.email_addr }}subscription.newsletter → {{ preferences.newsletter }}subscription.promotions → {{ preferences.promotions }}metadata.source!raw → CRM_IMPORTmetadata.imported_date!raw → 2024-01-20
Final result:
{ "contact": { "name": "Jane Doe", }, "subscription": { "newsletter": true, "promotions": false }, "metadata": { "source": "CRM_IMPORT", "imported_date": "2024-01-20" }}
Need Help?
Section titled “Need Help?”If you’re unsure about a mapping or something isn’t working, your dedicated onboarding specialist is here to guide you. Or simply reach out at [email protected].