We use the Bulk API in purpose to delete too many messages from the message board without storing them in the Recycle Bin.
How to delete Message with Bulk API
- Go to click Setup => Permission Sets click button New to create permission sets, please see an example on screenshot below:
The result after click button Save we get new a permission set
Click on System Permissions link and then click button Edit to checkbox Bulk API Hard Delete to query messages for deletion then click button Save.
Go to click Setup => User select on Username
Click button Edit Assignments to assign permission sets
Select permission sets then add into Enabled Permission Sets and then click button Save to finish.
Create Remote Site Go to click Setup => Security Controls => Remote Site Settings click on the button New Remote Site then enters the name for remote site and input URL for the remote site. Note URL of Remote Site take from the web address of this salesforce
The result after click button Save
Note: User must to create one more Remote Site for this Organization by
URL = https://login.salesforce.com to protect when an Access Token is required to access a protected resource, a client may use a Refresh Token to get a new Access Token issued by the Authentication Server.
Go to Integration Admin tab click Reports & Links tab then click on Enable Bulk Delete Rest link, Checkbox to enable bulk delete means that all messages will delete by bulk API mode.
Go to Integration Detail and click on button Details then check the flag Delete Messages all messages will be deleted after DoMaintenance scheduler job finished.
- If check the flag Delete Messages = “True” all green messages will be deleted immediately after records processing.
- If check the flag Delete Messages = “True” and Enable Bulk Delete Rest= “False” means that the DoMaintenance scheduler will delete existing messages with Batch mode.
- If check the flag Delete Messages = “True” and Enable Bulk Delete Rest= “True” means that the DoMaintenance scheduler will delete existing messages with Bulk mode.
Set time DoMaintenance scheduler processing, go to Integration overview click on Scheduler tab and then click on Start link for DoMaintenance scheduler
After DoMaintenance scheduler job finishes the all messages will be deleted from Message Board for this integration.
User can see this processing the status Completed or Failed in the Apex Jobs go to click setup => section Monitor => Jobs => Apex Jobs
Go to the message board and search again for messages to make sure that all messages in this integration have been deleted or not.