Does anyone know a way to retrieve shipping countr...
# suitescript
g
Does anyone know a way to retrieve shipping country based on City rather than relying on what is under shipping country? Looking for an alternative as currently the data coming in has been wrong it was always defaulted to one country.. i.e. UK for Wales/Scotland/Ireland orders I know it's possible to get the ship city based on zip code however not sure about country? Retrieve the Name of the City Based on a ZIP Code
a
Wales, Scotland and N. Ireland (along with England) ARE the UK that isn't wrong? do you have more problem countries or just this one? because I would suggest this isn't actually a problem
ok based on your timezone you're actually in the UK... so I'm not sure why you wouldn't know this already? as a brit living in the US I just assumed you were in the US 😄
but to answer your technical question... Yes you can do exactly what they're doing in that link you'd just need to create a CSV file to load the cache. I suggest you drive it off the start of the post code rather than the city though... use this as your data source. http://www.roblocher.com/technotes/uk-postareas.html
g
so I'm trying to dig out a report which gives me some sales data, currently the shipping city is the only identifier as country comes through as united kingdom, i.e. order shipping address city is belfast, comes up as UK, I need to break down a report to show that as Ireland hence the query, rather than relying on excel to do smth like this...
a
ok well 1. Belfast is in Northern Ireland, NOT Ireland. those a very different things. and you only have cities? not postcodes? cos I'm sure you can all the big cities mapped to countries... but random little villages? how would you know and where would you even get a comprehensive list?
oh is this just for printing in places? or specifically for shipping? cos you can literally get something to its destination with just a number and a post code
g
new to the UK... so it's just to identify the correct region, rather than relying on cities and then figuring out which of the 4 it falls under... instead of doing this exercise in excel where you list out all the cities or postcodes, do something in NS instead with using shipping city and mapping that to Wales, NI etc... re shipping, that's correct, address line 1 and post code allows so no issues there...
a
yeah to be clear you're not "doing" anything in excel, its just the source the data to do the lookup against something... if the Post Office has a web API you can use its the same thing. generally this stuff doesn't change so have a static data source isn't an issue its a one time setup thing