Creates a service report for a service appointment, work order, or work order line
item.
This object is available in API version 39.0 and later.
Supported REST HTTP Methods
- URI
- /services/data/vXX.X/actions/standard/createServiceReport
- Formats
- JSON
- HTTP Methods
- POST
- Authentication
- Authorization: Bearer token
Inputs
| entityId |
- Type
- reference
- Description
- Required. The ID of the service appointment, work order, or work order line item that
the service report is created for.
|
| signatures |
- Type
- string
- Description
- Optional. A list of JSON definitions for a digital signature.
- data—(Required) The base64 code for an image.
- contentType—(Required)The file type of the signature.
- signatureType—(Required) The role of the person signing; for example,
“Customer.” Salesforce admin defines Signature Type picklist values ahead of time. Each
signature block must use a different signature type, and the signature types you define
in your call must match the service report template’s signature types.
- name—The signature block title. This value appears on the generated service
report.
- place—The place of signing. This value appears on the generated service
report.
- signedBy—The name of the person signing. This value appears on the generated
service report.
- signedDate—The date of signing. This value appears on the generated service
report.
|
| templateId |
- Type
- reference
- Description
- Required. The ID of the standard or custom service report template that is used to
create the service report.
|
Usage
- Sample Input
-
The following code sample creates a service report with two signatures by making an Apex
callout to the createServiceReport action REST API resource.