[Salesforce] A pie chart in Campaign’s record page

Introduction

What about if we add a component with a pie chart in the Campaign object’s record page? It’s very useful to see how the campaign is going in terms of leads’ statuses. So we want to know the percentage of leads converted, not converted, contacted etc.

I will use Lightning in a Developer org that I just created to take advantage of its default data. So let’s go!

Assumption

You are familiar with a Salesforce org, Lightning and you have created some reports in the past. If you haven’t created any report yet, you can read this module in Trailhead: Reports & Dashboards for Lightning Experience

Add leads to a campaign

First of all, let’s add some leads to a campaign.  You only have to add leads to a campaign, you don’t have to create any data.

Create the report

Go to Reports, New Report, expand Campaigns, select Campaign with leads and click on Create.

Drag Lead status field and group by this field

group-by-report

Save the report with the name you want and, importantly, in a public folder.

Run the report and add a pie chart. Don’t forget to save it.

chart-attributes

Add the report component

Now let’s add our report to the Campaign’s record page.

Open any campaign and Edit Page to open the App Builder.

edit-page.png

Drag the Report Chart component and set those parameters

app-builder.png

Save the page and press Back to see the record page again with the report

record-page-with-report.png

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s