This article clarifies the additional steps needed for the UpdateDocument and DeleteDocument events to fire when implementing ISharePointProcessor to import documents from SharePoint Online to custom MediaData objects in Episerver. This article is an addendum to the information provided here.
For custom objects to be picked up by the SharePoint job that creates Add/Update/Delete messages, the object has to implement the ISharePointItem interface and fill out the interface fields from the SPListItem's data.
This allows the job to then map the data it sees in SharePoint with the data it sees in the CMS. If those fields are not present in the objects in the CMS then the job sees that the item in SharePoint doesn't exist in the CMS side, and will then create an Add message to create it.
Additionally, if the item has those fields, Episerver matches the SharePoint GUID on both objects, and the item in SharePoint has been modified since the last sync and an Update message will be created.
If Episerver sees a SharePoint item on the CMS side, but the corresponding GUID does not exist in the SharePoint side a Delete message is created.