[
  {
    "apiName": "EmailMessage",
    "label": "Email Message",
    "pluralLabel": "Email Messages",
    "tableType": "standard_object",
    "category": "crm",
    "searchable": false,
    "sharingModel": "Private",
    "enableHierarchySharing": false,
    "description": "Salesforce standard EmailMessage (v66.0 dev-org gold master)",
    "fields": [
      {
        "apiName": "ActivityId",
        "label": "Activity ID",
        "type": "reference",
        "updateable": false,
        "referenceTo": [
          "Task"
        ]
      },
      {
        "apiName": "AutomationType",
        "label": "Automation Type",
        "type": "picklist",
        "options": [
          {
            "value": "AiAssisted",
            "label": "AI-Assisted"
          },
          {
            "value": "AiAutomated",
            "label": "AI-Automated"
          }
        ]
      },
      {
        "apiName": "BccAddress",
        "label": "BCC Address",
        "type": "string"
      },
      {
        "apiName": "CcAddress",
        "label": "CC Address",
        "type": "string"
      },
      {
        "apiName": "FirstOpenedDate",
        "label": "First Opened",
        "type": "datetime"
      },
      {
        "apiName": "FromAddress",
        "label": "From Address",
        "type": "email"
      },
      {
        "apiName": "FromId",
        "label": "From ID",
        "type": "reference",
        "updateable": false,
        "referenceTo": [
          "Contact",
          "Lead",
          "User"
        ],
        "isPolymorphic": true
      },
      {
        "apiName": "FromName",
        "label": "From Name",
        "type": "string"
      },
      {
        "apiName": "HasAttachment",
        "label": "Has Attachment",
        "type": "boolean"
      },
      {
        "apiName": "Headers",
        "label": "Headers",
        "type": "textarea"
      },
      {
        "apiName": "HtmlBody",
        "label": "HTML Body",
        "type": "textarea"
      },
      {
        "apiName": "Incoming",
        "label": "Is Incoming",
        "type": "boolean"
      },
      {
        "apiName": "IsExternallyVisible",
        "label": "Is Externally Visible",
        "type": "boolean"
      },
      {
        "apiName": "IsPrivateDraft",
        "label": "Is Private Draft",
        "type": "string"
      },
      {
        "apiName": "LastOpenedDate",
        "label": "Last Opened",
        "type": "datetime"
      },
      {
        "apiName": "MessageDate",
        "label": "Message Date",
        "type": "datetime"
      },
      {
        "apiName": "MessageSize",
        "label": "Message Size",
        "type": "string"
      },
      {
        "apiName": "ParentId",
        "label": "Case ID",
        "type": "reference",
        "referenceTo": [
          "Case"
        ],
        "relationshipName": "Parent",
        "childRelationshipName": "EmailMessages"
      },
      {
        "apiName": "RelatedToId",
        "label": "Related To ID",
        "type": "reference",
        "referenceTo": [
          "Account",
          "AppointmentCategory",
          "AppointmentInvitation",
          "ApprovalSubmission",
          "ApprovalSubmissionDetail",
          "ApprovalWorkItem",
          "Asset",
          "AssetRelationship",
          "AssignedResource",
          "Campaign",
          "Case",
          "ChangeRequest",
          "CommSubscriptionConsent",
          "ContactRequest",
          "Contract",
          "ContractLineItem",
          "Coupon",
          "CreditMemo",
          "DataQueryWorkspace",
          "DeliveryEstimationSetup",
          "DevopsActivityLog",
          "DevopsEnvironment",
          "DevopsRequestInfo",
          "Entitlement",
          "FulfillmentOrder",
          "Image",
          "Incident",
          "Invoice",
          "LegalEntity",
          "ListEmail",
          "Location",
          "LocationShippingCarrierMethod",
          "OperatingHoursHoliday",
          "Opportunity",
          "Order",
          "Quote",
          "PartyConsent",
          "PrivacyRTBFRequest",
          "Problem",
          "ProcessException",
          "Product2",
          "ProductCatalog",
          "Promotion",
          "PromotionMarketSegment",
          "PromotionQualifier",
          "PromotionSegment",
          "PromotionSegmentBuyerGroup",
          "PromotionSegmentSalesStore",
          "PromotionTarget",
          "PromotionTier",
          "ResourceAbsence",
          "ReturnOrder",
          "ReturnOrderLineItem",
          "ServiceAppointment",
          "ServiceContract",
          "ServiceResource",
          "Shift",
          "Shipment",
          "ShipmentItem",
          "ShippingCarrier",
          "ShippingCarrierMethod",
          "Solution",
          "Waitlist",
          "WaitlistParticipant",
          "WorkOrder",
          "WorkOrderLineItem",
          "WorkPlan",
          "WorkPlanTemplate",
          "WorkPlanTemplateEntry",
          "WorkStep",
          "WorkStepTemplate"
        ],
        "relationshipName": "RelatedTo",
        "childRelationshipName": "Emails",
        "isPolymorphic": true
      },
      {
        "apiName": "Source",
        "label": "Email Source",
        "type": "picklist",
        "options": [
          {
            "value": "Einstein Activity Capture",
            "label": "Einstein Activity Capture"
          },
          {
            "value": "Einstein Activity Capture Limited",
            "label": "Einstein Activity Capture Limited"
          },
          {
            "value": "Email Integration App Manual",
            "label": "Email Integration App Manual"
          }
        ]
      },
      {
        "apiName": "Status",
        "label": "Status",
        "type": "picklist",
        "required": true,
        "options": [
          {
            "value": "0",
            "label": "New"
          },
          {
            "value": "1",
            "label": "Read"
          },
          {
            "value": "2",
            "label": "Replied"
          },
          {
            "value": "3",
            "label": "Sent"
          },
          {
            "value": "4",
            "label": "Forwarded"
          },
          {
            "value": "5",
            "label": "Draft"
          }
        ]
      },
      {
        "apiName": "Subject",
        "label": "Subject",
        "type": "string"
      },
      {
        "apiName": "TextBody",
        "label": "Text Body",
        "type": "textarea"
      },
      {
        "apiName": "ToAddress",
        "label": "To Address",
        "type": "string"
      },
      {
        "apiName": "ValidatedFromAddress",
        "label": "From",
        "type": "picklist",
        "options": [
          {
            "value": "xiaopeng.zhu@pingcap.com",
            "label": "Xiaopeng Zhu <xiaopeng.zhu@pingcap.com>"
          }
        ]
      }
    ]
  }
]
