Newer Version Available
Service Appointments Create Input
Input representation for creating a service appointment. You can
create service appointments, assign resources, and generate leads with either parentRecordId or lead but
not both.
- JSON example
-
1{ 2 "serviceAppointment": { 3 "parentRecordId": "0012w000004oZXgAAM", 4 "workTypeId": "08q2w000000XmniAAC", 5 "serviceTerritoryId": "0Hh2w000000XmoXCAS", 6 "engagementChannelTypeId": "0eFRM00000000Bv2AI", 7 "schedStartTime": "2020-02-26T15:00:00.000Z", 8 "schedEndTime": "2020-02-26T16:00:00.000Z", 9 "street": "1 Market Street", 10 "city": "San Francisco", 11 "state": "CA", 12 "postalCode": "94105", 13 "country": "USA", 14 "appointmentType": "In Person", 15 "extendedFields": [ 16 { 17 "name": "Email", 18 "value": "rachel.adams@salesforce.com" 19 }, 20 { 21 "name": "Phone", 22 "value": "111111111" 23 }, 24 { 25 "name": "Description", 26 "value": "Test Description" 27 } 28] 29 }, 30 "assignedResources": [ 31 { 32 "serviceResourceId": "0Hn2w000000gDWDCA2", 33 "isRequiredResource": true, 34 "isPrimaryResource": true, 35 "extendedFields": [] 36 }, 37 { 38 "serviceResourceId": "0Hn2w000000gCqnCAE", 39 "isRequiredResource": true, 40 "isPrimaryResource": false, 41 "extendedFields": [] 42 } 43 ] 44} - JSON example for unauthenticated user
-
1{ 2 "serviceAppointment": { 3 "workTypeId": "08q2w000000XmniAAC", 4 "serviceTerritoryId": "0Hh2w000000XmoXCAS", 5 "engagementChannelTypeId": "0eFRM00000000Bv2AI", 6 "schedStartTime": "2020-02-26T15:00:00.000Z", 7 "schedEndTime": "2020-02-26T16:00:00.000Z", 8 "street": "1 Market Street", 9 "city": "San Francisco", 10 "state": "CA", 11 "postalCode": "94105", 12 "country": "USA", 13 "appointmentType": "In Person", 14 "extendedFields": [] 15 }, 16 "assignedResources": [ 17 { 18 "serviceResourceId": "0Hn2w000000gDWDCA2", 19 "isRequiredResource": true, 20 "isPrimaryResource": true, 21 "extendedFields": [] 22 } 23 ], 24 "lead": { 25 "firstName": "Rachel", 26 "lastName": "Adams", 27 "phone": "012-345-6789", 28 "email": "rachel.adams@salesforce.com", 29 "company": "Salesforce", 30 "extendedFields": [] 31 } 32} - Properties
-
Name Type Description Required or Optional Available Version assignedResources Assigned Resource Input[] Service resource who is assigned to a service appointment. Optional 48.0 lead Lead Input[] Prospect or lead. Required if serviceAppointment isn’t provided 48.0 schedulingPolicyId String ID of the AppointmentSchedulingPolicy object. If no scheduling policy is passed in the request body, the default configurations are used. The only scheduling policy configuration that is used in determining time slots is the enforcement of account visiting hours. Optional 48.0 serviceAppointment Service Appointment Input[] Appointment to complete a service work for a customer. Required if lead isn’t provided 48.0