50% off your first 3 months*

Lookup tables: translating partner codes into the values your systems use

Your retailer says “0412”. Your accounting system says “Sumner distribution centre”. A lookup table is the dictionary between the two, kept in one place and checked against real orders.

Weredi team4 min read
850856810

Key takeaways

  • A lookup table pairs each partner value (the lookup value) with the value your system uses (the end value). Mappings call it with $lookupTable.
  • Link a table to one of your connected apps and end values are picked from that app’s records, not typed.
  • Weredi checks your partners’ recent documents and lists the codes your table doesn’t translate yet, before they cause a failed order.

Why partner codes need translating

EDI is full of codes that make perfect sense to the company that sent them and none to your software. A retailer doesn’t write the name of the store it wants delivered; it writes its own location number. It doesn’t name the carrier; it sends a four-letter SCAC. Your accounting system knows none of these.

Where the codes hide850 · 856
N1*ST*SUMNER DC*92*0412~
TD5**2*FDEG~
PO1*1*2*CA*100.80**UP*012345678905~
ITD*01*3*2**30**60~
A buyer’s location code in N104, a carrier code in TD503, a unit of measure in PO103, payment terms in ITD.

You could fix each one by hand on every order. Or you translate it once, in a table, and let every order after that use it.

What a lookup table looks like

Lookup valueEnd valueUsed for
0412Sumner distribution centreCustomer or ship-to
0587Kent storeCustomer or ship-to
FDEGFedEx GroundCarrier
CACase of 12Unit of measure

In a mapping, the field that needs translating wraps its expression in $lookupTable: the partner’s value goes in, your value comes out.

End values from your own records

A table can be general purpose, with end values you type. Or you can link it to one of your connected apps and one of its entities. From then on, each end value is chosen from that app’s real records, so a customer name can’t be misspelled into a customer that doesn’t exist.

Forgiving matching

Partners aren’t always consistent with their own codes. Weredi first looks for an exact match, then tries again ignoring case and spaces, so a partner sending dc0412 still finds the line you wrote as DC 0412.

Missing codes, found before they hurt

Each table shows which mappings use it and on which field. Weredi then runs those mappings on your partners’ recent documents and lists the values they produce that the table doesn’t translate yet, with a count of what’s missing. A new store number shows up there before it shows up as an order that couldn’t be booked.

Add it where you notice it. In the mapping editor, pick a sample and the lookup card evaluates the expression on it. If the value has no line yet, add it right there; the expression is wrapped in $lookupTable for you.

Bring your spreadsheet

Most suppliers already keep these codes somewhere. Import a CSV with two columns, the lookup value and the end value: new values are added, existing ones get their end value replaced, and Weredi tells you how many rows were added, replaced and skipped. Export the table to CSV whenever you want a copy.

Safe to change

Because a table knows which mappings use it, removing one isn’t a blind click: Weredi warns that those mappings will stop translating its values, so you decide with the consequences in front of you.

Questions

One table per partner, or one shared table?

Either. Location numbers are usually specific to one retailer, so they get a table each. Carrier or unit codes are often the same everywhere, and one general-purpose table can serve every mapping.

Is the matching case-sensitive?

No. An exact match wins first; failing that, case and spaces are ignored.

Can I bring my existing code list?

Yes. Import a CSV of lookup values and end values, up to 2 MB per file, and export it again at any time.

Which plans include lookup tables?

Lookup tables are part of Weredi Plus and Enterprise, and of every active trial, along with mappings and the accounting connections.

850856810Lookup tablesMappingsIntegrations

Related articles

All articles →

Stop retyping partner codes

Lookup tables come with Weredi Plus, together with mappings and the QuickBooks Online, Xero, Sage and NetSuite connections they feed.

Sign up free
Weredi
+1 877-WEREDI-1 (+1 877-937-3341)
Weredi is a high-performing global supply chain network that provides fully integrated, end-to-end supply chain visibility and management.
Weredi™ is a trademark of Weredi, Inc. All other names, logos, and brands appearing on this site are the property of their respective owners (including “X12,” a trademark of X12 Incorporated). Neither Weredi, Inc. nor its products or services are endorsed by, sponsored by, or affiliated with these third parties. Any use of third-party names, logos, or brands is solely for identification and does not imply endorsement, sponsorship, or affiliation.
*New Weredi and Weredi Plus accounts on monthly billing, applied automatically at checkout. Annual billing includes 2 months free instead. Enterprise plans are quoted separately.
© Weredi, Inc. 2023, All rights reserved | Sitemap | Legal & Privacy | System status | Log in