code snippet languages

none

//

markup

//

html

//

xml

//

svg

//

mathml

//

ssml

//

atom

//

rss

//

javascript

//

js

//

clike

//

css

//

scss

//

twig

//

java

//

json

//

rest

//

bash

//

shell

//

csv

//

docker

//

dockerfile

//

http

//

jsx

//

tsx

//

md

//

markdown

//

yml

//

yaml

//

code snippet lang none

Lang: none

HTML

<p>Hello World!</p>

Twig

<p>Hello World!</p>

Lang: none, custom label

HTML

<p>Hello World!</p>

Twig

<p>Hello World!</p>

Lang: none, custom label, hide label

HTML

<p>Hello World!</p>

Twig

<p>Hello World!</p>

code snippet escape html

HTML escape

HTML (manual escape)

The <code>&lt;code&gt;</code> element defines inline code.

HTML (Twig |e escape)

The <code>&lt;code&gt;</code> element defines inline code.

Twig (Default template)

The <code>&lt;code&gt;</code> element defines inline code.

code snippet table

{
  "FullName": "OpportunityEvents_chn_OpportunityChangeEvent",
  "Metadata": {
    "enrichedFields": [
      {"name": "OwnerId"},
      {"name": "Name"},
      {"name": "CloseDate"},
      {"name": "Probability"}, 
      {"name": "LastModifiedDate"},
      {"name": "LastModifiedById"},
      {"name": "IsClosed"},
      {"name": "AccountId"},
      {"name": "CreatedById"},
      {"name": "CreatedDate"}
    ],
    "eventChannel": "OpportunityEvents__chn",
    "selectedEntity": "OpportunityChangeEvent"
  }
} 
Element Value
Method POST
Request URL Instance URL received in the access token response with a /services/data/v51.0/tooling/sobjects/PlatformEventChannelMember part, for example https://sales-sample-URL.my.salesforce.com/services/data/v51.0/tooling/sobjects/PlatformEventChannelMember
Sample request body of JSON type with enrichment fields added in an OpportunityEvents__chn channel member for an Opportunity entity
{
  "FullName": "OpportunityEvents_chn_OpportunityChangeEvent",
  "Metadata": {
    "enrichedFields": [
      {"name": "OwnerId"},
      {"name": "Name"},
      {"name": "CloseDate"},
      {"name": "Probability"}, 
      {"name": "LastModifiedDate"},
      {"name": "LastModifiedById"},
      {"name": "IsClosed"},
      {"name": "AccountId"},
      {"name": "CreatedById"},
      {"name": "CreatedDate"}
    ],
    "eventChannel": "OpportunityEvents__chn",
    "selectedEntity": "OpportunityChangeEvent"
  }
} 
Sample request body of JSON type with enrichment fields added in an OpportunityEvents__chn channel member for an Opportunity entity
{
  "FullName": "OpportunityEvents_chn_OpportunityChangeEvent",
  "Metadata": {
    "enrichedFields": [
      {"name": "OwnerId"},
      {"name": "Name"},
      {"name": "CloseDate"},
      {"name": "Probability"}, 
      {"name": "LastModifiedDate"},
      {"name": "LastModifiedById"},
      {"name": "IsClosed"},
      {"name": "AccountId"},
      {"name": "CreatedById"},
      {"name": "CreatedDate"}
    ],
    "eventChannel": "OpportunityEvents__chn",
    "selectedEntity": "OpportunityChangeEvent"
  }
} 
Sample request body of JSON type with enrichment fields added in a WorkOrderEvents__chn channel member for a Work Order entity
{
  "FullName": "WorkOrderEvents_chn_ WorkOrderChangeEvent",
  "Metadata": {
    "enrichedFields": [
      {"name": "OwnerId"},
      {"name": "Subject"},
      {"name": "WorkOrderNumber"},
      {"name": "Priority"}, 
      {"name": "LastModifiedDate"},
      {"name": "LastModifiedById"},
      {"name": "IsClosed"},
      {"name": "AccountId"},
      {"name": "CreatedById"},
      {"name": "CreatedDate"}
    ],
    "eventChannel": "WorkOrderEvents__chn",
    "selectedEntity": "WorkOrderChangeEvent"
  }
} 
Element Value
Method POST
Request URL Instance URL received in the access token response with a /services/data/v51.0/tooling/sobjects/PlatformEventChannelMember part, for example https://sales-sample-URL.my.salesforce.com/services/data/v51.0/tooling/sobjects/PlatformEventChannelMember
Sample request body of JSON type with enrichment fields added in an OpportunityEvents__chn channel member for an Opportunity entity
{
  "FullName": "OpportunityEvents_chn_OpportunityChangeEvent",
  "Metadata": {
    "enrichedFields": [
      {"name": "OwnerId"},
      {"name": "Name"},
      {"name": "CloseDate"},
      {"name": "Probability"}, 
      {"name": "LastModifiedDate"},
      {"name": "LastModifiedById"},
      {"name": "IsClosed"},
      {"name": "AccountId"},
      {"name": "CreatedById"},
      {"name": "CreatedDate"}
    ],
    "eventChannel": "OpportunityEvents__chn",
    "selectedEntity": "OpportunityChangeEvent"
  }
} 
Sample request body of JSON type with enrichment fields added in an OpportunityEvents__chn channel member for an Opportunity entity
{
  "FullName": "OpportunityEvents_chn_OpportunityChangeEvent",
  "Metadata": {
    "enrichedFields": [
      {"name": "OwnerId"},
      {"name": "Name"},
      {"name": "CloseDate"},
      {"name": "Probability"}, 
      {"name": "LastModifiedDate"},
      {"name": "LastModifiedById"},
      {"name": "IsClosed"},
      {"name": "AccountId"},
      {"name": "CreatedById"},
      {"name": "CreatedDate"}
    ],
    "eventChannel": "OpportunityEvents__chn",
    "selectedEntity": "OpportunityChangeEvent"
  }
} 
Sample request body of JSON type with enrichment fields added in a WorkOrderEvents__chn channel member for a Work Order entity
{
  "FullName": "WorkOrderEvents_chn_ WorkOrderChangeEvent",
  "Metadata": {
    "enrichedFields": [
      {"name": "OwnerId"},
      {"name": "Subject"},
      {"name": "WorkOrderNumber"},
      {"name": "Priority"}, 
      {"name": "LastModifiedDate"},
      {"name": "LastModifiedById"},
      {"name": "IsClosed"},
      {"name": "AccountId"},
      {"name": "CreatedById"},
      {"name": "CreatedDate"}
    ],
    "eventChannel": "WorkOrderEvents__chn",
    "selectedEntity": "WorkOrderChangeEvent"
  }
} 
This is a table caption