snail icon indicating copy to clipboard operation
snail copied to clipboard

How to format company address containing person name?

Open timokleemann opened this issue 7 years ago • 6 comments

Thanks for this gem!

I'm just wondering how to format addresses containing a company name and a person name.

In Germany, we'd typically put the company name on the first line, followed by the person's name on the next line.

What's the international way of dealing with this? Can Snail handle it in any way?

This does work...

Snail.new(
  :name => "Jon Doe c/o Doe Inc.",
  :line_1 => "12345 Somewhere Ln",
  :line_2 => nil,
  :city => "Bentley",
  :region => "WA",
  :postal_code => "6102",
  :country => "AU"
).to_s

...but isn't there a better way?

timokleemann avatar Feb 12 '18 14:02 timokleemann

I think this is a missing feature. I've partially reviewed http://www.columbia.edu/~fdc/postal/ and discovered the preferred order is different in the Netherlands:

To address a specific person and or department within an organization, add it below the company name

Also maybe France?

One way to solve this would be with a new company field and accompanying logic to vary the order by destination. Another way to solve this would be with something like recipient_line_1 and recipient_line_2 fields that would allow the recipient to specify the order themselves when filling out a form.

Seems like the ideal solution depends somewhat on the use case. What's your perspective?

cainlevy avatar Feb 12 '18 16:02 cainlevy

Thanks. I am sure this feature would be much appreciated. I'd love to help you guys out on this one but I'm afraid my Rails skills are too basic.

Right now what I do is this:

Snail.new(
  :name => "Jon Doe\nDoe Inc."
)

(Note the new line character between person and company name.)

You could argue that this solution is fine because technically both lines contain some sort of name. Also, it will probably work in most countries but I am not entirely sure of that.

However, in the long run it would of course be more elegant to have an extra field organization.

(I personally would prefer organization over company since it covers both companies and institutions. I just realized this now...)

timokleemann avatar Feb 12 '18 16:02 timokleemann

Good feedback on the naming. I'm 👍 on organization.

I can handle the code side here if anyone is willing to finish going through http://www.columbia.edu/~fdc/postal/ for variations.

cainlevy avatar Feb 12 '18 16:02 cainlevy

@timokleemann I'm happy to release this with the incomplete list of variations (just Netherlands) or wait for more details. Let me know.

cainlevy avatar Feb 16 '18 18:02 cainlevy

Sounds great!

I just wish I could provide an example for each country. Even Frank doesn't seem to know that for sure. For some countries he includes company / organization / department names in his example addresses, for others he doesn't.

According to his research, most countries seem to follow the minor-to-major pattern:

PROF FRED FOO 1. Most specific line at the top DEPARTMENT OF HISTORY 2. Less specific... MOUNT ROYAL COLLEGE 3. Less specific... 4825 RICHARD ROAD SW 4. Street Address CALGARY AB T3E 6K6 5. City Line CANADA 6. Country Line (not used in domestic mail)

He gives two examples of countries who don't: Russia and Iran. I don't know if there are more.

timokleemann avatar Feb 16 '18 18:02 timokleemann

I think Snail is a best-effort library. It attempts to improve deliverability, but post offices around the world have to remain flexible. Consider this bit on Japan:

Mail to Japan can be addressed in Roman letters, with address lines written top to bottom in minor-to-major order. These mail pieces are sorted by hand upon arrival to Japan, where postal scanners handle only Kanji and Kana addresses written in major-to-minor order.

cainlevy avatar Feb 16 '18 19:02 cainlevy