Category

Strategy

How often do your Salesforce and marketing platform admins talk to each other? 

  • Very little
  • Not at all
  • Only when things go wrong  

If you selected any of the above, you’re not alone. 

I’m here to tell you, no matter how awkward or challenging starting that conversation may be, it’s one that needs to happen (and continue) sooner rather than later. Having a solid bridge between Salesforce marketing and Sales Cloud admins will (I promise!) make both your lives so much easier. Here’s why…

Benefits of marketing and Salesforce admins working together 

#1 Keep your data clean in both places

Whether you’re using Marketing Cloud Account Engagement (Pardot) or the OG Marketing Cloud, the way data flows between your marketing automation platform and Salesforce was probably one of the reasons you purchased the tool. So, let’s keep it flowing. 

By working together you can avoid the following pitfalls:

  • Duplicate fields
  • Data being overwritten 
  • Sync errors (Marketing Cloud Account Engagement (Pardot)):
    • Fun fact – most common sync errors can be avoided by knowing the Salesforce set up.
      • Field values = prevents invalid picklist errors
      • Expected data = Prevents validation  rule errors
      • Field types = Prevents invalid field format errors 

If both admins are communicating, you can ensure any updates that happen are accurately reflected in both systems.

#2 Prevent loss of access for users and systems 

When marketing and Salesforce admins stop working together, systems can stop working together. 

True story, I’ve worked with clients who have seen automations stop working and users unable to access the systems and data because of updates that the other admins were not aware of — permissions, profiles, field accessibility. When these changes are not communicated, frustrations can arise and time can be wasted looking into the cause. 

Additionally, If you’re using a sandbox environment, understanding the refresh schedule can help prevent loss of work when it’s unexpectedly refreshed. 

Include both admins in conversations around any updates in either system. The changes may not affect the opposing team but it’s good to know just in case.

#3 Experience Team and Business Benefits

The above are all technical reasons why marketing and Salesforce admins should be best friends. But, we haven’t even touched on the business and team building benefits, which are huge.

Here are a few reasons why:

  • Improve productivity. Stop looking for the cause of a problem but rather plan for the update as a team.
  • You can help advocate for each other with other decision-makers. We are both on the same team and we should both want the same thing. But when one team of admins is working on something and leaves the other out, they can be left to play catch up and try and figure out what’s going on… increasing the frustration and silo.
  • Ultimately, it comes down to $$$ –  Two sets of admins working independently = Mo $ Mo time
  • Teach each other. The great thing about being an admin is that every day is a school day, we are always learning about the latest tools, security updates and new ways of doing things. Let’s share that knowledge. Get to know what the other team does and find out how you can help each other and make each other’s lives easier.

How to build relationships between Salesforce admins

So what can you do to improve or build a relationship between marketing and Salesforce admins?

  • Documentation, documentation and yes, more documentation. Having a record of changes that have been made and how that change relates to the other system will be a huge help in marketing and Salesforce admins working together. 
Tip: Using Pardot? Create a shared spreadsheet with all the Salesforce fields and note if they are synced with a Pardot field. What’s that field for? What’s the sync behavior? What are the values? Admins can then refer to this document when field changes need to be made and ensure the other admin knows if it’s going to affect them 
  • Schedule a regular sync up and use this time as a feedback loop, planning session. This can be monthly or quarterly, depending on how often changes are made. Here are some questions you can ask during these meetings:
    • What plans do each admin have for the month ahead?
    • How will this impact the other team?
    • Consideration you hadn’t thought about
    • What does each team need to do to prepare? How long will it take to get things in order? 
    • What’s not working at the moment and what can be done? 
  • Create a joint Slack, Teams, Google Hangouts channel. Whatever your choice of instant messaging channel, use it to inform admins on both sides of any upcoming changes. Use it to post reminders, questions, updates. This will become your go to place to find answers and work with your admins. 
  • Consider an overview training session of your respective platform. Does your Salesforce admin understand the impact on Marketing cloud when field visibility is changed in Salesforce? Probably not. Work with them to help them understand the implications of such changes. They simply may not know what affects the connection between Salesforce and Marketing Cloud.

Wouldn’t it just be easier to just give Marketing admins Salesforce admin access? 

Yes and no… If you’ve read our blog on Why Should Marketing Admins Have Salesforce Access?, you would have noticed a lot of very good reasons as to why marketing admins should have salesforce access. This is great if you can hand out this access but what happens when you can’t? Should each admin go their separate ways, never to speak again? Absolutely not! 

Even if you can get Salesforce access you should still be opening up communication between yourself and other Salesforce admins.

Strengthen those relationships between marketing and Salesforce admins

Creating a harmonious relationship between both marketing and Salesforce admins starts with the basics… communication and understanding for each other’s roles. When this is followed the benefits can be huge, both personally and technically. 

What tips do you have for improving the relationship between both admins? Let us know in the comments.

We all know constant changes are inevitable in the realm of marketing technology. So, having a pulse on what’s coming and what we know to be true is essential. 

ICYMI – Sercante Founder and CEO Andrea Tarrell recently joined the UpperRight team on the NextThingNow podcast to share her thoughts on the future of MarTech and the next big things coming to the Salesforce marketing community.

Here’s a quick preview of the podcast episode.

Words of Wisdom from Special Guest Andrea Tarrell

We all know constant changes are inevitable in the realm of marketing technology. So, having a pulse on what’s coming and what we know to be true is essential. 

In this episode of the NextThingNow podcast, you’ll learn what the future looks like for marketers on the Salesforce platform from Andrea’s perspective.

With the pandemic in the rearview mirror and big Salesforce Marketing Cloud platform changes on the horizon, Andrea covers the major themes she’s following to stay ahead of the curve. She also talks about her career progression, how Sercante came to be, and what’s in store for Sercante clients and friends in the coming months.

And of course, Andrea’s inherent real-talk cheekiness makes an appearance.

Listen to Andrea on the NextThingNow podcast

You have so many options to listen to the NextThingNow podcast. So, get on that!

Click on the link above or use one of these methods to check it out.

What is the NextThingNow podcast?

The MarTech landscape is complicated. NextThingNow podcast aims to demystify the craziness by talking to experts from across the ecosystem. 

Hosts and co-founders of UpperRight Adam Levelle and Alan Schulman ask questions that go beyond stock answers to real solutions to benefit listeners who work in the marketing technology space. 

Adam Lavelle
Alan Schulman

Listen to the episode and tell us what you think

Go give it a listen while you churn out your marketing magic. And then tell us about your greatest takeaway from the podcast episode in the comments section below.

Enjoy!

New technology and shifting buyer expectations are pushing B2B companies to rethink their acquisition and retention strategies. Leaders across sales, marketing, and customer success are investing in centralizing their operation teams to drive efficiency and accelerate revenue. Revenue operations, or RevOps, is an emerging function in B2B companies that leverages cutting-edge technology to achieve better team alignment and meet changing buyer expectations. 

What are revenue operations?

Revenue Operations, or RevOps, is the alignment of sales, marketing, and customer success operations across the entire customer lifecycle to drive growth through operational efficiency and keep all teams accountable to revenue. Operational efficiency is especially important given the current economic climate and teams are doubling down on their RevOps investments to fuel growth.

But perhaps the most important reason that RevOps has become such a focal point for B2B companies is that it’s become necessary for meeting customer expectations. Put simply, your prospects have grown frustrated with traditional sales cycles.

Avoid leaky lead funnels for smoother customer experiences

Shifts in B2B buyer expectations have your prospects craving a frictionless, B2C-like experience with every SaaS evaluation. If it takes longer than five minutes for someone to reach out to them after their initial inquiry, they’re significantly less likely to convert. 

Five minutes. For many businesses, that sounds like a pipedream. But when studies show that 78% of customers buy from the company that responds to them first, it may be time to rethink how you currently manage your lead lifecycle processing pipeline. 

And there’s a lot to rethink. Just take a look at all the steps in the lead lifecycle today.

With so many processes occurring across different applications, it’s easy to see how leads can fall through the cracks. Leaky lead funnels account for a 30% loss of potential revenue, leading many B2B organizations to invest in RevOps and rethink how their leads are processed. But before fixing your funnel, you must first identify the gaps.

What’s causing your leaky funnel?

The most common issues affecting your lead funnel are outdated technology, scarce dev resources, and the limited integration capabilities of your current tools.

  1. Lead data is siloed across legacy and new platforms. Teams across sales and marketing must spend an inordinate amount of time on manual processes such as uploading, cleaning, and routing leads.

    Not only does siloed data lead to slower follow-up times, but it also results in a bunch of lead management headaches such as duplicate lead lists that incorrectly inflate lead counts, routing leads at the wrong stage to the wrong destination, or accidentally continuing to contact leads that have opted out.
  2. Point-to-point solutions require resources you don’t have. Cobbling together point-to-point solutions using custom code requires dev resources, which are usually not available or very limited. On top of that, as APIs inevitably change, your team remains on the hook for updating and maintaining the integrations. Put simply, it’s not a scalable solution.
  3. Out-of-the-box integrations don’t fit your business needs. Many sales and marketing platforms offer limited connectivity to a handful of tools. It’s likely that your most important apps aren’t seamlessly integrated to the customized use cases you need for your business.

    In other words, the most important lead data stays locked up within each application. Without robust integrations, none of your individual apps can deliver important insights on the full picture of where, how, and why your leads engaged with you, or the best way to follow up with them.

Rethink your lead lifecycle with a cloud-first low-code approach to automation

RevOps is a relatively new function in organizations today. As such, RevOps professionals must leverage the most modern tools available today to help them achieve their day-to-day business tasks. 

Using a low-code, cloud-first approach to automation with a platform like Tray.io, RevOps professionals can integrate their sales, marketing, and customer support applications and completely automate the entire lead lifecycle. 

Eliminating the manual processes involved in lead capturing, cleansing, recording, monitoring, and engagement results in highly-accurate lead data rapidly flowing through your funnel. Then, you see higher conversions and increasing revenue. 

To learn how low-code automation can repair your leaky funnel, check out this Mardreamin’ session on The Age of RevOps: Reinventing Lead Lifecycle Management.

Many organizations assign Marketing Cloud Account Engagement (Pardot) prospects who are not yet sales ready to a “Cold” leads queue in Salesforce so data syncs and is available for reporting. The problem is that Pardot can’t reassign these leads once they “score up” and many get stuck in the cold leads queue in perpetuity.

In this post, we’ll discuss how leads can be automatically reassigned from the cold leads queue with the help of Salesforce Flow and some Apex code. This solution allows marketing teams to have full-funnel lead reporting in Salesforce without burdening sales with unqualified leads.

To Sync or Not to Sync?

The question of when to sync prospects from Pardot to Salesforce is one that comes up quite often when speaking to my clients. The answers from marketing and sales often differ. And both sides are passionate about it with compelling arguments.

The Marketing Perspective 

I need to show the full impact of my marketing activities and the leads my team is generating. If leads are only synced to Salesforce when they are sales ready, my numbers are going to be understated. That means my budget is going to be questioned — and probably slashed.

The Sales Perspective 

My time is valuable and I’m working on a commission. I don’t want to be distracted by a bunch of junk leads. I need to focus my time and energy on leads who have an interest in what we have to offer. I have a quota to hit!

I’m often pulled into these conversations and asked for my recommendation. Without hesitation, my answer is always the same — it depends. Some organizations need all prospects in Salesforce for reporting purposes and some only want sales ready leads added into Salesforce. Both approaches have merit and are correct based on the needs of the organization. 

However, you can have your cake and eat it too! Enter — the cold leads queue.

The Salesforce Cold Leads Queue

My favorite solution to satisfy the needs of my friends in marketing and sales is the introduction of a cold leads queue. 

The cold leads queue is the best of both worlds solution. It allows all the Pardot prospects to sync immediately to Salesforce — which allows for accurate lead reporting for marketing while not burdening sales with leads that are not yet ready. The cold leads queue is also a great place for sales teams to find additional leads to call in the event they are running low on MQLs to call.


So What’s the Catch?

Like all good things, there is a catch to using a cold leads queue. By design (and for good reason), Pardot can only assign prospects if they are currently unassigned. Once the prospect is assigned and synced to Salesforce, Pardot can’t change the assignment.

I’m sure you see where I’m going with this. In our case, we would assign a lead that does not meet our MQL criteria to the colds leads queue (in Pardot), so it will sync to Salesforce. This is perfect as the lead is in Salesforce for reporting purposes and is not cluttering the lists views of our sales teams. 

But what happens when that prospect interacts with our marketing campaign and “scores up” to meet our MQL criteria? Houston, we have a problem!  


Reassigning MQLs from the Salesforce Cold Leads Queue

I’ve seen this many times. Leads get stuck in the cold leads queue and are not reassigned once they hit the MQL threshold. 

Why does this happen? Well, there are a few reasons.

  1. People forget that Pardot can’t reassign previously assigned leads and assume that their automation rule is doing the trick!
  2. Since reassignment has to be done in Salesforce, the marketing team does not have the proper permissions to do the job.
  3. Manual reassignment of leads is not a fun or glamorous job that Salesforce Admins look forward to doing.
  4. People just plain forget about leads once they hit the cold leads queue.

So what’s the solution to this issue? I’m glad you asked. 

The solution is to use a Salesforce flow and Apex combined to automate it.

Let’s Start With Some Definitions

Apex 

Apex is a strongly typed, object-oriented programming language that allows developers to execute Flow and transaction control statements on Salesforce servers in conjunction with calls to the API. Using syntax that looks like Java and acts like database stored procedures, Apex enables developers to add business logic to most system events, including button clicks, related record updates, and Visualforce pages. Apex code can be initiated by Web service requests and from triggers on objects.

Flow 

A flow is an application that can execute logic, interact with the Salesforce database, call Apex classes, and collect data from users. You can build flows by using Flow Builder.

*Definitions from the Salesforce Glossary

The Big Reveal

I know I talked about having your cake and eating too at the beginning of this post. Well, it’s time for cake! The trick to using cold lead queues effectively is automating the process of “promoting” leads from the queue and into the hands of your sales team — and here’s how you do it.

  • Step 1 – Determine the criteria that should trigger the reassignment of leads that are in the cold leads queue. This could be a Pardot score crossing a threshold or the change in a custom field value.
  • Step 2 – Review your Lead Assignment Rules (Salesforce) for accuracy and make and needed updates.
  • Step 3 – Create an Apex class to call your lead assignment rules from Salesforce — in sandbox. This is an invocable process and can be called by flow. Below is an example of how this code could look.


  • Step 4 – Create a test class to ensure code coverage. You’ll need to have 75% code coverage in sandbox before your code can be pushed to production.
  • Step 5 – Create a record triggered-flow based on your MQL criteria. As an example, your flow could be triggered when a lead is updated and their Pardot score exceeds 150 points.

When creating your Flow, it’s important that you include an asynchronous path. This will ensure that the flow runs after the changes to the lead record (that triggered the flow) are complete.

The rest of the Flow is pretty basic and will look something like this.

  • Step 6 – Test and validate. Test your Flow first using Debug to make sure it’s being triggered when your lead score is changed to exceed the target score. Once verified, activate the flow in sandbox and test on some actual leads.
  • Step 7 – After validating your flow in sandbox, create your outbound changeset. In production, validate your inbound change set (since this change set does include Apex code, be sure to run all local tests). Deploy once validated.
  • Step 8 – Activate your flow and relax — knowing that no good leads are going to go bad in your cold lead queue!

Get Those Lead to Sales!

This post provided a high-level overview of how to automate the reassignment of leads from your cold leads queue. This is a common problem and addressing it is a great way to get some great leads into the hands of your sales team immediately. 

If you need a hand setting up the actual process, contact us with your questions.

People change jobs all the time. Maybe they’re part of The Great Resignation. Or navigating a new career path after years of military service. But have you ever thought about what to do in Marketing Cloud Account Engagement (Pardot) when contacts change jobs?

It’s something you should consider for two reasons. 

  1. If the person leaving was the primary contact, then you’ll have to figure out how to address generating new sales opportunities with the company.
  2. The contact who changes jobs may be joining another company that can use your products or services.

You could:

  • Delete the contact record
  • Update the record
  • Tell sales they left
  • Sales can tell you they left

THERE ARE SO MANY OPTIONS!!!

What do you do???

The do nothing easy button when Pardot contacts change jobs…

The simple answer is to do nothing. Delete the prospect record, and move on.

For the majority of records in your database, letting them go peacefully is exactly what we ought to do. A great many records in your database are not going to buy from you anyhow.  If they are really interested in your offerings, then they will come back on their own with their new business email address.

Easy! Next Question!

If only business was so easy…

Is that really the user experience you want people to have with your brand? 

How does Pardot know when CRM contacts leave a company?

The simplest answer is that we see email hard bounces when we send contacts an email through Pardot.

Some email systems won’t hard bounce emails as an anti-spam measure. (This is why we should delete records after a period of time when they show no activity and may be silenced hard bounces.) In those cases, we would depend on other ways of knowing.

Use the CRM to notify Pardot when the contact record changes

Sales tried calling and was told they left. This is usually marked in the CRM in some fashion. We can configure Pardot to recognize this and take action accordingly. The solution likely looks like a dynamic list looking for these former employees and deleting them in Pardot periodically. 

Or, we may have a data augmentation vendor, which is telling us that the contact has left. We would again follow a similar process to the above to get these records out of our Pardot instance.

Use a hand-wavy custom field process to record when contacts change jobs

When there isn’t a formal process or custom fields to use for employment status, people will just figure things out. 

Too often, this involves editing a field, such as the last name, to add “Left the company” or “retired” or “died” —  yes, I have seen all of these. In fact, I have seen physical mailers go out with ‘died’ in the address because we couldn’t filter out records we shouldn’t take action on anymore. Talk about cringeworthy.

(read more on avoiding marketing horror stories in this post)

If we look at the data vendors as likely followers of best practice, we see many of them with two fields:

  • An ‘active/inactive’ field
  • And sometimes a ‘reason’ field

The reason field may be more important to our account-minded sales team. That’s because they have established relationships with these individuals versus the bulk data vendors who don’t have the same visibility as to why people are no longer at a company.

Determine personal versus business interest for the contact

A lot of people want to change an email address to the new company email address in Pardot, and then change a Contact record over to the new Account in the CRM.

This may not be the best idea.

While an individual doesn’t forget everything about you when they change jobs, their new company may be effectively starting from scratch.  Personal interest doesn’t automatically transfer to a person’s new company. That’s because the business interest may not be there… yet.

Using Net Promoter Score (NPS) and brand mavens

If you use Net Promoter Score surveys, people changing jobs may be a great way to action those scores. Your 9s and especially the 10s may very well ‘recommend to a friend or colleague’ at their new position. 

If somebody truly loves your brand, they may be the best sales person you can have. They will find all the hidden buyers at that new organization and close a sale before your sales team is even involved. 

Keep your brand mavens happy even if there isn’t an opportunity now. They will work on the new org at their own pace and the org may be ready in a few years without needing much time spent by sales.

Conversely, a NPS 1-4 moving to a new org with an active project can totally derail the opportunity. Sales may be blindsided as the negative new hire may not come to their attention. A project that was about to close just evaporates in front of their eyes, inexplicably. 

Create a process for your team for contact job changes

Notify the sales team.

If we get an email bounce for somebody who is connected to an open opportunity, we probably ought to notify sales that we’ve lost somebody in our buying center. This usually involves creating a task in Salesforce.  

Sales could use this information to try to find the new person taking over the project. The task shouldn’t demand action. But rather, it informs the team of the situation and suggests a few possible courses of action — as defined by the sales manager.

This could look like an automation rule looking at the high/low NPS scores, Pardot bounces, and the dynamic list of records marked in CRM as left.

Link an old Salesforce record to a new record.

If your business makes sense for doing so, you could link contacts together as a custom field(s) and connect a person from their prior job to the new contact record. This would be a forward looking pointer. We want to be able to follow that brand advocate to where they are now. We are less interested in where somebody was in this context.

If your business truly has a good user community and you want to keep track of people over the course of their career (let’s use the Salesforce MVPs as an example), then we can create a custom object to track brand mavens, VIPs, influencers, or  whatever you want to call it. 

A contact record would link to this custom object. As people move around, we have a consistent way to find the most current contact record for these rock stars. 
To make this actionable in Pardot, we would have a ‘current contact’ ID on this custom object and pull this into Pardot as a custom object.  We can now create dynamic lists, and provide a red carpet treatment in our Engagement Studio Programs (ESPs).

Wait, the contacts aren’t gone, just promoted!

Funny thing, preconceived notions. We just jump to conclusions! 

The title of this article said nothing about leaving the company….

Tracking internal job movement

Internal job movement is going to be harder to suss out and action at scale in Pardot. Is the Prospect in the same department and our products or services even still relevant to them?

Our Grading may change with the new role. We need to make sure that our Grading Rules are written in a way that they can re-evaluate correctly to the new criteria.

Speaking of new roles…. Oftentimes, our Pardot to CRM sync field settings are set that the CRM ‘wins’ if there is a difference. 

People filling out forms in a hurry tend to not always properly capitalize things, or may abbreviate. Conversely, our sales team tends to make sure these details are exactly right before a PO gets sent out. Thus our expensive, staff-curated data tends to have more ‘staying power’ than user-submitted data.
But if the Prospect just filled out a form telling us about their new promotion, and that new job title syncs to the CRM, the CRM refuses the change and we’ve lost the big news!

This is the pain of data management. We can’t have easy, simple processes that always work all the time. 

We may need to change the field sync behavior to last updated, and hope that we don’t get end users damaging our data too often.

How do promotions affect buyer personas?

The other thing to think about is how their information needs may change with the new role. Being promoted to a manager means they no longer use the product every day, so they are less interested in specific features and usability, but now more on team effectiveness and ROI for how they spend that fancy new budget they just got control over.

Our ESPs need to be designed such that we can fall out of the old role-relevant nurtures, and they can start getting the new content.

Like most things in marketing, the answer is “it depends”

There are a lot of options that we could do. Depending on your business and your audience, some things will be more impactful than others to the company’s bottom line.  

However, we don’t need to do all the things right now.  Pick one thing that seems like it will help the most, and try to work on that. 

It may take a couple of iterations before you get it right. It’s OK.

And if you’re still stuck after that, then tell us about it in the chat. Or send us a message.

Sometimes the standard Campaign Influence models that come with Marketing Cloud Account Engagement (Pardot) just don’t quite fit what you are looking to measure. We recently went through the exercise of creating a Custom Model, and it wasn’t quite as straightforward as we would have liked it to be. 

To save you some ramp-up time we’ve decided to share some of the things we learned. Here they are!

Lessons Learned the Hard Way while Creating a Custom Pardot Campaign Influence Model

We went ahead and created a custom Pardot Campaign Influence model and took excellent notes so you can reap all the benefits. 

Here’s what you should know before you start your own custom Pardot Campaign Influence Model project.

Simplify your Custom Model, then nail it down

There’s a lot of calculations needed in Campaign Influence, and the last thing you want to do is build this a few times as you discover exactly what you are looking for. 

Spend some time with the business and really think about which touches you really want to measure and if having them measured will drive meaningful business value. Can you explain it in 20 seconds or less? No? Your model might be too complex.

You have 2 options for integrating your Model

The simple example Salesforce provides as part of its documentation is to have a Trigger on the CampaignInfluence object, which allows you to create your records when Salesforce creates theirs.  This example is okay for demonstrative purposes, and it avoids a lot of the complexities. 

The example also works okay if the Model that you are “watching out for” creates and deletes CampaignInfluence records at the same time you need to. Though for us, often we discovered that we wanted our Model to recalculate, but it never did. This is because the default model didn’t need recalculating so no new records were created/edited. As a result, ours never had the chance to run. 

One way around this is to watch out for the b2bmaEvenDistributionModel as it has the most chance of adding/removing records, and firing off your trigger.

Another thing to consider (if you are relying on another model’s calculation to trigger your custom one) is that Salesforce doesn’t properly batch influence calculation. We learned this when turning off the Even Distribution Model and turning it back on hoping it would trigger calculation on all Opportunities. We ended up having our own Batch APEX class run to initially populate data for our new model.

If you need a little more control, you would need to introduce triggers on various objects (such as CampaignMember, OpportunityContactRole, Opportunity) looking for the events that would have an impact on your Model and cause it to recalculate. You might find luck here using Platform Events to separate the triggering event from all the processing that the Model might need, especially important as Opportunities often already have a lot of custom automations hanging around them.

Campaign Influence code runs as a special User

Salesforce’s CampaignInfluence records are created by a Special Salesforce User “Salesforce Administrator” which you can’t pick when setting up debug logs. You can find this User’s ID by looking at the CreatedById field of any of the CampaignInfluence records in your org.

Setting up a Debug log for this user is a bit more involved than normal, and needs you to manually create a TraceFlag entry referencing the special User as well as the Id of DebugLevel. We used https://workbench.developerforce.com ‘s REST explorer to create the record, and we used the SFDC_DevConsole DebugLevel allowing us to use the DeveloperConsole to check out the logs as we were testing.  A bit of setup for each debugging session, but worth it.

Break your code into debuggable chunks

We ran into a few different challenges as we were putting this together, and we found having our code broken up really sped up our debugging process. Each chunk of code had debug statements giving us an idea of the overall state / progress, which made it easy to quickly diagnose where things might be going awry.

While we aren’t yet ready to share a precise recipe, we can at least give you the ingredients we used!

  1. Build a list of Opportunity IDs of the Opportunities that need to be calculated
  2. Get all Opportunity details (including Opportunity Contact Roles)
  3. Get all needed CampaignMember records
  4. Calculate the “winning” CampaignMember records for each Opportunity
  5. Calculate the CampaignInfluence records needed from the “winning” CampaignMember records
  6. Insert final results

Plan for custom Campaign Influence Model success

Creating a Custom Campaign Influence Model is not for the faint of heart. It takes quite a bit of planning and work to put together even the simplest of Models (which might be why there’s so little out there when we tried googling for examples). 

If you are looking to take this on, hopefully these tips save you a bit of frustration and colorful language. If it still looks daunting and you need some help, we would love to have a chat!

Further Reading

No more posts to show