Demystifying Messaging & Person Account on Salesforce.com

Tips & Tricks for Admin Experience & Configuration

lecharles

--

Are you wondering how to use Messaging Channels with Person Account on Salesforce? Or are you struggling trying to make this work? You’ve arrived to the right place. In this article I will show you how to configure Salesforce to use Messaging on Person Account today.

Service Cloud EE Trial Org instantiated a few days back to build this tutorial

What is Person Account?

You want to use Salesforce for B2C use cases. Person Account is the solution for this. It is a special ‘composite’ or ‘virtual’ object made of fields coming from both Account & Contact. It holds a 1 to 1 relationship between Account and Contact if you may.

Notice how Person Account in the Object Manager shows no fields, nor triggers, nor actions as you would expect on both a standard or custom object for ex.

Before Enabling Person Account

There are certain house keeping steps necessary and recommended before enabling Person Account in your org.

  1. Create a NEW Account Record Type: call it for example “Business Account”
  2. Goto Sharing Settings: make sure both internal and external accesses are set to ‘control by parent’ enabled for Contact.
  3. Goto Account Settings: tick ‘Allow customer support to enable person account’
  4. You’re ready to enable to Person Account in your org. More details here for setting up Person Accounts.

Request Person Account Enablement

In order to use Person Account you need to request this functionality with the Salesforce’s support team. Create a ticket, make the request. Once you’re good to go, feel free to simplify your Person Account’s Page Layout as a B2C ‘account’ doesn’t necessary need all of the info one might need on a B2B type of account. Important: once Person Account is active it cannot be disabled.

B2C Use Cases on Salesforce

Now you are ready to use Person Account for B2C use cases. In this article I am showcasing this capability in a trial org where I’ve enabled it. I am also assuming this org will leverage B2C use cases only. We will configure everything according to this assumption.

Messaging Objects

Currently, there are 2 objects representing the use for Messaging channels on Salesforce.

Messaging User (MEU)

It is is the object that represents the ‘channel end user’ or ‘messaging end user’ that will interact with your brand. If you are a retailer, this will be your consumer. MEU supports Person Account. It holds 2 look up fields to both Account and Contact. We will later use these.

Messaging Sessions (MS)

It is the object that represents the ‘channel session’ or the engagement taking place between your brand and consumers. Messaging Sessions represent interactions for the following messaging channels: SMS, Facebook Messenger, WhatsApp. Messaging Sessions are routed by Omnichannel on Salesforce Lightning Experience.

MEU and MS hold a 1-to-many relationship. An MEU has many Messaging Sessions and a Messaging Session belongs to a specific MEU. For example: a Messaging User for the SMS channel will have on its related list, all Messaging Sessions corresponding to the ‘SMS engagements’ or ‘SMS sessions’ held with the brand for that very consumer, on that specific channel.

Create Custom look up field on Messaging Sessions

If you have been trying to showcase related messaging sessions on the Person Account record home, you’re probably running into an issue. The following ‘formula fields’ on Messaging Session, EndUserContactID & EndUserAccountID, are not working as expected. In this article I’m presenting a solution to bypass this issue.

Create a Custom Lookup Field on Messaging Session. Make it look up to the Account object. We’re just going call it Account for example.

Use Standard Capabilities: Flows & Process Builder

Lightning Flow

This will be an autolaunched flow that will be executed every time there are new Messaging Sessions (MS) created as well as every time a Messaging End User (MEU) is created or updated. We will create the trigger to this flow right afterwards.

What are we going to make this Flow do? Let’s use it to update Messaging Sessions with the ‘Account ID’ information coming from MEU and using our newly created custom field ‘Account’ on MS.

Create 2 text variables: One, we’ll be used to grab the Messaging User, let’s call it MessagingUserID. And the other will be used to grab and work with the Messaging Session record, and let’s name it MessagingSessionID.

Create 2 actions and move on. We first need to grab the Messaging End User (MEU) available behind the scenes during the engagement. For this we’ll use a standard ‘Get Record’ action.

Finally we’ll leverage a standard ‘Update Record’ action to update the Messaging Session (MS) record on the active engagement with the Account ID information coming from the MEU and using our newly created custom field on MS.

How to set field value for our custom look up field ‘Account’ on Messaging Session? See screenshot below.

The end result is a simple and helpful Lightning Flow.

Process Builder (PB)

Next, is to listen to changes on both Messaging User (MEU) and Messaging Sessions (MS) in order to take action leveraging our newly created Flow.

Create a Process Builder on Messaging Session. This PB listens on changes on MS and updates it with the corresponding Account ID info we get from the MEU. It is possible to this by calling (autolaunching) the flow we created above.

Next step is creating a process builder on Messaging User. This PB listens on changes on MEU in order to update Messaging Sessions on our newly created look up field “Account” on that very object.

Page Layouts: Messaging Session & Person Account

Final steps are configuring accordingly both page layouts for Messaging Sessions and Person Account. By default Messaging Sessions record home will provide the following components.

Since we’re dealing with B2C use cases only, let’s change this page layout. But first, let’s create an Update Action on the Account object as shown below. I’m calling it “Messaging View”.

Second, let’s create a ‘Create RecordGlobal Action, this time on the Person Account as a target object, as shown below. I’m calling it “New Person Account”.

Now, let’s update our Messaging Session page layout by dragging and dropping a new Related Record. Click on Edit Lookup Field. Choose Messaging User as First Lookup and Account as Second Lookup. Then call the newly created Actions accordingly. See screenshot below.

You can now delete the existing contact component and work with Person Account for your B2C use cases.

Person Account Page Layout

How can I have the customer ‘engagement history’ on the Person Account record home? That’s the end result we are achieving here. Let’s bring both Messaging User as a related list and Messaging Session as a related list single. Configuration as below.

Now, on your Person Account record home you will have all Messaging End Users related to that Consumer. Also, you will see all ‘engagements’ this customer has had with your brand across every messaging channel.

Thank you for reading this article. Feel free to reach out.

Twitter: @lecharleslozano

--

--

lecharles

Product Management @Salesforce. Language AI Apasionado. Web Application Development. Crypto & Open Blockchains Aficionado.