When payments processed via the new Hub platform fail, RaiseNow will create Salesforce platform events in addition to modifying records within Salesforce. These events can be leveraged to implement custom dunning logic in Salesforce, using Salesforce Flow or Apex code within the Salesforce platform.
For example:
- When a payment for a recurring donation fails, the below RaiseNow__Payment_Failed__e event is triggered.
- Using the provided RaiseNow__Failed_Payment_Identifier__c in the event, you can identify the RaiseNow RaiseNow__Transaction__c object in Salesforce.
- Via the RaiseNow__Opportunity__c relation on that object you can identify the relevant opportunity and implement business logic to pause/lapse the corresponding recurring donation or initiate recharges.
Failed Payments
Event: RaiseNow__Payment_Failed__e
{
"fields": [
{
"name": "CreatedDate",
"type": "string",
"doc": "CreatedDate:DateTime"
},
{
"name": "CreatedById",
"type": "string",
"doc": "CreatedBy:EntityId"
},
{
"name": "RaiseNow__Amount__c",
"type": [
"null",
"double"
],
"doc": "Data:Double",
"default": null
},
{
"name": "RaiseNow__Currency__c",
"type": [
"null",
"string"
],
"doc": "Data:Text",
"default": null
},
{
"name": "RaiseNow__Failed_Payment_Identifier__c",
"type": [
"null",
"string"
],
"doc": "Data:Text",
"default": null
}
]
}
Reversed Payments & Chargebacks
Reversals/Chargebacks
{
"fields": [
{
"name": "CreatedDate",
"type": "string",
"doc": "CreatedDate:DateTime"
},
{
"name": "CreatedById",
"type": "string",
"doc": "CreatedBy:EntityId"
},
{
"name": "RaiseNow__Provider_Reversal_Identifier__c",
"type": [
"null",
"string"
],
"doc": "Data:Text",
"default": null
},
{
"name": "RaiseNow__Reversal_Identifier__c",
"type": [
"null",
"string"
],
"doc": "Data:Text",
"default": null
},
{
"name": "RaiseNow__Reversal_Reason__c",
"type": [
"null",
"string"
],
"doc": "Data:StringPlusClob",
"default": null
},
{
"name": "RaiseNow__Reversed_Payment_Identifier__c",
"type": [
"null",
"string"
],
"doc": "Data:Text",
"default": null
}
]
}
}
Comments
0 comments
Please sign in to leave a comment.