Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to format company address containing person name? #34

Open
timokleemann opened this issue Feb 12, 2018 · 6 comments
Open

How to format company address containing person name? #34

timokleemann opened this issue Feb 12, 2018 · 6 comments

Comments

@timokleemann
Copy link
Contributor

timokleemann commented Feb 12, 2018

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?

@cainlevy
Copy link
Owner

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?

@timokleemann
Copy link
Contributor Author

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...)

@cainlevy
Copy link
Owner

cainlevy commented Feb 12, 2018

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 added a commit that referenced this issue Feb 16, 2018
@cainlevy
Copy link
Owner

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

@timokleemann
Copy link
Contributor Author

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.

@cainlevy
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants