Create Quote for Home Visits Action

Create a quote for patient home visits based on the specified visit details.

This action is available in API version 63.0 and later.

Special Access Rules 

The Create Quote for Home Visits action is available when Home Health is enabled. This action is available to users that have access to Home Health Quote perm set.

Supported REST HTTP Methods 

URI: /services/data/vXX.X/actions/standard/createQuoteForHomeVisits

Where XX.X is the latest API version.

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer TOKEN

Where TOKEN is your OAuth access token.

Inputs 

InputTypeDescription
quoteNameStringRequired
The name of the quote to be created for a patient’s home visits.
priceBookIdStringRequired
The ID of the price book to use to create the quote for a patient’s home visits.
accountIdStringThe person account ID of the patient for whom the quote is to be created.
opportunityIdStringThe ID of the opportunity to use to create the quote for a patient’s home visits.
startDateTimeDateTimeThe date and time when the quote takes effect.
endDateTimeDateTimeThe date and time after which the quote is no longer valid.
workTypeIdsList<String>The collection of IDs of work types that the quote is created for.
visitCountIntegerThe number of home visits that the quote is created for.
isTravelInventoryIncludedBooleanIndicates whether the travel and inventory associated with the home visit are included in the quote.
resourceTravelDistanceDoubleThe distance that a care resource has to travel to provide home healthcare to the patient.
pricingPreferenceStringThe attribute-based pricing preference that’s used as an input in the PlaceQuote API for creating the quote.
Possible values are:
  • System
  • Force
  • Skip.

The default value is System.
currencyCodeStringThe currency code to be used in the quote.
productPricingAttributeDetailsList<Object>A collection of Apex heathcloudext_productPricingAttributeDetails records that contain the pricing attribute details for the products included in the quote.

Outputs 

OutputTypeDescription
quoteIdStringThe ID of the quote record that was created for the patient’s home visits.
errorMessageStringThe description of the error encountered while creating the quote.
errorCodeStringThe code of the error encountered while creating the quote.

Example 

POST

This sample request is for the Create Quote for Home Visits action.

1{
2  "inputs": [
3    {
4      "quoteName": "Quote For Charles",
5      "priceBookId": "01sxx0000005qWXAAY",
6      "accountId": "001xx000003GaC7AAK",
7      "startDateTime": "2024-08-18T00:00:00.000Z",
8      "endDateTime": "2024-08-25T00:00:00.000Z",
9      "workTypeIds": [
10        "08qxx0000004C92AAE"
11      ],
12      "visitCount": 2,
13      "isTravelInventoryIncluded": false,
14      "productPricingAttributeDetails": [
15        {
16          "productId": "08qxx0000004C92AAE",
17          "unitCount": 1,
18          "pricingAttributeList": [
19            {
20              "attributeDefinitionId": "dayBasedAttributeDefinitionId",
21              "attributeValue": "Sunday"
22            }
23          ]
24        }
25      ]
26    }
27  ]
28}

This sample response is for the Create Quote for Home Visits action.

1{
2  "actionName": "createQuoteForHomeVisits",
3  "isSuccess": true,
4  "outputValues": {
5    "quoteId": "0Q0XXXXXXXXXXXXXXX",
6    "errorMessage": null,
7    "errorCode": null
8  }
9}