You can now configure your touchpoint to send relevant data that may not be included in the standard RaiseNow field set to Dynamics. The data will be added as a note on the created commitment. The implementation differs slightly for between the new Hub platform and the legacy RaiseNow Manager platform.
Hub payments and subscriptions
The transaction or subscription record created in RaiseNow must contain an element attachment.
raisenow_parameters": { "fundraising_automation": { "attachment": "{\"basket\":{\"items\":{\"1\":{\"name\":\"Inoculation\",\"quantity\":\"1\",\"price\":\"20\"},\"2\":{\"name\":\"Pig\",\"quantity\":\"3\",\"price\":\"5\"}},\"total\":35}}" }
}
Note that the the value for attachment must be a string. Else the RaiseNow platform will not accept the record and the donation will fail. The string will be resolved to .json format when attached to the note in Dynamics.
Presentation in Dynamics:
RaiseNow Manager
The RaiseNow Manager platform does not support object notations. Key value pairs must be submitted with the transaction.
stored_crm_attachment_[FieldName]: '[FieldValueAsString]'
For example:
stored_crm_attachment_field1: 'my custom string',
stored_crm_attachment_field2: 1234,
Presentation in Dynamics:
Example for Tamaro configuration
This is an example configuration to set these fields on widget initialization. Please refer to our documentation on the Tamaro widget for more general advice on customization options.
function setCustomFields(event) {
const api = event.data.api
const form = api.paymentForm
const data = form.data
data.stored_crm_attachment_field1= 'my custom string'
data.stored_crm_attachment_field2= 1234
data.raisenow_parameters.fundraising_automation.attachment= '"basket":{"items":{"1":{"name":"Inoculation","quantity":"1","price":"20"},"2":{"name":"Pig","quantity":"3","price":"5"}},"total":35}'
}
window.rnw.tamaro.events["beforePaymentValidateAndSend"].subscribe(setCustomFields)
Comments
0 comments
Please sign in to leave a comment.