Health Cloud Developer Guide
Contact Encounter (POST)
Health Cloud FHIR APIs
MuleSoft Direct Integrations
API End-of-Life Policy
Previous Versions
Load details of contact encounters into the system.
referenceID field to null.referenceID of the encounter in the payload.lead, the participant’s first name and last name are mandatory.1/services/data/vXX.X/contact-tracing49.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.
Note
POST
JSON Example
1{
2 contactTracingEncounters: [
3 {
4 "referenceId":"0haRM000000000BYAQ",
5 "name":"SF All Hands Q2"
6 "estimatedParticipantCount": 10,
7 "startDateTime" : "2020-06-20T00:00:00Z",
8 "duration": 12,
9 "description" : "held in SF tower",
10 "participants" : [
11 {
12 "participantType": "lead",
13 "recordTypeName": "triage",
14 "startTime": "2020-06-20T00:00:00Z",
15 "duration": 12,
16 "firstName" : "Leo",
17 "lastName" : "Machado",
18 "age" : 24,
19 "phoneNumber" : "24323322",
20 "emailAddress" : "lee.lo@mail.com",
21 "address":{
22 "city":"Seattle",
23 "state":"Washington",
24 "country":"US",
25 "postalCode":"11404",
26 "street":"Richmond St"
27 }
28 },
29 {
30 "participantType": "patient"
31 "referenceId":"001RM000004iUi8YAE",
32 "sourceSystemId":"211453",
33 "startTime": "2020-06-20T00:00:00Z",
34 "duration": 10,
35 "age" : 34
36 }
37 ],
38 "location" : {
39 "name":"Seattle County",
40 "description":"Gala event",
41 "latitude" : "47.6" ,
42 "longitude": "122.3",
43 "encounterAddress":{
44 "city":"Seattle",
45 "state":"Washington",
46 "country":"US",
47 "postalCode":"11404",
48 "street":"Dutch St"
49 }
50 }
51
52 }
53 ]
54
55}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
1{
2 "encounters" : [ {
3 "created" : false,
4 "id" : "0haxx00000000rFAAQ",
5 "location" : null,
6 "participants" : [ {
7 "created" : true,
8 "employee" : null,
9 "errors" : null,
10 "id" : "0hbxx00000000G9AAI",
11 "lead" : {
12 "created" : true,
13 "id" : "00Qxx000002TST8EAO"
14 },
15 "patient" : null
16 }, {
17 "created" : true,
18 "employee" : null,
19 "errors" : null,
20 "id" : "0hbxx00000000GAAAY",
21 "lead" : {
22 "created" : true,
23 "id" : "00Qxx000002TST9EAO"
24 },
25 "patient" : null
26 }, {
27 "created" : true,
28 "employee" : null,
29 "errors" : null,
30 "id" : "0hbxx00000000GBAAY",
31 "lead" : null,
32 "patient" : {
33 "created" : false,
34 "id" : "001xx000003GZ6tAAG"
35 }
36 } ]
37 } ],
38 "errors" : null,
39 "status" : null,
40 "success" : true
41}