ActivityId |
- Type
- reference
- Properties
- Create, Filter, Group, Nillable, Sort
- Description
- ID of the activity that is associated with the email.
Usually represents an open task that is created for the
case owner when a new unread email message is received.
ActivityId can only be
specified for emails on cases. It’s auto-created for
other entities.
|
AttachmentIds |
- Type
- string
- Properties
- Create, Nillable, Update
- Description
- A comma-separated list of email attachments. This is
used
by the Send Email quick action when you use Salesforce
Classic email templates. Maximum
length is 32, 768 characters.
|
AutomationType |
- Type
- picklist
- Properties
- Create, Filter, Group, Nillable, Restricted picklist, Sort
- Description
- A picklist value that determines if an outgoing email was manually created or
AI-generated.
- Possible values are:
-
AiAssisted–Email is AI-generated, but sent by
human.
-
AiAutomated–Email is generated and sent by
AI.
-
Null–Email
is created and sent by human.
|
BccAddress |
- Type
- string
- Properties
- Create, Filter, Nillable, Sort, Update
- Description
- A string array of email addresses for recipients who
were sent a visually impaired carbon copy of the email
message. Include only email addresses that aren’t
associated with Contact, Lead, or User records in
Salesforce. If the recipient is a contact, lead, or
user, add their ID to the BccIds
field instead of adding their email address to the
BccAddress field. When adding
their ID, the email message is automatically associated
with the contact, lead, or user. For an Experience Cloud
site user who isn’t the sender of the email, this field
returns null.
- You can’t send emails unless there’s at least one
recipient.
|
BccIds |
- Type
- JunctionIdList
- Properties
- Create, Update
- Description
-
A string array of
IDs for contacts, leads, and users who were sent a
visually impaired carbon copy of the email message.
Each ID is linked to an
EmailMessageRelation record,
which represents the relationship between an email
message and a Contact, Lead, or User record. For an
Experience Cloud site user who isn’t the sender of
the email, this list is empty.
Adding a
JunctionIdList field name to
the fieldsToNull property
deletes all related junction records. This action
can’t be undone.
|
CcAddress
|
- Type
- string
- Properties
- Create, Filter, Nillable, Sort, Update
- Description
- A string array of email addresses for recipients who
were sent a carbon copy of the email message. Include
only email addresses that aren’t associated with
Contact, Lead, or User records in Salesforce. If the
recipient is a contact, lead, or user, add their ID to
the CcIds field instead of adding
their email address to the
CcAddress field. Then the email
message is automatically associated with the contact,
lead, or user.
- You can’t send emails unless there’s at least one
recipient.
|
CcIds |
- Type
- JunctionIdList
- Properties
- Create, Update
- Description
-
A string array of
IDs for contacts, leads, and users who were sent a
carbon copy of the email message. Each ID is linked
to an EmailMessageRelation
record, which represents the relationship between an
email message and a Contact, Lead, or User record.
Adding a JunctionIdList
field name to the fieldsToNull
property deletes all related junction records. This
action can’t be undone.
|
ClientThreadIdentifier |
- Type
- string
- Properties
- Create, Filter, Nillable, Sort, Update
- Description
- A value used by third-party email clients to identify
which thread an email belongs to. See Email-to-Case
Threading for more information.
Available
in API versions 56.0 and later.
|
ContentDocumentIds |
- Type
- JunctionIdList
- Properties
- Create, Update
- Description
-
A string array of IDs for
content documents such as files and attachments that
are associated with an email. Each ID is linked to a
ContentDocumentLink record,
which represents the relationship between an email
message and a content document record.
Adding
a JunctionIdList field name to
the fieldsToNull property
deletes all related junction records. This action
can’t be undone.
|
Division |
- Type
- picklist
- Properties
- Defaulted on create, Filter, Group, Restricted picklist,
Sort
- Description
- A logical segment of your organization's data. For
example, if your company is organized into different
business units, you could create a division for each
business unit, such as “North America,”
“Healthcare,” or
“Consulting.” Available only if the
organization has the Division permission enabled.
|
EmailRoutingAddressId |
- Type
- reference
- Properties
- Create, Filter, Group, Nillable, Sort, Update
- Description
- Stores the ID of the email routing address used to
create the email. This value is
set
when the email is processed by Email-to-Case service.
When this field is set, EmailMessage.Incoming cannot be
false.
- Relationship Name
- EmailRoutingAddress
- Relationship Type
- Lookup
- Refers To
- EmailRoutingAddress
|
EmailTemplateId |
- Type
- reference
- Properties
- Create, Filter, Group, Nillable, Sort, Update
- Description
- The email template, if any, that was chosen for the
email. This field is populated in Lightning Experience
only.
- This is a relationship field.
- Relationship Name
- EmailTemplate
- Relationship Type
- Lookup
- Refers To
- EmailTemplate
|
FirstOpenedDate |
- Type
- dateTime
- Properties
- Create, Filter, Nillable, Sort, Update
- Description
- The date the email was first opened.
To see this field, enable email tracking in your org.
|
FromAddress |
- Type
- email
- Properties
- Create, Filter, Nillable, Sort, Update
- Description
- The address that originated the email. When using this
field, specify an email address that exists in
EmailMessageRelation, with a
RelationType of
FromAddress.
- EmailMessages in Draft status with
IsPrivateDraft set to true must use the
user's address, a verified org-wide email address, or a
verified Email-to-Case routing address in the
FromAddress field.
|
FromId |
- Type
- reference
- Properties
- Create, Filter, Group, Nillable, Sort
- Description
- The contact, lead, or user who sent the email. Maximum
length is 18 characters.
|
FromName |
- Type
- string
- Properties
- Create, Filter, Nillable, Sort, Update
- Description
- The sender’s name. When using this field, specify
an email address that exists in EmailMessageRelation,
with a RelationType of
FromAddress.
|
HasAttachment |
- Type
- boolean
- Properties
- Defaulted on create, Filter, Group, Sort
- Description
- Indicates whether the email was sent with an attachment
(true) or not
(false).
|
Headers |
- Type
- textarea
- Properties
- Create, Nillable, Update
- Description
- The Internet message headers of the incoming email. Used
for debugging and tracing purposes. Doesn’t apply to
outgoing emails.
|
HtmlBody |
- Type
- textarea
- Properties
- Create, Nillable, Update
- Description
- The body of the email in HTML format.
- You can’t send emails unless at least one of these
fields has content.
- Subject field
- HTML Body or Text Body field
As the sender, you can provide the content, or it
can be automatically inserted using predefined values.
An email template can also include the content for these
fields.
|
Incoming |
- Type
- boolean
- Properties
- Create, Defaulted on create, Filter, Group, Sort
- Description
- Indicates whether the email was received (true) or sent (false).
|
IsBounced |
- Type
- boolean
- Properties
- Create, Defaulted on create, Filter, Group, Sort,
Update
- Description
- Indicates whether the email bounced.
This field is set
to True for bounced emails in orgs using Lightning
Threading. It’s not set to True for orgs using Ref
ID threading.
To see this field, enable bounce management in your org.
|
IsClientManaged |
- Type
- boolean
- Properties
- Create, Defaulted on create, Filter, Group, Sort
- Description
- If EmailMessage is created with
IsClientManaged set to true, users can modify
EmailMessage.ContentDocumentIds
to link file attachments even when the
Status of the EmailMessage
isn’t set to Draft.
When this field is set to true and Enhanced Email is enabled, a Task
record is created for the EmailMessage regardless of
Email-to-Case settings.
|
IsDeleted |
- Type
- boolean
- Properties
- Defaulted on create, Filter
- Description
- Indicates whether the object has been moved to the
Recycle Bin (true)
or not (false).
Label is Deleted.
|
IsExternallyVisible |
- Type
- boolean
- Properties
- Defaulted on create, Filter, Group, Sort
- Description
- If the Experience Cloud site case feed is enabled,
IsExternallyVisible controls
the external visibility of emails in sites. When
IsExternallyVisible is set to
true—its
default value—external users see the email
message in the case feed.
|
IsOpened |
- Type
- boolean
- Properties
- Defaulted on create, Filter, Group, Sort
- Description
- Indicates whether the email has been opened.
To see this field, enable email tracking in your org.
|
IsPrivateDraft |
- Type
- boolean
- Properties
- Create, Defaulted on create, Filter, Group, Sort
- Description
- If IsPrivateDraft is set to
true, then only the
CreatedById user can view, update, and
send this email draft. If
IsPrivateDraft is set to
false, then any user with
permissions to work on the case can see these drafts.
After the email is sent, then this field is updated to
be false. Public drafts are loaded
and visible in Salesforce Classic while Private Drafts
are only used in Lightning Experience.
|
IsTracked |
- Type
- boolean
- Properties
- Create, Defaulted on create, Filter, Group, Sort,
Update
- Description
- Indicates whether the email is being tracked.
To see this field, enable email tracking in your org.
|
LastOpenedDate |
- Type
- dateTime
- Properties
- Create, Filter, Nillable, Sort, Update
- Description
- The date the email was last opened.
To see this field, enable email tracking in your org.
|
MessageDate |
- Type
- dateTime
- Properties
- Create, Filter, Nillable, Sort, Update
- Description
- The date the email was created.
- For inbound emails, Email-to-Case sets this field using
the Date header. The Date header is set by the email
client and is subject to the sender's time
preferences.
|
MessageIdentifier |
- Type
- string
- Properties
- Create, Filter, Group, idLookup, Nillable, Sort,
Update
- Description
- The ID of the email message.
|
Name |
- Type
- string
- Properties
- Filter, Group, idLookup, Sort
- Description
- A name for the email message that's derived from the
first 255 characters of the Subject field. If the
Subject field is empty, a localized string of [No Subject] is used.
This field is read-only and can’t be created or updated.
Available in API versions 56.0 and later.
|
ParentId |
- Type
- reference
- Properties
- Create, Filter, Group, Nillable, Sort
- Description
- ID of the case that’s associated with the email.
- This is a relationship field.
- Relationship Name
- Parent
- Relationship Type
- Lookup
- Refers To
- Case
|
RelatedToId |
- Type
- reference
- Properties
- Create, Filter, Group, Nillable, Sort, Update
- Description
-
The RelatedToId represents nonhuman objects such as accounts,
opportunities, campaigns, cases, or custom objects.
RelatedToIds are polymorphic. Polymorphic means a
RelatedToId is equivalent to the ID of a related
object.
You must have access to at least one
entity listed under Refers To to access
RelatedToId.
You
can update RelatedToId when
IsClientManaged is set to
true.
RelatedtoId
and ParentId should have the
same value when ParentId is
set. You might see unexpected results
otherwise.
- This is a polymorphic relationship field.
- Relationship Name
- RelatedTo
- Relationship Type
- Lookup
- Refers To
- Account, Accreditation, AssessmentIndicatorDefinition,
AssessmentTask, AssessmentTaskContentDocument,
AssessmentTaskDefinition, AssessmentTaskOrder, Asset,
AssetRelationship, AssignedResource, Award,
BoardCertification, BusinessLicense, BusinessMilestone,
BusinessProfile, Campaign, CareBarrier,
CareBarrierDeterminant, CareBarrierType,
CareDeterminant, CareDeterminantType, CareDiagnosis,
CareInterventionType, CareMetricTarget, CareObservation,
CareObservationComponent, CarePgmProvHealthcareProvider,
CarePreauth, CarePreauthItem, CareProgram,
CareProgramCampaign, CareProgramEligibilityRule,
CareProgramEnrollee, CareProgramEnrolleeProduct,
CareProgramEnrollmentCard, CareProgramGoal,
CareProgramProduct, CareProgramProvider,
CareProgramTeamMember, CareProviderAdverseAction,
CareProviderFacilitySpecialty,
CareProviderSearchableField, CareRegisteredDevice,
CareRequest, CareRequestDrug, CareRequestExtension,
CareRequestItem, CareSpecialty, CareSpecialtyTaxonomy,
CareTaxonomy, Case, CommSubscriptionConsent,
ContactEncounter, ContactEncounterParticipant,
ContactRequest, Contract, CoverageBenefit,
CoverageBenefitItem, CreditMemo, DelegatedAccount,
DocumentChecklistItem, EnrollmentEligibilityCriteria,
HealthcareFacility, HealthcareFacilityNetwork,
HealthcarePayerNetwork, HealthcarePractitionerFacility,
HealthcareProvider, HealthcareProviderNpi,
HealthcareProviderSpecialty, HealthcareProviderTaxonomy,
IdentityDocument, Image, IndividualApplication, Invoice,
ListEmail, Location, MemberPlan, Opportunity, Order,
OtherComponentTask, PartyConsent, PersonLifeEvent,
PlanBenefit, PlanBenefitItem, ProcessException,
Product2, ProductItem, ProductRequest,
ProductRequestLineItem, ProductTransfer, PurchaserPlan,
ReceivedDocument, ResourceAbsence, ReturnOrder,
ReturnOrderLineItem, ServiceAppointment,
ServiceResource, Shift, Shipment, ShipmentItem,
Solution, Visit, VisitedParty, VolunteerProject,
WorkOrder, WorkOrderLineItem
|
ReplyToEmailMessageId |
- Type
- reference
- Properties
- Create, Filter, Group, Nillable, Sort
- Description
- ID of the inbound or outbound email message the current
email message is a reply to. It’s not possible to
reply to a message whose Status is
Draft.
- This is a relationship field.
- This is only set for Case related Email replies at
setup.
- Relationship Name
- ReplyToEmailMessage
- Relationship Type
- Lookup
- Refers To
- EmailMessage
|
Source |
- Type
- picklist
- Properties
- Create, Filter, Group, Nillable, Restricted picklist, Sort
- Description
- When Sync Email as Salesforce Activity is enabled, this value reflects from where the
email was captured automatically.
- Possible values are:
-
Einstein Activity
Capture–Captured as an entire email
message by Einstein Activity Capture.
-
Einstein Activity
Capture Limited–Captured as a header-only
email by Einstein Activity Capture. The sender,
recipients, date, and time of the message were
captured, not the subject or body.
-
Email Integration
App Manual-Captured to track the email
message records created or edited from the
mailapp.
- Available in API version 64.0 and later.
|
Status |
- Type
- picklist
- Properties
- Create, Filter, Group, Restricted picklist, Sort,
Update
- Description
- The status of the email.
The
Status field is mostly
read-only. You can change the status only from
New to
Read.
Possible values are:
-
0
(New)
-
1
(Read)
-
2
(Replied)
-
3
(Sent)
-
4
(Forwarded)
-
5
(Draft)
- For emails not sent as part of a case, only the status
3 (Sent) is
valid.
|
Subject |
- Type
- string
- Properties
- Create, Filter, Nillable, Sort, Update
- Description
- The subject line of the email.
- You can’t send emails unless at least one of these
fields has content.
- Subject field
- HTML Body or Text Body field
As the sender, you can provide the content, or it
can be automatically inserted using predefined values.
An email template can also include the content for these
fields.
|
TextBody |
- Type
- textarea
- Properties
- Create, Nillable, Update
- Description
- The body of the email, in plain text format. If
TextBody isn’t set, then it’s
extracted from HtmlBody.
- You can’t send emails unless at least one of these
fields has content.
- Subject field
- HTML Body or Text Body field
As the sender, you can provide the content, or it
can be automatically inserted using predefined values.
An email template can also include the content for these
fields
|
ThreadIdentifier |
- Type
- string
- Properties
- Create, Filter, Group, idLookup, Nillable, Sort,
Update
- Description
- The ID of the email thread the email message belongs to. This field is used by
features that sync emails directly from an inbox into
Salesforce. This field is not used by On-Demand
Email-to-Case.
|
ToAddress |
- Type
- string
- Properties
- Create, Filter, Nillable, Sort, Update
- Description
- A string array of email addresses for recipients who
were sent the email message. Include only email
addresses that aren’t associated with Contact, Lead, or
User records in Salesforce. If the recipient is a
contact, lead, or user, add their ID to the
ToIds field instead of adding
their email address to the
ToAddress field. Then the email
message is automatically associated with the contact,
lead, or user.
- You can’t send emails unless there’s at least one
recipient.
|
ToIds |
- Type
- JunctionIdList
- Properties
- Create, Update
- Description
-
A string array of
IDs for contacts, leads, and users who were sent a
carbon copy of the email message. Each ID is linked
to an EmailMessageRelation
record, which represents the relationship between an
email message and a Contact, Lead, or User record.
Adding a JunctionIdList
field name to the fieldsToNull
property deletes all related junction records. This
action can’t be undone.
|
ValidatedFromAddress |
- Type
- picklist
- Properties
- Create, Filter, Group, Nillable, Restricted picklist,
Sort, Update
- Description
-
A picklist value with either the sender's address, org-wide email addresses, or
Email-to-Case routing address. The email address
must be verified. If the sender’s email address is
used, the sender must be the current
user.
ValidatedFromAddress
isn’t suitable for use in Group By or Sort By
statements. Use FromAddress
instead.
|