3

I've synchronized two objects (from sales cloud) as Contacts in salesforce marketing cloud. These two objects are "Lead" & "Account" and both are mutually exclusive.

I want to update bounce status in sales cloud at Lead & Account level respectively. "_bounce" data view available in marketing cloud only provides subscriberkey (which is contactkey as well in this case) and doesn't tell me if the particular contact belongs to "Lead" object or "Account" object.

When I create journey in journey builder to update bounce status in sales cloud, how do I identify object type (Lead or Account) against contactkey and accordingly update respective object.

3 Answers 3

8

Contact ID's are starting with 003 and Lead ID's are starting with 00Q.

  • Example Contact: 0030X00002EYLjkAYG

  • Example Lead: 00Q0X00000YRg0VNGH

This is probably the easiest way to differentiate them without doing any lookups to cross-reference data.

0
6

To expand the good answer from Rain, here is a more comprehensive list of record ID prefixes, for the standard objects:

001 Account
002 Note
003 Contact
005 User
006 Opportunity
500 Case
701 Campaigns
007 Activity
00B ListView / View
00D Organization
00E UserRole
00G Group
00I Partner
00O Report
00P Attachment
00Q Lead
00T Task
00U Event
00X EmailTemplate
00Y EmailTemp
00e Profile
00h Layout – Page Layout
00i Pricebook
00j Product
00k OpportunityLineItem
00l Folder
00v CampaignMember
01Z Dashboard
01a DashboardComponent
01s Pricebook2
01t Product2
02c Sharing Rule
03u UserPreference
800 Contract
801 Order
802 OrderItem
806 Approval
0

These two answers cover the topic pretty well but I just wanted to add that you can use getSObjectType method to determine what is the object type behind SFDC Id:

Id unknownObject = '0030X00002EYLjkAYG';
System.debug(unknownObject.getSObjectType());

getSObjectType

2
  • Does this work in marketing cloud also?
    – ASHISH
    Jul 25, 2019 at 0:42
  • @ASHISH, I don't think so but one of the options here could be exposing a small web service from SFDC side and call it from SFMC side to determine object's type Jul 27, 2019 at 19:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .