Exact Online中能否实现GeneralJournalEntry与BankEntry行项的精准匹配?
Let me break down your problem and share feasible solutions based on my experience with Exact Online's matching functionality:
Context & Current Setup
You're working with two types of entries posted to G/L Account 1600:
- A Bank Entry (number 10001) with three line items
- A General Journal Entry (number 10002) with three corresponding line items
Bank Entry (10001) Details
| Entry Number |
|---|
| 10001 |
BankEntryLines
| Amount | Description | Line Number |
|---|---|---|
| -1,000.00 | bank:item:001 | 1 |
| -1,000.00 | bank:item:002 | 2 |
| -1,000.00 | bank:item:003 | 3 |
General Journal Entry (10002) Details
| Entry Number |
|---|
| 10002 |
GeneralJournalEntryLines
| Amount | Description | Line Number |
|---|---|---|
| 1,000.00 | invoice:item:001 | 1 |
| 1,000.00 | invoice:item:002 | 2 |
| 1,000.00 | invoice:item:003 | 3 |
The Matching Issue
Your current XML MatchSet approach (shown below) creates valid match sets, but the line items are matched randomly instead of aligning by their description-based numbering:
<eExact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="eExact-XML.xsd"> <MatchSets> <MatchSet> <GLAccount code="1600"/> <Account code=" 0001"/> <MatchLines> <MatchLine finyear="2019" finperiod="8" journal="xx" entry="10001" amountdc="-1000.00"/> <MatchLine finyear="2019" finperiod="2" journal="xx" entry="10002" amountdc="1000.00"/> </MatchLines> </MatchSet> </MatchSets> </eExact>
Actual Random Matching Result:
| Matched |
|---|
| bank:item:001 / invoice:item:003 |
| bank:item:002 / invoice:item:002 |
| bank:item:003 / invoice:item:001 |
Desired Exact Matching Result:
| Matched |
|---|
| bank:item:001 / invoice:item:001 |
| bank:item:002 / invoice:item:002 |
| bank:item:003 / invoice:item:003 |
The core problem here is that your current MatchSet doesn't specify which line items should be paired—so Exact Online just matches equal amounts randomly.
Feasible Solutions to Get Exact Line Matching
Exact Online's XML schema doesn't support matching directly by description, but we can work around this with line-level targeting:
1. Split MatchSets to Target Individual Line Items
Instead of creating one MatchSet for the entire entry, create a separate MatchSet for each pair of corresponding line items. Use the line attribute in <MatchLine> to specify exactly which line from each entry should be matched:
<eExact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="eExact-XML.xsd"> <MatchSets> <!-- Match line 1 of Bank Entry 10001 to line 1 of Journal Entry 10002 --> <MatchSet> <GLAccount code="1600"/> <Account code="0001"/> <MatchLines> <MatchLine finyear="2019" finperiod="8" journal="xx" entry="10001" line="1" amountdc="-1000.00"/> <MatchLine finyear="2019" finperiod="2" journal="xx" entry="10002" line="1" amountdc="1000.00"/> </MatchLines> </MatchSet> <!-- Match line 2 of Bank Entry 10001 to line 2 of Journal Entry 10002 --> <MatchSet> <GLAccount code="1600"/> <Account code="0001"/> <MatchLines> <MatchLine finyear="2019" finperiod="8" journal="xx" entry="10001" line="2" amountdc="-1000.00"/> <MatchLine finyear="2019" finperiod="2" journal="xx" entry="10002" line="2" amountdc="1000.00"/> </MatchLines> </MatchSet> <!-- Match line 3 of Bank Entry 10001 to line 3 of Journal Entry 10002 --> <MatchSet> <GLAccount code="1600"/> <Account code="0001"/> <MatchLines> <MatchLine finyear="2019" finperiod="8" journal="xx" entry="10001" line="3" amountdc="-1000.00"/> <MatchLine finyear="2019" finperiod="2" journal="xx" entry="10002" line="3" amountdc="1000.00"/> </MatchLines> </MatchSet> </MatchSets> </eExact>
This ensures each line item is paired exactly as you want, since you're explicitly defining which lines belong together.
2. Use Exact Online's REST API for Precise Line Matching
If you need more flexibility, you can use Exact Online's REST API to create match sets. The /api/v1/{division}/financial/MatchSets endpoint allows you to specify the unique IDs of the line items (e.g., BankEntryLineID and GeneralJournalEntryLineID) directly in the request body. This removes any ambiguity and guarantees the exact pairing you need.
Key Validation Tips
- Ensure each MatchSet has matching absolute amounts (a requirement for Exact Online's matching logic)
- Test this setup in a sandbox environment first to avoid unintended changes to production data
内容的提问来源于stack exchange,提问作者Shift 'n Tab

