Development Guides

Account Cancelation and Restore

Purpose: When a client closes an account with their advisor, it is a best practice to cancel that account within Orion using the account cancelation functionality. This action will zero out the account with transactions that bring each asset to zero, then inactivate the account and its assets, mark the account with a clear cancelation date, and finally add the account to Orion’s exclusion table to prevent new activity data from being created by custodial files.

Simple Use Case: A user wants to cancel an account as of the end of the previous month, bring the account to zero, inactivate the account, but leave the rest of the household live and active.

Scope and Outputs: The cancelation may be Full (the entire household) or Partial (specific accounts from the household). During the API call you can choose the accounts to cancel, the cancel date, the reason for the cancelation (the journal subject), whether or not to zero the assets, whether or not to add the accounts to the download exclusion table, and where or not to create a final bill.

Process Overview:

  1. Cancel the account or entire household.
  2. Restore the accounts.

Process Steps:

  1. Cancel the account by including the below body with completed details to the cancel account endpoint. You may include multiple account IDs within the same client.

PUT /portfolio/clients/action/cancel

Example Request Body:

{"cancelType": "Partial",
"asOfDate": "2021-08-21T05:00:00.000Z",
"journalSubject": "Account Liquidation",
"journalNote": "",
"zeroAssets": true,
"excludeDownloads": true,
"createFinalBill": true,
"clientId": "",
"accountIds": [969]}

Example Response:

{"result":"Account has been deactivated Id: 969 <br />
Cancellation transaction created Id: 1282000 <br />
Cancellation transaction created Id: 1282001 <br />
Cancellation transaction created Id: 1282002 <br />
Cancellation transaction created Id: 1282003 <br />
Cancellation transaction created Id: 1282004 <br />
Cancellation transaction created Id: 1282005 <br />
Cancellation transaction created Id: 1282006 <br />
Cancellation transaction created Id: 1282007 <br />
Cancellation transaction created Id: 1282008 <br />
Cancellation transaction created Id: 1282009 <br />Exclusion added Id: ALTS-501 <br />
Deactivate registration Id: 695 <br />"}

If you want to cancel the entire household, change the cancel type to “Full” and include the client ID instead of account IDs.

Example Request Body:

{"cancelType":"Full",
"asOfDate":"2021-08-23T05:00:00.000Z",
"journalSubject":"Account Liquidation",
"journalNote":"",
"zeroAssets":true,
"excludeDownloads":true,
"createFinalBill":true,
"clientId":107,
"accountIds":null}
  1. To restore an account back to its original state, pass the account ID to the restore endpoint. This will reactivate the account (and client/registration as needed), remove the zeroing transactions, and remove the account from the exclusion table.

PUT Portfolio/Accounts/Action/UndoCancel/{accountID}?restore=true

{"result":"Registration marked active.<br />\r\n
Remove Account Number from exclusion table.<br />\r\n
Remove cancellation transaction. ID: 1282000<br />
Remove cancellation transaction. ID: 1282001<br />
Remove cancellation transaction. ID: 1282002<br />
Remove cancellation transaction. ID: 1282003<br />
Remove cancellation transaction. ID: 1282004<br />
Remove cancellation transaction. ID: 1282005<br />
Remove cancellation transaction. ID: 1282006<br />
Remove cancellation transaction. ID: 1282007<br />
Remove cancellation transaction. ID: 1282008<br />
Remove cancellation transaction. ID: 1282009<br /> Deleting Adjustment and Payable Items.Account marked active.<br />\r\n
All assets for this account marked active.<br />\r\n\r\n
Account is Restored to the files supplied from the Custodian."}

Process Tips or Controls:

  1. If you cancel an entire household and you want to undo the action, you must restore each account individually.