How is the Opt_Expiration_Date_vod__c field populated on the Multichannel_Consent_vod__c records?
The Opt_Expiration_Date_vod field is used to identify a current/live Opt record. If the Opt Expiration date is greater than the current date, then the record is considered live. This applies to both Opt-In and Opt-Out records.
Opt-In records (Opt_Type_vod__c = Opt_In_vod):
If the Consent_Expires_In_vod__c or Consent_Custom_Duration_vod__c field is populated on the corresponding Consent Type record, the expiration of the Multichannel Consent record is calculated based on the timestamp in the Capture_Datetime_vod__c field. The Opt_Expiration_Date_vod__c field is stamped with the expiration date.
Opt-Out records(Opt_Type_vod__c = Opt_Out_vod):
When the Opt-Out record is created, a trigger sets the expiration date to the previous day. The logic is to prevent conflicts in those cases when another Opt-In record is created on the same day as the Opt-Out record. In those cases, the capture date and the expiration date would be the same, so to prevent this, the previous day is stamped as the expiration date.
CRM Help Documentation: Consent Capture Overview