Skip to content

Added documentation about Account Lookup Analyser - #545

Open
CS-DaS wants to merge 12 commits into
Project60:masterfrom
CS-DaS:documentation-account-lookup
Open

Added documentation about Account Lookup Analyser#545
CS-DaS wants to merge 12 commits into
Project60:masterfrom
CS-DaS:documentation-account-lookup

Conversation

@CS-DaS

@CS-DaS CS-DaS commented Jul 14, 2026

Copy link
Copy Markdown

No description provided.

@dontub dontub left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CS-DaS. Having a documentation for that analyser would be great. Can you have a look at my comments?

Comment thread docs/configuration/plugins/analyser-matcher.md Outdated
Comment thread docs/configuration/plugins/analyser-matcher.md Outdated
Comment thread docs/configuration/plugins/analyser-matcher.md Outdated
`_party_ba_id`. This magic field gets evaluated by several matcher plugins,
including CreateContribution and ExistingContribution.

Additionaly, this plugin can look up the CiviCRM BankAccount for the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Additionaly, this plugin can look up the CiviCRM BankAccount for the
Additionaly, this plugin can look up the CiviCRM `BankAccount` for the

Comment thread docs/configuration/plugins/analyser-matcher.md
account reference from the currently analysed transaction, it looks up if this
account reference already exists as a CiviCRM BankAccountReference. It then
stores the internal CiviCRM-ID for the BankAccount in a magic field
`_party_ba_id`. This magic field gets evaluated by several matcher plugins,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it's party_ba_id, isn't it?

including CreateContribution and ExistingContribution.

Additionaly, this plugin can look up the CiviCRM BankAccount for the
organization's account reference and store it's id in a magic field `_ba_id`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it's ba_id, isn't it?

@dontub dontub added documentation status:needs work There is code, but it needs additional work before it should be reviewed labels Jul 23, 2026
@dontub dontub self-assigned this Jul 23, 2026
@CS-DaS

CS-DaS commented Jul 23, 2026

Copy link
Copy Markdown
Author

Thanks for your feedbacks! I will go through it and add some changes.

@CS-DaS

CS-DaS commented Jul 23, 2026

Copy link
Copy Markdown
Author

I did all the corrections. Just for the evaluation of _IBAN I don't know what the plugin does, but at least the field is mentioned now in the documentation.

@CS-DaS
CS-DaS requested a review from dontub July 23, 2026 16:01
@dontub

dontub commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

I did all the corrections. Just for the evaluation of _IBAN I don't know what the plugin does

Actually the same as with _party_IBAN, but the found BankAccount ID is stored in ba_id instead of party_ba_id.

In pseudo code it should be more or less like this:

For every bank account reference type:
  Look for a bank account reference of type <bank account reference type> with the value in field 
    $lookup_donor_account_prefix<bank account reference type>
  If a BankAccount ID is found: Put it in party_ba_id. Stop.
For every bank account reference type:
  Look for a bank account reference of type <bank account reference type> with the value in field
    $lookup_org_account_prefix<bank account reference type>
  If a BankAccount ID is found: Put it in ba_id. Stop.

@CS-DaS

CS-DaS commented Jul 24, 2026

Copy link
Copy Markdown
Author

The part that I don't understand is, what happens with ba_id? Is is later evaluated somehow or has some other impact?

@dontub

dontub commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

The part that I don't understand is, what happens with ba_id? Is is later evaluated somehow or has some other impact?

As with party_ba_id it's stored in the BankTransaction entity and could be used by other analysers or matchers.

@CS-DaS

CS-DaS commented Jul 24, 2026

Copy link
Copy Markdown
Author

ah, ok. I added that.

@dontub dontub left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've noted few more things that came to my mind. Please have a look and see what you think about it.

example. The second part of the field name (`IBAN` and `NBAN_PP` in this
example) can be any CiviBanking bank account reference type option value.
The first part of the field name (`_party_` in this example) can be configured
in this plugin. It also evaluates the field `_IBAN` and stores the id for the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure if it's clear that the IBAN in _IBAN can by any bank account reference type option value as above and that _ is a configurable prefix like _party_... Would it make sense to explain it in a way that makes clear that for the configurable prefixes _ and _party the same kind of lookup is performed?


In a typical setup, your importer plugin writes the account reference to the
field `_party_IBAN` or `_party_NBAN_PP`. The Account Lookup Analyser
evaluates the field and writes to a magic field `party_ba_id`, which later is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] which later is evaluated [...]

Technically correct would be "can be" instead of "is".

example) can be any CiviBanking bank account reference type option value.
The first part of the field name (`_party_` in this example) can be configured
in this plugin. It also evaluates the field `_IBAN` and stores the id for the
`BankAccount` in a magic field `ba_id`. Later, `ba_id` gets stored in the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I'm wondering what "magic" means here (as well as below for party_ba_id). Technically it's just a field of the BankTransaction entity that can be accessed by analysers and matchers like other BankTransaction fields.

"plugin_type_name": "match",
"plugin_class_name": "analyser_account",
"name": "Account Lookup",
"description": "Provides potential contacts, based on account lookups",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the description really accurate? Actually the matcher is just about BankAccounts not contacts, isn't it? Should it rather be something like "Associates transaction with bank account"?

@CS-DaS

CS-DaS commented Jul 27, 2026

Copy link
Copy Markdown
Author

I added all the corrections.

@CS-DaS
CS-DaS requested a review from dontub July 27, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation status:needs work There is code, but it needs additional work before it should be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants