{"title":"Resolve email template merge field sync errors","slug":"resolve-email-template-sync-errors","url":"https://support.storeconnect.com/articles/resolve-email-template-sync-errors","url_markdown":"https://support.storeconnect.com/articles/resolve-email-template-sync-errors.md","subtitle":null,"summary":"Fix EMAIL_TEMPLATE_MERGEFIELD_ERROR sync errors caused by invalid merge fields in Visualforce email templates that reference fields not accessible on the Contact object.","type":"Help_Documentation","video_url":"","keywords":"EMAIL_TEMPLATE_MERGEFIELD_ERROR, merge field, email template, First_Name__c, InformalName, sync error","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"## Symptoms\n\nYou see a sync error in the [sync error tool](sync-error-tool) with the following pattern:\n\n- **EMAIL_TEMPLATE_MERGEFIELD_ERROR** — \"No such column 'InformalName' on entity 'Contact'.\"\n\n:::tip\nIf you see **EMAIL_ADDRESS_BOUNCED** or **INVALID_EMAIL_ADDRESS**, that is a separate issue. See [resolve email bounce sync errors](resolve-email-bounce-sync-errors).\n:::\n\n## Cause\n\nSome Salesforce orgs have customized email templates that use merge fields which do not exist on the Contact object in the Visualforce email template context. For example, `{!recipient.FirstName}` or `{!recipient.InformalName}` are not accessible in VF templates because `recipient` refers to the Contact object and standard fields cannot be accessed directly this way.\n\nStoreConnect's managed package includes a custom formula field **`s_c__First_Name__c`** on the Contact object that resolves this issue. This field maps to the standard `FirstName` field and is designed specifically for use in Visualforce email templates. All default StoreConnect email templates already use `{!recipient.s_c__First_Name__c}` for contact emails.\n\nIf your org has customized email templates that still use `{!recipient.FirstName}` or `{!recipient.InformalName}`, they will fail with a merge field error during sync.\n\n## Resolution\n\n### If using default StoreConnect templates\n\nReset to the managed package default template. The default templates already use the correct `{!recipient.First_Name__c}` merge field and should not produce this error.\n\n### If using customized templates\n\n#### Contact email templates\n\n1. Open the email template in Salesforce.\n2. Find any occurrence of `{!recipient.FirstName}` or `{!recipient.InformalName}`.\n3. Replace it with **`{!recipient.s_c__First_Name__c}`**.\n4. Save the template.\n\n`First_Name__c` is a formula field already included in the StoreConnect managed package. It maps to the standard `FirstName` field and requires no additional setup.\n\n#### Order email templates\n\nOrder email templates use the `relatedTo` object (the Order) rather than `recipient` (the Contact), so the correct merge field syntax is different.\n\n1. Open the email template in Salesforce.\n2. Find any occurrence of `{!recipient.FirstName}` or `{!recipient.InformalName}`.\n3. Replace it with **`{!relatedTo.BillToContact.FirstName}`**.\n4. Save the template.\n\n**Alternative (both types):** Clone the affected template, make the correction in the clone, and update the StoreConnect Store record to use the new template.\n\n## Verification\n\n1. Confirm the sync error no longer appears in the [sync error tool](sync-error-tool).\n2. Send a test email using the corrected template to confirm it renders correctly.\n3. Place a test order to confirm future orders sync and send emails without issues.\n\n## Prevention\n\n- **When customizing contact email templates**, always use `{!recipient.s_c__First_Name__c}` instead of `{!recipient.FirstName}` or `{!recipient.InformalName}`.\n- **When customizing order email templates**, always use `{!relatedTo.BillToContact.FirstName}` instead of `{!recipient.FirstName}` or `{!recipient.InformalName}`.\n- **Audit email templates** after org migrations or package updates for merge fields that may not exist in the new environment.\n\n## Related issues\n\n- [Manage sync errors](sync-error-tool)\n- [Resolve email bounce sync errors](resolve-email-bounce-sync-errors)\n- [Setting up StoreConnect emails](setting-up-storeconnect-emails)\n- [How to find and resolve sync errors](how-to-find-and-resolve-sync-errors)"}