Map fields between two apps
How Syncline casts text, dates, numbers, money and select values on the way into a second app, and what to try when a destination field keeps refusing your value.
<h2>The two columns</h2><p>Field mapping is the middle of every flow. On the left are the fields the trigger gave you, filled with values from a real sample record. On the right are the fields the destination app will accept. Your job is to say which goes where, and occasionally to say what happens when the left side is empty.</p><p>Three kinds of mapping exist. A direct mapping carries one field across. A fixed value writes the same thing every time, which is how a card always lands in the right list. A blend joins several fields into one string, which is how a subject line becomes a card title with the sender's name in front of it.</p><h2>How types are cast</h2><table><thead><tr><th>Source</th><th>Destination</th><th>What Syncline does</th></tr></thead><tbody><tr><td>Text</td><td>Text</td><td>Passes through, trimmed of leading and trailing spaces</td></tr><tr><td>Text</td><td>Number</td><td>Strips currency symbols and thousands separators, then parses</td></tr><tr><td>Datetime</td><td>Date</td><td>Converts to your workspace timezone first, then takes the day</td></tr><tr><td>Minor units</td><td>Currency</td><td>Divides by the currency exponent, so 4900 becomes 49.00</td></tr><tr><td>Text</td><td>Single select</td><td>Matches an existing option, or reports it rather than inventing one</td></tr><tr><td>Email</td><td>Person or collaborator</td><td>Looks the address up in the destination workspace</td></tr><tr><td>File</td><td>Attachment</td><td>Streams the file, or passes a link when the file is too large</td></tr></tbody></table><h2>Empty values and defaults</h2><p>An empty source field is not the same as a zero or an empty string, and the difference bites people. Each mapping row has a fallback setting with three options: leave the destination field untouched, write an explicit blank, or use a default you type. For a required destination field, the default is the only choice that keeps the flow running.</p><blockquote><p>Note: a select field with an unknown option is the single most common cause of a broken mapping. Somebody renames <em>In review</em> to <em>Review</em> in the destination app, and the flow starts failing on the next record. Syncline names the offending option in the run history, so the fix is one dropdown.</p></blockquote><h3>When a field refuses a value</h3><p>Work through these four checks in order before rebuilding anything.</p><ol><li><strong>Open the failed run</strong> and read the value we actually sent, which is shown beside the value we read. The problem is often in the reading, not the writing.</li><li><strong>Check the type row above.</strong> A date arriving as text usually means the source app returned a formatted string rather than a real date field.</li><li><strong>Check the option list.</strong> For selects, labels and statuses, compare the exact spelling including capital letters and trailing spaces.</li><li><strong>Re-fetch the sample.</strong> If the destination app gained a field last week, the builder needs a fresh schema before it will show it.</li></ol><p>If all four pass and the field still refuses, the destination app is usually enforcing a rule of its own, such as a required linked record or a validation on a custom property. The error text we show comes straight from that app, and it names the rule.</p>
Related
build-your-first-flow, stop-duplicate-records, common-errors-and-what-they-mean