Closed RobAltium closed 1 year ago
This is obviously a good change. Adding this has no drawback, as it removes any ambiguity for customers when they input an ID. However, thinking about it in practice, how would a customer get these IDs for their functions?
As per the README they would refer to the list here: https://octopart.com/api/v4/values#sellers
If they have a large BOM, with lots of rows, they aren't going to want to manually change the function for each row. They could have a key that they look up in Excel to map a name to a ID but that feels a bit clunky.
The power of Excel can help here. I imagine a lot of customers would have BOMs in which there is a row for distributor. And some will also have preferred distributors which can be placed manually in specific cells to be referenced in the functions.
Would it be sensible to have a distributor ID query in the add-in?
That's a good suggestion. Feel free to put another BAU ticket for this and chat to Phil. I see two functions here potentially, something like:
=NEXAR_SUPPLY_DISTRIBUTOR(name_or_id)
<- Returns the full name of the distributor to be used.
=NEXAR_SUPPLY_DISTRIBUTOR_ID(name)
<- Returns the ID of the first seller found from the input name.
We'd have to think through the best behaviour when there is more than one match from the given input.
This fix is in support of ticket 1028.
The current pull request makes the following changes:
Seller ID
or a (partially matched) company name in functions which filter distributors.README
file.v0.5.2
.@RowMur or @MeEntity: Please can one of you review these code changes?
With these changes, for example, you can specify
2454
instead ofFuture Electronics
.The particular issue addressed by these changes is a specific case where the user would use
1532
for distributorTME
because otherwise the partial name matching behaviour meansTME
would matchUtmel
.Whilst we could perform an exact match first then a partial match if no exact match is found, that isn't quite right. It would mean second-guessing what the user wants: with
TME
would they prefer aUtmel
offer if that's the only one, or is it is better to return offer not found? This solution avoids that uncertainty: if you specify the companyID
you are being explicit.