Contact Encounter (POST)
Load details of contact encounters into the system.
- This API must be used only for person account-enabled orgs.
- Ensure that you have access to the Contact Encounter fields and the Contact Encounter Participants fields in your org.
- To create a new encounter, set the
referenceIDfield tonull. - To update an existing encounter with details of new encounter participants, pass the
referenceIDof the encounter in the payload. - A single payload can have a maximum of 5 encounters.
- A single payload can have a maximum of 50 participants per encounter.
- Encounter participants are not mandatory. If a participant is specified, the participant type is mandatory. If the participant type is set to
lead, the participant’s first name and last name are mandatory.
49.0 and later
Replace {token} with the OAuth access token.
Authorization: Bearer {token}
The Lightning Platform REST API supports OAuth 2.0 (an open protocol to allow secure API authorization). See Authorize Apps with OAuth in Salesforce Help for more details.
POST
JSON Example
Properties
| Name | Type | Description |
|---|---|---|
contactTracingEncounters.referenceId | String | The ID of an existing contact encounter record in the Salesforce system. |
contactTracingEncounters.name | String | Required. The name for the encounter. |
contactTracingEncounters.estimatedParticipantCount | Integer | The estimated number of participants in the encounter. |
contactTracingEncounters.startDateTime | DateTime | Required. The start date and time of the encounter. Must be in YYYY-MM-DDT HH:MM:SS format. For example, 2020-05-18T09:15:00. |
contactTracingEncounters.duration | Integer | Required. The duration of the encounter in minutes. |
contactTracingEncounters.description | String | The description for the encounter. |
contactTracingEncounters.participants | List | The list of participants for the contact encounter. Each element in the list represents ContactEncounterParticipant. Valid values are:
Note: Only one value is allowed. |
contactTracingEncounters.participants.participantType | String | Required. The encounter participant type. Valid values are:
Note: Only one value is allowed. |
contactTracingEncounters.participants.referenceId | String | The ID of an existing patient or employee record in the Salesforce system. If a payload has both the referenceID and the sourceSystemID, the referenceID is used for the patient or the employee lookup. |
contactTracingEncounters.participants.sourceSystemId | String | For a patient, the patient ID from an external source system at participant level. For an employee, the employee number representing the employee record in the Salesforce or the external system. If a payload has both the referenceID and the sourceSystemID, the referenceID is used for the patient or employee lookup. |
contactTracingEncounters.participants.recordTypeName | String | The name for the record type. The value for this field must be exactly the same as the label of the record type in the user interface. This field is used only when contactTracingEncounters.participants.participantType is set to lead. |
contactTracingEncounters.participants.startTime | DateTime | The time when the encounter started. |
contactTracingEncounters.participants.duration | Integer | Required. The duration of the encounter in minutes. |
contactTracingEncounters.participants.firstName | String | Required. The first name of the participant. This field is used only when contactTracingEncounters.participants.participantType is set to lead.Note: If participants.referenceId is provided, this field is optional. |
contactTracingEncounters.participants.lastName | String | Required. The last name of the encounter participant. This field is used only when contactTracingEncounters.participants.participantType is set to lead.Note: If participants.referenceId is provided, this field is optional. |
contactTracingEncounters.participants.age | Integer | The age of the encounter participant. |
contactTracingEncounters.participants.phoneNumber | String | The phone number of the encounter participant. This field is used only when contactTracingEncounters.participants.participantType is set to lead. |
contactTracingEncounters.participants.emailAddress | String | The email address of the encounter participant. This field is used only when contactTracingEncounters.participants.participantType is set to lead. |
contactTracingEncounters.participants.address | String | The address of the encounter participant. This field is used only when contactTracingEncounters.participants.participantType is set to lead. |
contactTracingEncounters.participants.address.city | String | The city of the encounter participant. This field is used only when contactTracingEncounters.participants.participantType is set to lead. |
contactTracingEncounters.participants.address.state | String | The state of the encounter participant. This field is used only when contactTracingEncounters.participants.participantType is set to lead. |
contactTracingEncounters.participants.address.country | String | The country of the encounter participant. This field is used only when contactTracingEncounters.participants.participantType is set to lead. |
contactTracingEncounters.participants.address.postalCode | String | The postal code of the encounter participant. This field is used only when contactTracingEncounters.participants.participantType is set to lead. |
contactTracingEncounters.participants.address.street | String | The street of the encounter participant. This field is used only when contactTracingEncounters.participants.participantType is set to lead. |
contactTracingEncounters.location | Object (reference to location) | Identifies the location of the encounter. |
contactTracingEncounters.location.name | String | Required. The name of the location where the encounter took place. If the encounter location name already exists in the system, the existing location record is used and the following location fields are ignored:
|
contactTracingEncounters.location.description | String | The description of the location where the encounter took place. |
contactTracingEncounters.location.latitude | String | The latitude coordinate of the location where the encounter took place. |
contactTracingEncounters.location.longitude | String | The longitude coordinate of the location where the encounter took place. |
contactTracingEncounters.location.encounteraddress.city | String | The city where the encounter took place. |
contactTracingEncounters.location.encounteraddress.state | String | The state where the encounter took place. |
contactTracingEncounters.location.encounteraddress.country | String | The country where the encounter took place. |
contactTracingEncounters.location.encounteraddress.postalCode | String | The postal code of the location where the encounter took place. |
contactTracingEncounters.location.encounteraddress.street | String | The street where the encounter took place. |
JSON Example