- CompositeCall
- CompositeSubrequest
- CompositeSubrequestQuery ⇐
CompositeSubrequest
- CompositeSubrequestSObject ⇐
CompositeSubrequest
- CompositeSubrequestSObjectCollection ⇐
CompositeSubrequest
Kind: global class
- CompositeCall
- new CompositeCall([options])
- .url
- .request
- .addQuery(query, [referenceId], [version]) ⇒
CompositeSubrequestQuery
- .addSObject(sobject, [referenceId], [version]) ⇒
CompositeSubrequestSObject
- .addSObjectCollection([referenceId], [version]) ⇒
CompositeSubrequestSObjectCollection
- .clear()
- .execute([connection]) ⇒
Promise.<CompositeCallResponse>
Main class for constructing a composite call. Tracks and enforces limits on query and request imposed by Salesforce API.
Param | Type | Description |
---|---|---|
[options] | object |
Optional. Options for creating the instance. |
[options.version] | string |
Optional. The version of Salesforce API to use. |
[options.allOrNone] | boolean |
Optional. Used in the request to Salesforce. See their documentation. |
[options.collateSubrequests] | boolean |
Optional. Used in the request to Salesforce. See their documentation. |
[options.jsforceConnection] | object |
Optional. This connection enables the |
Kind: instance property of CompositeCall
Properties
Name | Type | Description |
---|---|---|
url | string |
The versioned url of the composite request. |
Kind: instance property of CompositeCall
Properties
Name | Type | Description |
---|---|---|
request | object |
The result of constructing the composite call. |
[request.allOrNone] | boolean |
Optional. Specifies what to do when an error occurs while processing a subrequest. |
[request.collateSubrequests] | boolean |
Optional. Specifies what to do when an error occurs while processing a subrequest. |
request.CompositeSubrequest | Array.<object> |
Collection of subrequests to execute. |
compositeCall.addQuery(query, [referenceId], [version]) ⇒ CompositeSubrequestQuery
Add a query subrequest instance to the composite request.
Kind: instance method of CompositeCall
Returns: CompositeSubrequestQuery
-
- An instance of
CompositeSubrequestQuery
.
Error
Query limit met. No more queries may be added.
Error
Total request limit met. No more requests may be added.
Param | Type | Description |
---|---|---|
query | string |
A SOQL query. |
[referenceId] | string |
Optional. The reference ID of the query subrequest. |
[version] | string |
Optional. The version of the Salesforce API to use. Must be less than or equal to the version defined for the Composite Call. |
compositeCall.addSObject(sobject, [referenceId], [version]) ⇒ CompositeSubrequestSObject
Add a SObject subrequest instance to the composite request.
Kind: instance method of CompositeCall
Returns: CompositeSubrequestSObject
-
- An instance of
CompositeSubrequestSObject
.
Error
Total request limit met. No more requests may be added.
Param | Type | Description |
---|---|---|
sobject | string |
A SObject name; may be built-in or custom. |
[referenceId] | string |
Optional. The reference ID of the SObject subrequest. |
[version] | string |
Optional. The version of the Salesforce API to use. Must be less than or equal to the version defined for the Composite Call. |
compositeCall.addSObjectCollection([referenceId], [version]) ⇒ CompositeSubrequestSObjectCollection
Add a SObject Collection subrequest instance to the composite request.
Kind: instance method of CompositeCall
Returns: CompositeSubrequestSObjectCollection
-
- An instance of
CompositeSubrequestSObjectCollection
.
Error
Total request limit met. No more requests may be added.
Param | Type | Description |
---|---|---|
[referenceId] | string |
Optional. The reference ID of the SObject subrequest. |
[version] | string |
Optional. The version of the Salesforce API to use. Must be less than or equal to the version defined for the Composite Call. |
Convenience method for internally clearing previous calls, limits, etc.
Kind: instance method of CompositeCall
Convenience method for integrating with JSforce.
Kind: instance method of CompositeCall
Returns: Promise.<CompositeCallResponse>
-
- The result of executing the composite call, or undefined if no JSforce connection was given.
Param | Type | Description |
---|---|---|
[connection] | any |
Optionally pass a JSforce connection instance; used if not defined as part this class instance options. |
Kind: global class
- CompositeSubrequest
- new CompositeSubrequest([referenceId], [version])
- .subrequest
- .makeRequest(method, url, body, httpHeaders) ⇒
CompositeSubrequestBody
Base class for Composite Subrequests.
Param | Type | Description |
---|---|---|
[referenceId] | string |
The reference ID of the query subrequest. |
[version] | string |
The version of the Salesforce API to use. |
Kind: instance property of CompositeSubrequest
Properties
Name | Type | Description |
---|---|---|
subrequest | object |
The result of constructing the composite call. |
[subrequest.body] | any |
Optional. The input body for the subrequest. |
[subrequest.httpHeaders] | object |
Optional. Request headers and their values to include with the subrequest. |
subrequest.method | string |
The method to use with the requested resource. Possible values are POST, PUT, PATCH, GET, and DELETE (case-sensitive). |
subrequest.referenceId | string |
Reference ID that maps to the subrequest’s response and can be used to reference the response in later subrequests. |
subrequest.url | string |
The resource to request. |
Base method for building the request.
Kind: instance method of CompositeSubrequest
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
method | string |
The method to use with the requested resource. Possible values are POST, PUT, PATCH, GET, and DELETE (case-sensitive). |
url | string |
The resource to request. |
body | any |
Optional. The input body for the subrequest. |
httpHeaders | object |
Optional. Request headers and their values to include with the subrequest. |
CompositeSubrequestQuery ⇐ CompositeSubrequest
Kind: global class
Extends: CompositeSubrequest
- CompositeSubrequestQuery ⇐
CompositeSubrequest
- new CompositeSubrequestQuery(query, [referenceId], [version])
- .subrequest
- .get([queryId], [httpHeaders]) ⇒
CompositeSubrequestBody
- .explain([httpHeaders]) ⇒
CompositeSubrequestBody
- .explainAll([httpHeaders]) ⇒
CompositeSubrequestBody
- .nextRecords(nextRecordsUrl, [httpHeaders]) ⇒
CompositeSubrequestBody
- .nextRecordsAll(nextRecordsUrl, [httpHeaders]) ⇒
CompositeSubrequestBody
- .query([httpHeaders]) ⇒
CompositeSubrequestBody
- .queryAll([httpHeaders]) ⇒
CompositeSubrequestBody
- .makeRequest(method, url, body, httpHeaders) ⇒
CompositeSubrequestBody
Class for SOQL query and queryAll Composite Subrequests.
Param | Type | Description |
---|---|---|
query | string |
A SOQL query. |
[referenceId] | string |
The reference ID of the query subrequest. |
[version] | string |
The version of the Salesforce API to use. |
Kind: instance property of CompositeSubrequestQuery
Overrides: subrequest
Properties
Name | Type | Description |
---|---|---|
subrequest | object |
The result of constructing the composite call. |
[subrequest.body] | any |
Optional. The input body for the subrequest. |
[subrequest.httpHeaders] | object |
Optional. Request headers and their values to include with the subrequest. |
subrequest.method | string |
The method to use with the requested resource. Possible values are POST, PUT, PATCH, GET, and DELETE (case-sensitive). |
subrequest.referenceId | string |
Reference ID that maps to the subrequest’s response and can be used to reference the response in later subrequests. |
subrequest.url | string |
The resource to request. |
Base request method for query operations.
Kind: instance method of CompositeSubrequestQuery
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
[queryId] | string |
Optional. The word |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Method for creating an explain
operation.
Kind: instance method of CompositeSubrequestQuery
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Method for creating an explain
operation with queryAll.
Kind: instance method of CompositeSubrequestQuery
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Method for creating an operation to obtain next records.
Kind: instance method of CompositeSubrequestQuery
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
nextRecordsUrl | string |
The |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Method for creating an operation to obtain next records with queryAll.
Kind: instance method of CompositeSubrequestQuery
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
nextRecordsUrl | string |
The |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Method for creating a query
operation.
Kind: instance method of CompositeSubrequestQuery
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Method for creating a query
operation with queryAll.
Kind: instance method of CompositeSubrequestQuery
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Base method for building the request.
Kind: instance method of CompositeSubrequestQuery
Overrides: makeRequest
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
method | string |
The method to use with the requested resource. Possible values are POST, PUT, PATCH, GET, and DELETE (case-sensitive). |
url | string |
The resource to request. |
body | any |
Optional. The input body for the subrequest. |
httpHeaders | object |
Optional. Request headers and their values to include with the subrequest. |
CompositeSubrequestSObject ⇐ CompositeSubrequest
Kind: global class
Extends: CompositeSubrequest
- CompositeSubrequestSObject ⇐
CompositeSubrequest
- new CompositeSubrequestSObject(sobject, [referenceId], [version])
- .subrequest
- .destroy(id, [httpHeaders]) ⇒
CompositeSubrequestBody
- .describe([httpHeaders]) ⇒
CompositeSubrequestBody
- .retrieve(id, [httpHeaders]) ⇒
CompositeSubrequestBody
- .update(record, [externalId], [httpHeaders]) ⇒
CompositeSubrequestBody
- .create(record, [httpHeaders]) ⇒
CompositeSubrequestBody
- .insert(record, [httpHeaders]) ⇒
CompositeSubrequestBody
- .makeRequest(method, url, body, httpHeaders) ⇒
CompositeSubrequestBody
Class for SObject Composite Subrequests.
Param | Type | Description |
---|---|---|
sobject | string |
A valid built-in or custom SObject name. |
[referenceId] | string |
The reference ID of the query subrequest. |
[version] | string |
The version of the Salesforce API to use. |
Kind: instance property of CompositeSubrequestSObject
Overrides: subrequest
Properties
Name | Type | Description |
---|---|---|
subrequest | object |
The result of constructing the composite call. |
[subrequest.body] | any |
Optional. The input body for the subrequest. |
[subrequest.httpHeaders] | object |
Optional. Request headers and their values to include with the subrequest. |
subrequest.method | string |
The method to use with the requested resource. Possible values are POST, PUT, PATCH, GET, and DELETE (case-sensitive). |
subrequest.referenceId | string |
Reference ID that maps to the subrequest’s response and can be used to reference the response in later subrequests. |
subrequest.url | string |
The resource to request. |
Method to delete an SObject record.
Kind: instance method of CompositeSubrequestSObject
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
id | string |
The ID of the SObject resource to destory. |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Method to describe an SObject type.
Kind: instance method of CompositeSubrequestSObject
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Method to retrieve an SObject record.
Kind: instance method of CompositeSubrequestSObject
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
id | string |
The ID of the SObject resource to retrieve. |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Method to update an SObject record.
Kind: instance method of CompositeSubrequestSObject
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Default | Description |
---|---|---|---|
record | object |
An object with valid fields for the SObject record. |
|
[record.Id] | string |
The ID of the SObject resource to update. |
|
[externalId] | string |
"'Id'" |
The field name to use as the Id of the object. |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Method to create an SObject record.
Kind: instance method of CompositeSubrequestSObject
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
record | object |
An object with valid fields for the SObject record; do not include an Id field. |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Synonym of create()
.
Kind: instance method of CompositeSubrequestSObject
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
record | object |
An object with valid fields for the SObject record; do not include an Id field. |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
Base method for building the request.
Kind: instance method of CompositeSubrequestSObject
Overrides: makeRequest
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
method | string |
The method to use with the requested resource. Possible values are POST, PUT, PATCH, GET, and DELETE (case-sensitive). |
url | string |
The resource to request. |
body | any |
Optional. The input body for the subrequest. |
httpHeaders | object |
Optional. Request headers and their values to include with the subrequest. |
CompositeSubrequestSObjectCollection ⇐ CompositeSubrequest
Kind: global class
Extends: CompositeSubrequest
- CompositeSubrequestSObjectCollection ⇐
CompositeSubrequest
- new CompositeSubrequestSObjectCollection([referenceId], [version])
- .subrequest
- .delete(ids, [allOrNone], [httpHeaders]) ⇒
CompositeSubrequestBody
- .destroy(id, [allOrNone], [httpHeaders]) ⇒
CompositeSubrequestBody
- .get(sobject, ids, fields, [httpHeaders]) ⇒
CompositeSubrequestBody
- .update(record, [sobjectOrExternalIdRef], [allOrNone], [httpHeaders]) ⇒
CompositeSubrequestBody
- .retrieve(sobject, id, field, [httpHeaders]) ⇒
CompositeSubrequestBody
- .create(record, [sobject], [allOrNone], [httpHeaders]) ⇒
CompositeSubrequestBody
- .insert(record, [sobject], [allOrNone], [httpHeaders]) ⇒
CompositeSubrequestBody
- .makeRequest(method, url, body, httpHeaders) ⇒
CompositeSubrequestBody
Class for SObject Collection Composite Subrequests.
Param | Type | Description |
---|---|---|
[referenceId] | string |
The reference ID of the query subrequest. |
[version] | string |
The version of the Salesforce API to use. |
Kind: instance property of CompositeSubrequestSObjectCollection
Properties
Name | Type | Description |
---|---|---|
subrequest | object |
The result of constructing the composite call. |
[subrequest.body] | any |
Optional. The input body for the subrequest. |
[subrequest.httpHeaders] | object |
Optional. Request headers and their values to include with the subrequest. |
subrequest.method | string |
The method to use with the requested resource. Possible values are POST, PUT, PATCH, GET, and DELETE (case-sensitive). |
subrequest.referenceId | string |
Reference ID that maps to the subrequest’s response and can be used to reference the response in later subrequests. |
subrequest.url | string |
The resource to request. |
compositeSubrequestSObjectCollection.delete(ids, [allOrNone], [httpHeaders]) ⇒ CompositeSubrequestBody
Method to delete a collection of SObjects.
Kind: instance method of CompositeSubrequestSObjectCollection
Returns: CompositeSubrequestBody
-
- A subrequest object.
Error
Too many IDs specified for SObject Collection DELETE request; limit is 200, ${ids.length} were provided.
Param | Type | Default | Description |
---|---|---|---|
ids | Array.<string> |
An array of IDs to delete; limit is 200 records. |
|
[allOrNone] | boolean |
false |
Optional. Indicates whether to roll back the entire request when the deletion of any object fails (true) or to continue with the independent deletion of other objects in the request. The default is false. |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
compositeSubrequestSObjectCollection.destroy(id, [allOrNone], [httpHeaders]) ⇒ CompositeSubrequestBody
Method to delete a collection of SObjects.
Kind: instance method of CompositeSubrequestSObjectCollection
Returns: CompositeSubrequestBody
-
- A subrequest object.
Error
Too many IDs specified for SObject Collection DELETE request; limit is 200, ${ids.length} were provided.
Param | Type | Default | Description |
---|---|---|---|
id | string | Array.<string> |
A single ID or an array of IDs to delete; limit is 200 records. |
|
[allOrNone] | boolean |
false |
Optional. Indicates whether to roll back the entire request when the deletion of any object fails (true) or to continue with the independent deletion of other objects in the request. The default is false. |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
compositeSubrequestSObjectCollection.get(sobject, ids, fields, [httpHeaders]) ⇒ CompositeSubrequestBody
Method to get a collection of SObjects.
Kind: instance method of CompositeSubrequestSObjectCollection
Returns: CompositeSubrequestBody
-
- A subrequest object.
Error
Too many IDs specified for SObject Collection GET request; limit is 800, ${ids.length} were provided.
Param | Type | Description |
---|---|---|
sobject | string |
Name of the sobject(s) to get. |
ids | Array.<string> |
A single ID or an array of IDs to get; limit is 800 records. |
fields | Array.<string> |
The field names to retrieve for each sobject. |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
compositeSubrequestSObjectCollection.update(record, [sobjectOrExternalIdRef], [allOrNone], [httpHeaders]) ⇒ CompositeSubrequestBody
Method to update a collection of SObjects.
Kind: instance method of CompositeSubrequestSObjectCollection
Returns: CompositeSubrequestBody
-
- A subrequest object.
Error
Too many records specified for PATCH request; limit is 200, ${records.length} were provided.
Error
No SObject type provided for PATCH request.
Param | Type | Description |
---|---|---|
record | object | Array.<object> |
The SObject records to update, limit is 200; ensure that all records have an Id field and object |
[sobjectOrExternalIdRef] | string | ExternalIdReference |
Optional, if all records have a type; required for external ID upserts. A SObject name; used to add type information to any records missing |
[allOrNone] | boolean |
Optional. Indicates whether to roll back the entire request when the deletion of any object fails (true) or to continue with the independent deletion of other objects in the request. The default is false. |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
compositeSubrequestSObjectCollection.retrieve(sobject, id, field, [httpHeaders]) ⇒ CompositeSubrequestBody
Method to get a collection of SObjects.
Kind: instance method of CompositeSubrequestSObjectCollection
Returns: CompositeSubrequestBody
-
- A subrequest object.
Error
Too many IDs specified for SObject Collection retrieve request; limit is 2000, ${id.length} were provided.
Param | Type | Description |
---|---|---|
sobject | string |
Name of the sobject(s) to get. |
id | string | Array.<string> |
A single ID or an array of IDs to get; limit is 2000 records. |
field | string | Array.<string> |
The field name(s) to retrieve for each sobject. |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
compositeSubrequestSObjectCollection.create(record, [sobject], [allOrNone], [httpHeaders]) ⇒ CompositeSubrequestBody
Method to create a collection of SObjects.
Kind: instance method of CompositeSubrequestSObjectCollection
Returns: CompositeSubrequestBody
-
- A subrequest object.
Error
Too many records specified for create request; limit is 200, ${records.length} were provided.
Error
No SObject type provided for PATCH request.
Param | Type | Description |
---|---|---|
record | object | Array.<object> |
The SObject records to create, limit is 200; ensure that each record has object |
[sobject] | string |
Optional, if all records have a type. A SObject name; used to add type information to any records missing |
[allOrNone] | boolean |
Optional. Indicates whether to roll back the entire request when the deletion of any object fails (true) or to continue with the independent deletion of other objects in the request. The default is false. |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
compositeSubrequestSObjectCollection.insert(record, [sobject], [allOrNone], [httpHeaders]) ⇒ CompositeSubrequestBody
Synonym of create()
.
Kind: instance method of CompositeSubrequestSObjectCollection
Returns: CompositeSubrequestBody
-
- A subrequest object.
Error
Too many records specified for create request; limit is 200, ${records.length} were provided.
Error
No SObject type provided for PATCH request.
Param | Type | Description |
---|---|---|
record | object | Array.<object> |
The SObject records to create, limit is 200; ensure that each record has object |
[sobject] | string |
Optional, if all records have a type. A SObject name; used to add type information to any records missing |
[allOrNone] | boolean |
Optional. Indicates whether to roll back the entire request when the deletion of any object fails (true) or to continue with the independent deletion of other objects in the request. The default is false. |
[httpHeaders] | object |
Optional. Additional HTTP headers to include in the request. |
compositeSubrequestSObjectCollection.makeRequest(method, url, body, httpHeaders) ⇒ CompositeSubrequestBody
Base method for building the request.
Kind: instance method of CompositeSubrequestSObjectCollection
Returns: CompositeSubrequestBody
-
- A subrequest object.
Param | Type | Description |
---|---|---|
method | string |
The method to use with the requested resource. Possible values are POST, PUT, PATCH, GET, and DELETE (case-sensitive). |
url | string |
The resource to request. |
body | any |
Optional. The input body for the subrequest. |
httpHeaders | object |
Optional. Request headers and their values to include with the subrequest. |