...
If a twin CA record is found, check the Cp Status (tag 54).
If the cpStatus of a twin CA record is PD/Pending or NC/Incomplete, then the twin CA record is generates a Delete CA announcement and a new ROC or CASHDIV corporate action will be created. When processed, the original corporate action will be deleted.
If the cpStatus of a twin CA record is RD/Released, then it must have a unique subpriority when using the accountingValidationFlag set to Y in order to pass the business and system edits. The twin CA record is canceled.A Delete will generate a Cancel Corporate Action announcement and Cancel Corporate Action Announcement are created. On the RD/Cancel one, it will be discovered as an issue to process if they test RD status without changing sub-priority. Processing a new ROC or CASHDIV corporate action. When processed, the original corporate action will be canceled.
The processing option should be part of the incoming file:
<referenceTransaction>
<header>
<processingOptions>CA_TRANS_TYPE_TWINS</processingOptions>
</header>
</referenceTransaction>
...