Initiate Transfer Action
Transfer an asset or multiple assets from one account to another.
Keep these considerations in mind when you use this invocable action.
- This action generates 2 quotes or 2 orders.
- One transaction is considered the source, which is used to calculate the reduction amount of the transfer. The other transaction is the target, which is used to calculate the new amount on the target account.
- The quantity on the source is negative, which reduces the existing asset’s quantity. The quantity on the target is positive, which creates a new asset on the target account.
- You can change the quantity on the source or the target, but the quantities must be equal and opposite. For example, the source quote line can have a quantity value as
-5, and the target quote line can have a quantity value5. If you change the source value to-10, you must update the target value to10. You must update quotes or orders manually. - The transfer is complete after the orders are assetized.
This action is available in API version 65.0 and later.
URI: /services/data/v68.0/actions/standard/initiateTransfer
Formats: JSON, XML
HTTP Methods: POST
Authentication: Authorization: Bearer TOKEN
Where TOKEN is a placeholder for your OAuth access token.
| Input | Type | Description |
|---|---|---|
outputRecordType | string | Required. Specifies either a quote or order record type that’s being transferred. |
shouldSkipPricing | boolean | Indicates whether to skip pricing at the time of asset transfer ( true ) or not ( false ). |
targetAccountId | string | Required. The ID of the target account where the asset is transferred. |
targetContractId | string | The ID of the target contract that’s associated with the asset that’s being transferred. |
transferDate | datetime | Required. The date of the asset transfer. |
transferRecords | Apex-defined | Required. A collection of Apex connectapi__TransferRecordInputRepresentation records that contain details about the assets to be transferred. See ConnectApi.TransferRecordInputRepresentation. |
| Output | Type | Description |
|---|---|---|
assetTransferSourceId | id | The ID of the quote or order that’s related to the source account used to start the transfer. |
assetTransferTargetId | id | The ID of the quote or order that’s related to the target account used to start the transfer. |
requestIdentifier | id | The request ID can be used to track the async request. |
POST
Here’s a sample input to call this invocable action.
Here’s a sample input to call this invocable action from Apex code.
Here’s a sample response when you call this action.