SOLVED

Reading Salesforce Case Data and Writing Back

Go to solution
Jacek_Darlinski
Level 1

Reading Salesforce Case Data and Writing Back

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. 

1 ACCEPTED SOLUTION

Accepted Solutions
Casey_Grimes
Level 10

Re: Reading Salesforce Case Data and Writing Back

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.

View solution in original post

3 REPLIES 3
Casey_Grimes
Level 10

Re: Reading Salesforce Case Data and Writing Back

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 - Community Moderator

Re: Reading Salesforce Case Data and Writing Back

"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?

Jacek_Darlinski
Level 1

Re: Reading Salesforce Case Data and Writing Back

Thanks Courtney! I will look into Velocity scripting to receive the correct data. Not sure if the 10 record limit still applies, but we're very careful about allowing cases to sync into Marketo, using a flag on the case record that controls record access.

 

As for Email-to-Case: Have you ever encountered issues with volume when using this method? My concern is that Salesforce will block the throughput if too many emails are received within the same timeframe.