[No QA] Docs updates for E/A#99201 Unique ID mapping for company card CSV import - #99797
[No QA] Docs updates for E/A#99201 Unique ID mapping for company card CSV import#99797MelvinBot wants to merge 3 commits into
Conversation
Co-authored-by: Tim Golen <tgolen@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
|
|
||
| If you don't map **Unique ID**, Expensify treats every row in the file as a new transaction. Re-uploading the same file creates a duplicate expense for each row. | ||
|
|
||
| For **Unique ID** to work, the values in that column must be unique within the file and stay the same for the same transaction across uploads. If the column repeats the same value on different transactions, Expensify treats them as the same transaction and skips the later ones. |
There was a problem hiding this comment.
@MelvinBot You should also mention here that the length of the unique ID has to be at least 5 characters long.
There was a problem hiding this comment.
Done in a601ba9.
Added it in two places:
In this section (right after the uniqueness paragraph you commented on):
Each Unique ID value must also be at least 5 characters long. Expensify ignores anything shorter when it checks for transactions it has already imported, so rows with a very short Unique ID import again every time you re-upload the file. If your file numbers transactions with short values such as
1,2, and3, map Unique ID to a longer reference column instead.
As an FAQ entry, since every other Unique ID gotcha in this article has one:
Is there a minimum length for Unique ID?
Yes. A Unique ID value must be at least 5 characters long. Expensify ignores shorter values when it checks for transactions it has already imported, so those rows create duplicates on a re-upload even though Unique ID is mapped. Map Unique ID to a column with longer references, such as the bank's own transaction ID.
What I checked and why the wording says "ignores" rather than "rejects"
There's no length check on Unique ID anywhere in the App codebase — the import screen's validate() only checks that required columns are mapped, that a card-identity column is mapped, that no field is mapped twice, and that required columns have no empty cells. Unique ID isn't in any of those, so a one-character value passes the client with no error and is sent through as-is. The only handling of the cell value is a blank check: an empty cell gets a generated ID.
So the 5-character rule has to be enforced on the backend, which I can't read from here. Since it lives in the dedup path rather than in import validation, I described the effect as "the value is ignored for duplicate matching, so the row imports again" rather than "the row is rejected" or "you'll see an error" — an error would have had to come from the App code, and there's no string for it.
Please correct me if either of these is wrong:
- Is the threshold "at least 5" (i.e. 4 characters fails), or is it "longer than 5"?
- Does a too-short value really just fall out of duplicate matching, or does something else happen to the row?
Docs-only markdown change, so no app tests apply. The change introduces no new vocabulary beyond what's already in the article, and spellcheck passed on the previous commit.
There was a problem hiding this comment.
Correction to my reply above: the quoted copy said "at least 5 characters," which was wrong. tgolen confirmed the threshold is more than 5 — a value of 5 characters or fewer is too short to dedupe reliably and gets ignored.
Fixed in d078d05, and verified on the deploy preview. Details in this comment.
Addresses review feedback from tgolen on #99797. Co-authored-by: Tim Golen <tgolen@users.noreply.github.com>
|
Addressed the review feedback in a601ba9.
Why the wording says "ignored" rather than "rejected"There is no length check on Unique ID anywhere in the App codebase. The import screen's The only handling of the mapped cell's value is a blank check in So the rule is enforced on the backend, which I can't read from here. Because it sits in the duplicate-detection path rather than in import validation, I described the effect as "the value is ignored for duplicate matching, so the row imports again on re-upload" rather than "the row is rejected" or "you'll see an error" — an error would have had to originate in App code, and there is none. ChecksDocs-only markdown change, so no app tests apply and there was nothing to verify in the UI. On I also corrected the PR description, which said "Adds three FAQ entries" — it is four now. |
|
@MelvinBot The unique ID must be more than 5 characters. If it is 5 or less, then it is too short to reliably dedupe anything, so it will be ignored. |
A Unique ID of 5 characters or fewer is too short to dedupe reliably and is ignored. Corrects tgolen's feedback on #99797. Co-authored-by: Tim Golen <tgolen@users.noreply.github.com>
|
A preview of your ExpensifyHelp changes have been deployed to https://a5987b8b.helpdot.pages.dev ⚡️ Updated articles: |
|
Corrected in d078d05. I had it off by one — "at least 5" would have told admins a 5-character ID works, when it's exactly the case that gets ignored. In the Unique ID section:
In the FAQ (
Your confirmation that the value is ignored (rather than the row being rejected or an error shown) matches what the App code does, so the surrounding wording stands — there's no length check or error string on the client side. I also updated the PR description, which still described the old threshold. Verified on the deploy preview: both sentences render as "more than 5 characters" at the updated article. Spell check, Validate Docs Routes File, and Deploy ExpensifyHelp all pass on d078d05; the only failing check is the expected independent-approval gate. |
Explanation of Change
Help site updates for #99201, which added a mappable Unique ID column to the New Expensify company card spreadsheet import.
Updates
docs/articles/new-expensify/connect-credit-cards/Import-Company-Card-Transactions-From-a-Spreadsheet.md:## How to use Unique ID to prevent duplicate transactionssection explaining that Unique ID is the dedup key, what to map it to, and what happens when it isn't mapped.tgolenin review).externalIDindex, so Unique ID must be re-mapped on every upload. Leaving the note as-is would tell admins the opposite of what the product does and lead straight to duplicate expenses.src/languages/en.ts.The PR's test steps mention a Use advanced fields toggle, but that toggle has since been removed from
CompanyCardsImportedPage.tsx(all mapping fields are now always offered), so it is intentionally not documented.Fixed Issues
$ #99195
PROPOSAL:
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
@tgolen, please review the files changed and confirm they reflect the current behavior. Then post a new comment saying
@MelvinBot mark this PR as ready for review.