Skip to main content
SFMC component in emails

How to prepare your email for SFMC publishing

eWizard Team avatar
Written by eWizard Team
Updated over a year ago

You can publish email projects from the eWizard platform to Salesforce Marketing Cloud (SFMC). For this, add the SfmcCode component to the App.vue file of your email project. Use the SFMC code to send emails from Salesforce Marketing Cloud CLM.

To add the SfmcCode component to your email:

1) Add the <sfmc-code></sfmc-code> tag to the template root.

2) Import the SfmcCode component from eWizard.js.

3) Add the SfmcCode component to the components in export default.

// ./App.vue<template>
<div>
<wiz-root>
<wiz-block></wiz-block>
<wiz-block></wiz-block>
<sfmc-code></sfmc-code>
</wiz-root>
</div>
</template><script>
import { SfmcCode } from "ewizardjs";export default {
name: 'wiz-app',
components: {
SfmcCode
}
};
</script>

4) Specify SFMC as the target CLM system in the settings.json file.

// ./settings.json{
"targetCLM": {
"name": "Salesforce Marketing Cloud",
"code": "sfmc"
},
}

The SfmcCode component adds the SFMC code to the email markup. To check the result:

1) Build the email project.

wiz dev

2) Open the ./index.html file in your browser DevTools.

3) Find the SFMC code in the email markup.

You can add your custom HTML code to the <sfmc-code></sfmc-code> tag.

// ./App.vue<sfmc-code>
<div>#{{Some tokens}}</div>
</sfmc-code>
Did this answer your question?