2

End Goal: Use sales person's profile picture in email templates.

I'd like to use the profile picture so that the sales person can see, at any time, what image Marketing is using and also to give them the opportunity to update their image at any time.

The problem with using the Salesforce URL is that one must be logged into Salesforce to see the image...

So, I'm thinking of using SSJS to fetch the image and upload to Content Builder - but I don't see a way to do this given the SSJS Methods.

How to solve this problem in a way that doesn't force me to have to go get each sales rep's image manually?

Thanks!

  • can you try using the API calls to upload images by base64encoding? – Brad Sapkota Oct 11 '17 at 0:44
  • @Brad Sapkota - I'm not having an issue with the upload portion - it's the retrieving of the image FROM Salesforce that's proving difficult. – user43881 Oct 11 '17 at 1:35
  • 1
    Yes with regards to api calls, if you do a request, there is usually a response with all the details such as image link and external key and success code. Well that should resolve the issue. If you want I can post a sample api request. You can use postman to do api requests in sfmc – Brad Sapkota Oct 11 '17 at 1:38
0

I tried some POC using this method

we can achieve this using personalization strings, create a formula field in Contact object and save the Image URL from user object and map those fields in marketing cloud

Here is the SOQl query (paste it in Dev console) to see the image URL in Salesforce

SELECT Id, Name, FullPhotoUrl, SmallPhotoUrl, MediumPhotoUrl, SmallBannerPhotoUrl, MediumBannerPhotoUrl FROM User

Now in Email template use below code

<td align="center" style="padding: 0px; border: 2px solid #009fdf; width: 84px;"> <img width="80" style="display: block;" alt="%%Name%%" src="%%your_field_name %%" border="0" />

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy