Where the documentation stops
Marketing Cloud documentation is good at describing what a function does and poor at describing what happens when you use it against real enterprise data. The gap is where most implementation time disappears.
These twenty snippets all come from that gap. Each one exists because a client hit a wall the documentation did not warn about, and the workaround was worth keeping.
The CRM sync quirks
The largest cluster addresses data arriving from Sales Cloud in shapes AMPScript cannot handle directly. The canonical example is the multi-select picklist, which syncs as a single semicolon-delimited string — “Camping;Hiking;Fishing” — so a straightforward IF against it silently matches the wrong things.
The fix is BuildRowsetFromString, converting the delimited string into an iterable rowset you can actually query. The vault covers that pattern and the related sync behaviours that break naive personalisation.
Surviving send time
Send-time is the most constrained context in Marketing Cloud. Script that runs comfortably in a test send can time out when the same logic executes across a large audience, and a single unhandled error can fail the render for the entire send.
Several snippets cover defensive AMPScript — structuring code so one malformed row degrades gracefully instead of killing the send — and SSJS patterns built for volume rather than convenience.
SQL that does the work upstream
The most reliable way to survive send-time limits is to do less at send time. The SQL snippets cover deduplication and suppression as Query Activities, moving work into Automation Studio where it has room to run.
Every snippet is framed the same way: the problem, the solution, then the code — so it is clear what each one is actually for before you paste it.
What’s inside
- Parsing CRM multi-select picklists with BuildRowsetFromString
- Handling the semicolon-delimited sync quirk that breaks IF statements
- High-volume SSJS patterns that survive send-time limits
- SQL query activities for deduplication and suppression at scale
- Bulletproofing AMPScript so one bad row cannot kill the render
- CRM sync workarounds for fields SFMC will not expose natively
- Every snippet framed as: the problem, the solution, then the code