Skip to main content

Smart Matching Rule Editor

Payment Raw Data

The `PaymentRawData__c field on the GiftTransaction stores the original information of an incoming payment in JSON format. This ensures that all available details from the bank transfer or payment provider are preserved and can be used for Smart Matching.

Smart Matching rules can then access these fields to decide how a payment should be linked to Salesforce records. This approach allows full flexibility: every piece of raw data (like reason, raw_name, or debtor_bank_account) can be used to define Smart Matching rules for identifying or creating records in Salesforce.

To use a specific value in a Smart Matching rule, you reference it with the prefix RaiseNowNPOKit__PaymentRawData__c:: followed by the JSON key. This notation allows you to drill down into nested JSON structures and use these values as part of your matching strategies.

Examples:

  • RaiseNowNPOKit__PaymentRawData__c::reason → returns the value of the reason field, e.g. "peace".
  • RaiseNowNPOKit__PaymentRawData__c::supporter_snapshot::raw_name → returns the donor’s raw name, e.g. "Nicole Reinhardt".
  • RaiseNowNPOKit__PaymentRawData__c::supporter_snapshot::postal_code → returns the postal code, e.g. "6804".

Example of PaymentRawData__c

{
"account_uuid": "6f50059a-d605-46b4-b1ab-a97d7a2faa75",
"bank_account": "CH5309000661238499136",
"debtor_bank_account": "CH9300762011623852957",
"reason": "peace",
"supporter_snapshot": {
"city": "Bironico",
"country": "CH",
"house_number": "8",
"metadata": {},
"postal_code": "6804",
"raw_name": "Nicole Reinhardt",
"street": "Semperweg 41"
}
}

Rules Definition

Each rule consists of:

Name: Identifier for the rule.
Target Objects: Account / PaymentInstrument / OutreachSourceCode / Campaign
Context: Find / Create
Value: JSON rule definition (use Smart Matching Rule Editor)

Rules Editor

The Rule Editor provides a guided interface to define JSON rules without coding.

Find (Filter)

Start by defining the rules that will identify the right record. Compare fields from the Gift Transaction with values or fields on existing objects, and build the logic that decides when these conditions should apply together.

The goal is to make sure that if a matching record already exists, it will be found reliably.

find-filter

  • Left Side: Target object comparison field.
  • Right Side: GiftTransaction comparison field or fixed value
  • Operators: equals, not equals, starts with, ends with, contains

Find (Map)

Once a record is found, decide what happens with it. Select which fields from the matched record should automatically update the Gift Transaction, ensuring that the transaction is enriched with the correct information.

If some data is always the same, you can also set fixed values here to make the process more consistent.

find-map

  • Left Side: GiftTransaction target field.
  • Right Side: Identified target object source field or fixed value.

Create (Map)

If no existing record is found, configure how a new record should be created. Define which fields from the Gift Transaction should be copied over to the new record so it is complete and ready to use.

Add fixed values to fill in mandatory fields or to keep your data consistent across records.

create-map

  • Left Side: Target object target field.
  • Right Side: GiftTransaction source field or fixed value.