Reading Salesforce Case Data and Writing Back | Community
Skip to main content
Jacek_Darlinski
Level 1
February 13, 2020
Solved

Reading Salesforce Case Data and Writing Back

  • February 13, 2020
  • 1 reply
  • 2665 views

Hi there,

 

I'm trying to wrap my head around a Salesforce-specific use case: I would like to use data from a case related to the contact's account in my email template. I would also like to write an activity (task) into the case when the email is opened.

 

The scenario unfolds as this:

I created a case X under Account A

I add Contact B from Account A to my campaign C

When setting up the template, I want to pull in information from case X to the email template.

When the recipient opens the email, I want Marketo to write an activity under case X.

 

So I do know that I can use the custom object sync to make case data available in Marketo, but how can I make sure I pull data from the correct record? And how can I write back into that specific case? Any ideas how to manage this would be appreciated. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Casey_Grimes2

Hi Jacek,

 

So, you're really looking at two separate problems:

 

1. Determining the proper Case to pull content into the email is going to happen through Velocity. Now, depending on your logic on how to match Case to email content, there'll be different logic to write in Velocity (or else I'd at least provide some basic guidance). Do note that you can only pull from the ten most recent Cases when using Velocity, so if this is an issue, you may need to look at other methods.

2. The most straightforward way to send data back to the case from Marketo is to use Email-to-Case as a reply—because Marketo will have no problem with that method. Matching to the proper case depends on some specific Salesforce setup pieces, but it's definitely doable with the right guidance.

1 reply

Casey_Grimes2
Casey_Grimes2Accepted solution
Level 10
February 13, 2020

Hi Jacek,

 

So, you're really looking at two separate problems:

 

1. Determining the proper Case to pull content into the email is going to happen through Velocity. Now, depending on your logic on how to match Case to email content, there'll be different logic to write in Velocity (or else I'd at least provide some basic guidance). Do note that you can only pull from the ten most recent Cases when using Velocity, so if this is an issue, you may need to look at other methods.

2. The most straightforward way to send data back to the case from Marketo is to use Email-to-Case as a reply—because Marketo will have no problem with that method. Matching to the proper case depends on some specific Salesforce setup pieces, but it's definitely doable with the right guidance.

SanfordWhiteman
Level 10
February 13, 2020

"Last 10" restriction for COs can be lifted as of a long time ago, unless you're saying the Case object is still subject to it?