0

Need an email in a journey to go to an entire Plan Team. The Plan Team is listed in Sales Cloud so we are sync-ing the Plan roles from Sales Cloud into a DE via the SQL activities and then referencing each Role’s email address via AMPScript in the CC-fields on Journey Builder.

The main issue is that some roles in Sales Cloud like Trustee might have two people listed on the Sales Cloud side, which means only one email address is getting pulled into the CC-field in JB. Does anyone know if AMPscript could pull in multiple emails in one field and separate by semi colon? So it would still look like %%trustee_email%% on the CC field, but it would render [email protected]; [email protected] on the email send ?

5
  • This ampscript gets processed before the emailsend so you can’t use the email body to do this ampscript you would want to populate this field with the values before you inject into JB
    – EazyE
    Jun 24, 2021 at 23:44
  • Thanks - @EazyE I have it working just not sure how to treat a situation where one field has multiple values.
    – Marketer
    Jun 24, 2021 at 23:49
  • @Marketer why don’t you give this a try and see for yourself?
    – zuzannamj
    Jun 25, 2021 at 6:39
  • @zuzannamj I'm not clean on what needs to be tried. Are you saying load 2 email addresses in one SF field?
    – Marketer
    Jun 25, 2021 at 12:23
  • See if this helps: hernalsteen.tech/2021/03/…
    – zuzannamj
    Jun 25, 2021 at 20:32

1 Answer 1

0

You can use small ampscript functions in CC feature (More info - https://www.salesforcefan.com/post/cc-bcc-in-salesforce-marketing-cloud). So, here am assuming you just have 2 email address in a single field.

You can use Substring function to solve this.

Here is my data extension, where CCField is where I need to display all the CC

enter image description here

You can add the below codes in CC feature in Journey Builder:

To get first CC Email - %%=v(Substring(AttributeValue('CCField'),1,Subtract(IndexOf(AttributeValue('CCField'),","),1)))=%%

To get Second CC Email - %%=v(Substring(AttributeValue('CCField'),Add(IndexOf(AttributeValue('CCField'),","),1),Length(AttributeValue('CCField'))))=%%

Sample screenshot for Journey Builder:

enter image description here

Hope this helps!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .