Visits (POST)

Create visits for sales representatives. For example, for a medical device visit, a sales representative visits the surgeon or a hospital location.

Resource 

1/connect/general-visit/visits

Resource Example 

Replace {yourInstance.salesforce.com} with the My Domain host of your Salesforce org, and replace {XX.X} with the API version.

1https://{yourInstance.salesforce.com}/services/data/v{XX.X}/connect/general-visit/visits

Available Version 

55.0

Requires Chatter 

No

HTTP Methods 

POST

Request Body for POST 

Root XML tag 

<CreateVisitInput>

JSON Example 

1{
2"visitType": "08qSG00000017VhYAI",
3"place": "131SG0000006yazYAA",
4"plannedVisitStartTime": "2023-12-28T09:07:21.205-07:00",
5"status": "Planned",
6"account": "001SG00000Cq7T8YAJ",
7"visitor": [
8{
9"user": "005SG000003Z0p9YAC",
10"primary": true
11}
12],
13"productRequired": [
14{
15"productId": "01tSG000000KOxRYAW",
16"quantity": 1
17}
18]
19}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
accountStringID of the account that is associated with a visit.Required55.0
actionPlanTemplateAction Plan Template InputRepresents the details of an action plan template. Action plan templates define the sets of tasks that your sales reps perform during visits.Optional55.0
contextStringPurpose of the visit, such as claim or work type.Optional55.0
placeStringIndicates the place that sales representatives visit.Required55.0
plannedVisitEndTimeStringDate and time when the visit is expected to end.Optional55.0
plannedVisitStartTimeStringDate and time when the visit is expected to start.Required55.0
productRequiredProduct Required Attributes Input[]Represents the products required for the visit.Required55.0
statusStringIndicates the status of the visit.
Valid values are:
  • Abondoned
  • Completed
  • InProgress
  • Planned
Optional55.0
statusRemarksStringAdditional remarks or comments provided by the sales representatives.Optional55.0
visitPriorityStringPriority of the visit.
Valid values are:
  • High
  • Low
  • Medium
Optional55.0
visitTypeStringID of the visit type. This field is a lookup to the Worktype object.Optional55.0
visitedPartyVisited Party Attributes Input[]Represents the contacts from the customer organization who are being visited.Optional55.0
visitorVisitor Attributes Input[]Represents the service resources from the organization who are executing the visit.Required55.0

Response Body for POST 

Create Visit Output