[QoL] Flag missing merchant info
Y'know how we get questions about Unnamed merchant, and we have our Yellow Pages directory to add cute metadata to transactions, like logos and names?
Like Monzo (screen recording to follow), wouldn't it be nice if we could get a little extra option in the transaction 'three dot' dropdown, allowing users to add more information about a vendor, like their name, or website, so we can improve Yellow Pages!
Ideal scenario
Say we find a new JLCPCB vendor ID - it shows up as Unnamed merchant on HCB grant cards, and doesn't have the JLC logo on the ledger.
- User clicks onto transaction, and out of the goodness of their heart goes > three dots >
Improve merchant information - We show a dropdown/search function: Link to an existing merchant?
If merchant found, send a slack message to a slack channel, or an airtable base with the MID and the respective name to be updated in Yellow Pages
- If not found, the user is invited to enter the vendor's name, and their website.
- This information gets submitted to the Yellow Pages review team, and a nice OSS contributor adds this to their list of logos & names to link to MIDs, thus our evil plan to collate the world's MIDs expands muahaha.
Implementation ideas
I'm thinking of using Fillout for this initially, cause I know how do to Fillout URL params, and it shouldn't be too difficult (he says).
Eventually, it would be swell if I could figure out how to put this in HCB natively probably stealing some popout code from another process/component.
I also don't know how to assign this issue to me, so consider this issue assigned to me!
I tried and failed to do this. turns out you actually need to know ruby.
If anyone wants a stab at this, I think you can pop in a new bit of code (duh) in app/views/hcb_codes/_meatballs.html.erb which looks like the dropdown.
<%# --- this assumes that all flaggable transactions can be improved --- %>
<%# --- there's probably a much better way of doing this, but I haven't found that yet --- %>
<% if flagable %>
<% fillout_url = "https://forms.hackclub.com/hcb-txn?mid=#{hcb_code.merchant_mid}&name=#{hcb_code.raw_name}" %>
<%= link_to fillout_url, target: "_blank", class: "flex items-center" do %>
<%= inline_icon "edit", size: 24 %>
Improve merchant information
<% end %>
<% end %>
However! I have not a single clue where I'd get the MID or transaction name from. I did make up the hcb_code.merchant_mid stuff.
https://github.com/user-attachments/assets/698c0b25-b54b-4c01-af44-c3b34a21b4b2
Something like this!
This is a cool idea! Is the Fillout form ready to go? I can take your code and put something together - it seems pretty close. Though I'd recommend trying to debug it yourself and get it working - that's the best way to learn.
Fillout is good to go! To be honest, I'm really not sure where to start. I can make the button, but have no idea how to pull MIDs or raw transaction names?
Hey @leowilkin, who will be responsible for processing these fillout submissions and getting them into yellow pages. You mentioned the yellow pages review team, but that's largely just the HCB engineering team at the moment and I'm not sure that we have the capacity to take this on.
Maybe someone on the operations side can handle this? If so, they need to:
- Regularly process new submissions
- Perform checks to validate the information provided
- Create a PR to yellow pages to add this information
@garyhtou a community team, like the ex-open sourcerers, or the Dino review team? Do you think that would work? I know engineering probably doesn't have the capacity for something like this.
I'd be down to help out if needed. I've started to see the yellow pages contributions die out over time and still some PRs (including mine 😭 ) are left unmerged. I've been thinking of a way such as what Leo said or if I have time to add merchant IDs to the v3 API I could write a quick script to compile memos and the merchant IDs and try to pair them ig. But tldr is we need some team to review and grow the yellow pages list.
Fyi @leowilkin, I'm chatting with @thedev132 about this since Graham and other YSWS organizers may want to contribute to Yellow Pages to make it more robust (and in turn make the Card Grant managing experience less tedious).
@garyhtou did we make any progress on this/can we re-look at starting this back up again?
Hey sorry, I was a bit busy these past few months. Gary had the idea of giving a team of yellow pages reviewers limited to access to only a section of Blazer which allows us to see these kinds of transactions that are missing merchant info and the view Gary showed me was that one merchant ID would map to all the transaction memos that have it so we can strongly identify which merchant it is and then the team can make PRs to yellow pages effectively improving this.
Your flag feature is also pretty useful to have if we can possibly make it a form that the yellow pages team could review then check Blazer and PR. I end school in less than 2 weeks so I'd love to work with you on this over the summer :)
Hey - absolutely. Let's make this something we do at HQ. V. happy to work with you on this, would be great to get the community involved!