Retailer Locater Services
Developer Guide
Version 2.7.7
Oct 29, 2008
By
Aaron Reifschneider
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
Table of Contents
1. Introduction .................................................................................................................................... 3
2. Getting Started ............................................................................................................................... 3
3. Web Service Interface .................................................................................................................... 6
4. ASP.NET FLASH Interface Web methods .................................................................................. 14
5. ASP.NET ASPX Interface (Use of the Proxy page) ................................................................... 14
6. Required Testing .......................................................................................................................... 14
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc -2- 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
1. Introduction
The purpose of this document is to provide details on the services provided by Retailer Locater Services
(RLS). The purpose for RLS is to provide a list of retailers that have reported sales for a particular brand.
There are several filters applied to this data before being returned. The filters are detailed in the interface
definitions below.
To see an example implementation of RLS you can visit the Bare Knuckle Stout web site at
http://qa.bareknucklestout.com. Then click on the Pub Crawler link. Enter your zip code to locate a retailer
that carry’s the Bare Knuckle Stout brand.
4 Scenario that could occur and need to standardize our 3 responds below to be consistent on all sites.
Legal or Illegal State State Carry's Response
Yes - Legal Yes Retail Name and Address
Yes - Legal No "Unavailable in your area message" (or something)
No - Illegal No "Unavailable in your area message" (or something)
No - Illegal Yes "Please contact your local Wholesaler to find where brand
is sold"
The One site that I know handles the response properly is Bare Knuckle Stout. Please follow how it
performs:
http://www.bareknucklestout.com
Others I know of that work like above.
http://www.stonemillpaleale.com
http://www.wildhoplager.com/main.html
The retailer data is retrieved from the Teradata BudNet Data Warehouse in real-time. The retailer data goes
back for 30 days for the GetRetailers web service and 8 weeks for GetRetailers8WK and 13 weeks
for the GetRetailers13WK. 4 week data is used with GetRetailersNA and
GetBrandFamilyRetailers only at this time
RLS was built using ASP.NET web services and version 1.1 of the .NET Framework. This document
provides information on how to use RLS.
2. Getting Started
There are three options for interacting with RLS.
Echo Web Methods
Public Facing Proxy (a_rlsProxy2.asmx)
REST-ful Interface
One option is to interact with RLS via web services on the web tier by talking to the Echo Ap tier via
a Connection path placed in your web config.
Echo Public URL to be used with flash applications:
QA Web Service http://qa.consumermembership.anheuser-
busch.com/RLS/a_RLSProxy2.asmx
QA Service http://qa.consumermembership.anheuser-
Description busch.com/RLS/a_RLSProxy2.asmx?WSDL
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc -3- 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
Prod Web Service http://consumermembership.anheuser-busch.com/RLS/a_RLSProxy2.asmx
Prod Service http://consumermembership.anheuser-
Description busch.com/RLS/a_RLSProxy2.asmx?WSDL
If web services cannot be used then we have provided an ASP.NET ASPX web page which can be
used. Both options are detailed below.
QA
http://qa.consumermembership.anheuser-
busch.com/RLS/scripts/RetailerLocaterDisplay.aspx?brandcode=bud&retailertype=10&zipcode=630
21&retailercount=10&salesreference=30
Prod
http://consumermembership.anheuser-
busch.com/RLS/scripts/RetailerLocaterDisplay.aspx?brandcode=bud&retailertype=10&zipcode=630
21&retailercount=10&salesreference=30
If Flash or other external method is used to interact with the retail locator service, we have a public
web service available. This is not available to be used from with in the Echo DMZ.
Note, The proper WSDL that matches th\rnal app tier has been fixed and is part of
a_RLSProxy2.asmx. a_RLSProxy.asmx should no longer be used on QA.
QA Web Service http://qa.consumermembership.anheuser-
busch.com/RLS/a_RLSProxy2.asmx
QA Service http://qa.consumermembership.anheuser-
Description busch.com/RLS/a_RLSProxy2.asmx?WSDL
Prod Web Service http://consumermembership.anheuser-busch.com/RLS/a_RLSProxy2.asmx
Prod Service http://consumermembership.anheuser-
Description busch.com/RLS/a_RLSProxy2.asmx?WSDL
If you would like to use the web service with VS.Net please e-mail Aaron Reifschneider at
aaron.reifschneider@anheuser-busch.com and request access the brand code to pass.
The web service can be used in Echo Intranet environment. In order to access RLS via web services you
will need to use the Enterprise Application Management (EAM) Enterprise Reusable Component (ERC)
configuration component.
The Keys are contained in this document
There also XML versions of the web methods to be consumed by Flash, AJAX and other client-based user
interface
Below you will find the interface definition for each option.
The web service contains 10 methods, 5 for Direct Referencing via .NET, returning a Dataset also used by
a proxy page. The other 5 with prefix xml that are copies of the first 5 that returns XML to be consumed by
Flash.
Things to Take into Consideration when making a site to use the Retailer Locator Service
On or Off Premises –Always Needed! (almost)
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc -4- 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
Two Radio Buttons are used that the consumer could select either On or Off Premises.
Basically On or Off Premises means where the consumer actually consumes the product. It’s either Dine
in (Consumed On Premise) or Carry out (Consumed Off Premise).
It is passed on the 'retailertype' Parameter, set
10 Consumed On premise (Dine in)
20 Consumed Off premise (Carry Out)
Aggregate to Use (4,8,13 Week) - Ask Brand Manager what to use
The Aggregate used contains what Brands a retailer purchased. The Default is 4 Weeks.
This means that there is 4 weeks worth of data in the database and the Query will only show Retailers who
purchased the brand up to four weeks ago. It can be changed to use 8 or 13 weeks worth of data.
*Illegal States (CA: 90210) Do not return retailer Info, but Wholesaler info with Phone number
When no results are returned, display message that: could not be found currently in you
state.
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc -5- 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
3. Web Service Interface
Consumed Via VS.Net Web Reference:
Data transmissions to the web service will need to be conducted using SOAP/XML.
The web service contains 5 methods. These 5 are for Direct Referencing via Visual Studio.NET, Returning
a Dataset.
Consuming from ASP.NET
The web service can be consumed via ASP.NET by setting the web service URL property to the value
stored in the following ERC key.
On Echo
Read Key
Consumermembership.anheuser-busch.com","rls","VerizonWS_5BE7CC3C-7831-464d-BC64-
BE2FB6DFF146
New Development, Do not use the RetailerLocaterService_web Abdatainfo Key, Use
RetailerLocaterService_web_2.
ABDataInfo
This is what the Echo AbData info Keys should be on Echo
Web Tier
Key: RetailerLocaterService_web
Web Tier Values
http://qa.consumermembership.anheuser-
busch.com/RLS/a_RLSProxy.asmx
Prod
http://consumermembership.anheuser-busch.com/RLS/a_RLSProxy.asmx
Use this one below, it mataches the internal Echo App Tier WSDL
ABDataInfo
This is what the Echo AbData info Keys should be on Echo
Web Tier (Use this one)
Key: RetailerLocaterService_web_2
Web Tier Values
http://qa.consumermembership.anheuser-busch.com/RLS/a_RLSProxy2.asmx
Prod
http://consumermembership.anheuser-busch.com/RLS/a_RLSProxy2.asmx
App Teir
Key: RetailerLocaterService_app
App tier values
Qa:
http://qaapp/rls/RetailerLocaterServiceDG.asmx
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc -6- 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
Prod
http://prodapp/rls/RetailerLocaterServiceDG.asmx
On Echo
For Local Development, could you hit the public web service on Echo QA.
It is not accessible from an application running with in the Echo DMZ
(Public)
Qa.
http://qa.consumermembership.anheuser-busch.com/RLS/a_RLSProxy2.asmx
Prod
http://consumermembership.anheuser-busch.com/RLS/a_RLSProxy2.asmx
We have retiered the use of ABDataInfo and ERC Config to reference the web service and suggest to
use the web.config.
First, here is an example of how to read the URL at runtime:
public static string Rls_Url
{
get
{
string key = ConfigurationManager.AppSettings["ServerRole"] + "-RlsUrl";
return ConfigurationManager.AppSettings[key];
}
set
{
throw new System.NotImplementedException();
}
}
Second, here is a sample web.config for a server hosted consumer:
Finally, here is a sample web.config for a browser hosted consumer:
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc -7- 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
Note: You will need .NET 2.0 and would need it referenced.
using System.Web.Configuration;
Otherwise return the Key from the server that you are on.
It will point you to the web service while in the DMZ.
Consumermembership.anheuser-busch.com","rls","VerizonWS_5BE7CC3C-7831-464d-BC64-
BE2FB6DFF146
Use this to Call the Keys value
(DMZ)
New Echo Use for the Web apps
The one for the web will be
// For Appliaction sitting on Echo to hit Echo ApTeir (Internal to Echo)
(Hashtable)ABCfg.GetAppConfigValue ("Consumermembership.anheuser-
busch.com","rls","VerizonWS_5BE7CC3C-7831-464d-BC64-BE2FB6DFF146")
(Public Proxy)
QA Web Service http://qa.consumermembership.anheuser-busch.com/RLS/a_RLSProxy2.asmx
Prod Web Service http://consumermembership.anheuser-busch.com/RLS/a_RLSProxy2.asmx
Echo Test Pages
Qa.
http://qa.consumermembership.anheuser-busch.com/RLS/scripts/webform1.aspx
Prod.
http://consumermembership.anheuser-busch.com/RLS/scripts/webform1.aspx
You May need to Request the ERC Components from Anheuser-Busch Companies, Inc.
Code Attachments showing how to call this will be included:
Open the ERC SDK.Zip to extract ErcSDK.msi to install the AB components to use with .Net. They are also
Please Refer to the usage.doc. Also the ERC Release Notes.doc contains good information with how to set
up machine.Config to use this component.
Attached is an example with .Net 2.0 that uses the new Echo Key
Please extract to C:\Inetpub\wwwroot\RLSExample
Try to build it and put on your Echo site and see if it works, then try to modify as you need
RLSExample.zip
Here is an example of the page the example creates
http://qa.consumermembership.anheuser-busch.com/RLS/scripts/default.aspx
The web methods and its interface are as follows:
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc -8- 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
Returns 4,8 or 13 weeks of Retailer Data based on what’s passed in the
AggLength field. Want to use this going forward to replace the GetRetailers(),
GetRetailers8WK(), GetRetailers13WK(). Those do not include the Retailer or
Wholesalers Phone number where GetRetailersWithPhone() does.
public DataSet GetRetailersWithPhone
(
string brandCode,
string zipCode,
int retailerType,
int retailerCount,
int salesReference,
int AggLength,
ref bool retailerDisplay,
ref int returnCode,
ref string errorMessage
)
Obsolete Please use GetRetailersWithPhone() instead
Returns 4 week of Retailer Data. Default for most sites
public DataSet GetRetailers
(
string brandCode,
string zipCode,
int retailerType,
int retailerCount,
int salesReference,
ref bool retailerDisplay,
ref int returnCode,
ref string errorMessage
)
Obsolete Please use GetRetailersWithPhone() instead
Returns 8 week of Retailer Data. Used for Peels or Bacardi where Retailers
might have preordered it or buy every 2 month
public DataSet GetRetailers8WK
(
string brandCode,
string zipCode,
int retailerType,
int retailerCount,
int salesReference,
ref bool retailerDisplay,
ref int returnCode,
ref string errorMessage
)
Obsolete Please use GetRetailersWithPhone() instead
Returns 13 week of Retailer Data. Used for Peels or Bacardi where Retailers
might have preordered it or buy every 2 month
public DataSet GetRetailers13WK
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc -9- 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
(
string brandCode,
string zipCode,
int retailerType,
int retailerCount,
int salesReference,
ref bool retailerDisplay,
ref int returnCode,
ref string errorMessage
)
Non Filtered by illegal States, Returns all Retailer for any state
public DataSet GetRetailersNA
(
string brandCode,
string zipCode,
int retailerType,
int retailerCount,
int salesReference,
int aggLength,
ref bool retailerDisplay,
ref int returnCode,
ref string errorMessage
)
public DataSet GetRetailersWithPhoneLongLatZip
(
string brandCode,
string zipCode,
string Latitude,
string Longitude,
int retailerType,
int retailerCount,
int salesReference,
int AggLength,
int radius,
ref bool retailerDisplay,
ref int returnCode,
ref string errorMessage
)
public DataSet GetRetailersLongLat
(
string brandCode,
string Latitude,
string Longitude,
int retailerType,
int retailerCount,
int salesReference,
int radius,
int AggLength,
ref bool retailerDisplay,
ref int returnCode,
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 10 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
ref string errorMessage)
public DataSet GetRetailerBrandList
(
string brand,
string RetailerID,
ref int returnCode)
4. ASP.NET FLASH Interface Web methods
These 5 web methods that are wrappers for the first 5. Return XML to be consumed by Flash copies of the
first 5 that return XML to be consumed by Flash, AJAX and other client-based user interface.
Web Service Details
The Retailer Locator web service provides a means for rich media clients, like Flash, to use the Anheuser-
Busch Retailer Locator Framework. This document describes how to use the web service. The following
URLs support the web service.
Use the Echo Public Web service URLS below
Echo Public URL to be used via flash applications:
QA Web Service http://qa.consumermembership.anheuser-
busch.com/RLS/a_RLSProxy2.asmx
QA Service http://qa.consumermembership.anheuser-
Description busch.com/RLS/a_RLSProxy2.asmx?WSDL
Prod Web Service http://consumermembership.anheuser-busch.com/RLS/a_RLSProxy2.asmx
Prod Service http://consumermembership.anheuser-
Description busch.com/RLS/a_RLSProxy2.asmx?WSDL
Web Service Methods
The RLS web service provides the following methods that support user interface data entry.
Returns 4,8 or 13 week of Retailer Data based on what’s passed in AggLength.
Want to use this going forward to replace the xmlGetRetailers,
xmlGetRetailers8WK, xmlGetRetailers13WK. Those do not include the Retailer or
Wholesalers Phone number where xmlGetRetailersWithPhone() does.
public string xmlGetRetailersWithPhone
(
string brandCode,
string zipCode,
int retailerType,
int retailerCount,
int salesReference,
int AggLength,
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 11 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
ref bool retailerDisplay,
ref int returnCode,
ref string errorMessage
)
Obsoleate Please use xmlGetRetailersWithPhone() instead
Returns 4 week of Retailer Data. Default for most sites. Returns XML
public string xmlGetRetailers
(
string brandCode,
string zipCode,
int retailerType,
int retailerCount,
int salesReference,
ref bool retailerDisplay,
ref int returnCode,
ref string errorMessage
)
Obsoleate Please use xmlGetRetailersWithPhone() instead
Returns 8 week of Retailer Data. Used for Peels or Bacardi where Retailers
might have preordered it or buy every 2 month
public string xmlGetRetailers8WK
(
string brandCode,
string zipCode,
int retailerType,
int retailerCount,
int salesReference,
ref bool retailerDisplay,
ref int returnCode,
ref string errorMessage
)
Obsolete Please use xmlGetRetailersWithPhone() instead
Returns 13 week of Retailer Data. Used for Peels or Bacardi where Retailers
might have preordered it or buy every 2 month
public string xmlGetRetailers13WK
(
string brandCode,
string zipCode,
int retailerType,
int retailerCount,
int salesReference,
ref bool retailerDisplay,
ref int returnCode,
ref string errorMessage
)
Non Filtered by illegal States, Returns all Retailer for any state
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 12 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
public string xmlGetRetailersNA
(
string brandCode,
string zipCode,
int retailerType,
int retailerCount,
int salesReference,
int aggLength,
ref bool retailerDisplay,
ref int returnCode,
ref string errorMessage
)
Here are examples of using the XML web methods
bool retailerDisplay = false;
int returnCode = 0;
string errorMessage = "";
xmlRetailerData =
retailerLocater.xmlGetRetailers(brandcode,zipCode,retailertype,retailercount,salesref
erence,ref retailerDisplay,ref returnCode,ref errorMessage);
xmlRetailerData =
retailerLocater.xmlGetRetailers8WK(brandcode8WK,zipCode,retailertype,retailercount,sa
lesreference,ref retailerDisplay,ref returnCode,ref errorMessage);
xmlRetailerData =
retailerLocater.xmlGetRetailers13WK(brandcode13WK,zipCode,retailertype,retailercount,
salesreference,ref retailerDisplay,ref returnCode,ref errorMessage);
xmlRetailerData =
retailerLocater.xmlGetRetailersNA(brandcodeNA,zipCode,retailertype,retailercount,sale
sreference, AggLength, ref retailerDisplay,ref returnCode,ref errorMessage);
xmlRetailerData =
retailerLocater.xmlGetBrandFamilyRetailers(brandfamilycode,zipCode,retailertype,retai
lercount,salesreference,AggLength, ref retailerDisplay,ref returnCode,ref
errorMessage);
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 13 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
5. ASP.NET ASPX Interface
Consumed Via Proxy Page:
For those applications that cannot interact with a web service we have provided an ASPX web page that
can be used. The interface consists of passing querystring variables and values to obtain the retailer data.
There are several different scenarios that can occur when using the retailer locater. Each scenario will
present different data via XML. Each scenario is detailed below.
Every retailer locater search will return both retailer data and wholesaler data. In other words, with each
retailer you will see the wholesaler that services that retailer.
Three important things to note:
1. Each XML document will return a ReturnCode node and ErrorMessage node. If you receive a
return code of zero that means the search ran without any errors. Always check for the return code
before displaying any data to the browser. If you don’t get a zero back then a problem occurred.
2. Each XML document will contain a RetailerDisplay node. This node indicates whether or not
we are legally able to provide retailer information in the state in which the submitted zip code
resides. If you get a “True” back then the retailer information can be displayed. If you get a “False”
back then you can only display the wholesaler information. More information on this is available in
scenario #2 below.
3. You interact with the retailer locater by passing values via a querystring. The querystring variables
are as follows:
Variable Description
Brandcode This is the brand code for which retailers should be returned. (i.e.
Anheuser World Select is ans)
------------or--------
--------------------------------------------------------------------------
brandFamilyCode This is a Brand Family code as defined in the database instance. Bacardi
is 196
Brandcode8WK If this Query string value is passed to RetailerLocaterDisplay.aspx it will
return Retailers found with in 8 weeks of Sales to Retailers.
Swap Brandcode=BUD with Brandcode8WK=BUD
Brandcode13WK If this Query string value is passed to RetailerLocaterDisplay.aspx it will
return Retailers found with in 13 weeks of Sales to Retailers
Swap Brandcode=BUD with Brandcode13WK=BUD
BrandcodeNA If this Query string value is passed to RetailerLocaterDisplay.aspx it will
return Retailers found determined by the passed value of aggLength (4,
8,or 13) weeks of Sales to Retailers. This Web service returns the
Retailers with always True
This is always returned true and used for Non Alcoholic Brands only!
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 14 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
Zipcode The zip code for which retailer need to be located. The query to retrieve
retailer will be restricted to the state in which the submitted zip code
resides.
Retailertype This indicates which type of retailer should be returned. It will either be 10
for on-premise or 20 for off-premise
Retailercount The number of retailers to return. This number must be greater than 0 and
less than or equal to 100.
Salesreference This number indicates how far back the query should run. Currently, RLS
only supports going back as far as 30 days. Therefore, for the moment this
parameter can only and must be set to 30.
AggLength This determines the Teradata aggregate week length to use. This is
passed either as 4, 8, or 13. This is currently used by
GetRetailersWithPhone, xmlGetRetailersWithPhone,
GetRetailersNA and GetBrandFamilyRetailers web method only.
Echo Version.
QA
http://qa.consumermembership.anheuser-
busch.com/RLS/scripts/RetailerLocaterDisplay.aspx?brandcode=bud&retailertype=10&zipcode=63021&reta
ilercount=10&salesreference=30
Prod
http://consumermembership.anheuser-
busch.com/RLS/scripts/RetailerLocaterDisplay.aspx?brandcode=bud&retailertype=10&zipcode=63021&reta
ilercount=10&salesreference=30
I also have a form for quick testing at:
QA
http://qa.consumermembership.anheuser-busch.com/RLS/scripts/RetailerLocaterForm.aspx
Prod
http://consumermembership.anheuser-busch.com/RLS/scripts/RetailerLocaterForm.aspx
The ASPX page is available on both the QA and Production instances at Echo. Here are sample calls to the
ASPX page on each instance:
The RESTful interface allows you to make queries directly via an HTTP GET request.
brandcodewithphone
Echo: Using WithPhone13 Week Agg
http://qa.consumermembership.anheuser-
busch.com/RLS/scripts/RetailerLocaterDisplay.aspx?brandcodewithphone=BAM&retailertype=10&zi
pcode=63021&retailercount=10&salesreference=30&AggLength=13
Working
4 week data
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 15 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
http://qa.consumermembership.anheuser-
busch.com/RLS/scripts/RetailerLocaterDisplay.aspx?brandcodewithphone=BAM&retailertype=10&zipcode=
63021&retailercount=10&salesreference=30&AggLength=4
8 week data
http://qa.consumermembership.anheuser-
busch.com/RLS/scripts/RetailerLocaterDisplay.aspx?brandcodewithphone=BAM&retailertype=10&zipcode=
63021&retailercount=10&salesreference=30&AggLength=8
13 week agg
http://qa.consumermembership.anheuser-
busch.com/RLS/scripts/RetailerLocaterDisplay.aspx?brandcodewithphone=BAM&retailertype=10&zipcode=
63021&retailercount=10&salesreference=30&AggLength=13
Good Echo
Get the Retailers with just the Zip code and Latitude and Longitude, Zip is required
Works similar to Get Retailers(), but will take lat, long coordinates for more detail distance
latitude - Required
longitude - Required
zipcode - Required
retailertype =10 On Premise
retailertype =20 Off Premise
retailertype =0 Both
retailercount between 0 – 100
salesreference = 30, must stay 30
AggLength = 4, 8, 13
Radius
0
False
-
-
BASS PALE ALE
-
BODDINGTON'S
-
BUD AMER. ALE
-
BUD LIGHT
Does not return Phone number, please use brandcodewithphone web method
(Above)
Echo: Using 8 Week Agg
http://qa.consumermembership.anheuser-
busch.com/RLS/scripts/RetailerLocaterDisplay.aspx?brandcode8WK=BAM&retailertype=10&zipcode=6302
1&retailercount=10&salesreference=30
Echo: Using 13 Week Agg
http://qa.consumermembership.anheuser-
busch.com/RLS/scripts/RetailerLocaterDisplay.aspx?brandcode13WK=BAM&retailertype=10&zipcode=63
021&retailercount=10&salesreference=30
Brand Family
http://qa.consumermembership.anheuser-
busch.com/RLS/scripts/RetailerLocaterDisplay.aspx?brandfamilycode=196&retailertype=10&zipcode=6302
1&retailercount=10&salesreference=30&AggLength=8
Example of call in legal state on border of Illegal state, Returns Retailers in legal and Wholesalers in Illegal
http://qa.consumermembership.anheuser-
busch.com/RLS/scripts/RetailerLocaterDisplay.aspx?latlongradius=BAM&latitude=39.5321&longitude=-
119.8390&retailertype=10&retailercount=100&salesreference=30&AggLength=4&radius=50
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 17 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
These are several possible scenarios that can occur when calling the ASPX page.
They are detailed below.
Scenario #1 – Successful search for retailers in a legal state
If a zip code is submitted in a state where we can legally provide retailer information the following is a
sample of what the XML will look like.
-
0
True
-
-
ANS
ANHEUSER SELECT
OUTBACK/MISSOURI II
3930 HIGHWAY 54
OSAGE BEACH
MO
65065
-92.621788
38.157267
10
On-
Premise
32459
MISSOURI EAGLE LLC-LEBANON
242 HWY MM
LEBANON MO
MO
65536
116.77979047460403
1
-
ANS
ANHEUSER SELECT
PASTA HOUSE COMPANY
4204 HIGHWAY 54
OSAGE BEACH
MO
65065
-92.621788
38.157267
10
On-
Premise
32459
MISSOURI EAGLE LLC-LEBANON
242 HWY MM
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 18 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
LEBANON MO
MO
65536
116.77979047460403
2
2.2 Scenario #2 – Successful search for retailers in a non-legal state
If a zip code is submitted in a state where we cannot legally provide retailer information the following is a
sample of what the XML will look like. There are essentially two differences between this scenario and
scenario #1:
1. This scenario returns the same data like you would see from scenario #1. However, it also returns
the wholesaler phone number for the wholesaler that services the closest retailer. The closest
retailer will always be at the top of the list.
2. The RetailerDisplay node will indicate “False” meaning we cannot display retailers in the state.
Therefore, you must display the wholesaler that services the closest retailer. The example below
that would be the ANHEUSER-BUSCH INC wholesaler.
-
0
False
-
-
ANS
ANHEUSER SELECT
ARCLIGHT CINEMAS
6360 W SUNSET
BLVD
LOS ANGELES
CA
90028
-118.328327
34.098016
10
On-Premise
70400
ANHEUSER-BUSCH INC
15420 COBALT STREET
SYLMAR CA
CA
91342
3.1373086718718173
1
8183672193
-
ANS
ANHEUSER SELECT
PIG & WHISTLE
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 19 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
6714 HOLLYWOOD
BLVD
LOS ANGELES
CA
90028
-118.336647
34.101575
10
On-Premise
70400
ANHEUSER-BUSCH INC
15420 COBALT STREET
SYLMAR CA
CA
91342
3.5880641719436914
2
2.3 Scenario #3 – Search in state with no retailers
It is currently possible for a consumer to submit a zip code in a state for which no retailers currently stock
AWS or where no retailers have purchased AWS within the last 30 days. If that is the case the following
XML will be returned.
0
False
2.4 Scenario #4 – An invalid zip code was submitted
If an invalid zip code is submitted it will provide XML to indicate an invalid zip code was submitted. An
example of an invalid zip code would be entering “ttttt” as a zip code.
999999
Input string was not in a correct format.
2.5 Scenario #5 – Any general error
If the retailer locater is experiencing technical issues, the XML below will be returned. The node will provide
a description on what the problem. In general, this text should not be displayed to the consumer. It used for
error logging and debugging purposes.
999999
ERROR MESSAGE
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 20 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
Scenario #1 – Successful search for retailers by Brand Family Code in a legal state
This will return all of the brands for a Brand Family code each for the retailers of a given zip code.
http://qa2.bacardisilver.com/TEST/RetailerLocaterDisplay.aspx?brandfamilycode=196&retailertype=10&zipc
ode=63021&retailercount=10&salesreference=30
BSC
BAC SIL LOCB BC
ELK'S LODGE #2644
19 W 1ST ST
EUREKA
MO
63025
-90.628635
38.503215
10
On-Premise
22438
GREY EAGLE DISTRIBUTORS
2340 MILLPARK DRIVE
MARYLAND HEIGHTS MO
MO
63043
7.50793046992796
7
-
BSL
BACARDI SILVER
ELK'S LODGE #2644
19 W 1ST ST
EUREKA
MO
63025
-90.628635
38.503215
10
On-Premise
22438
GREY EAGLE DISTRIBUTORS
2340 MILLPARK DRIVE
MARYLAND HEIGHTS MO
MO
63043
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 21 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
7.50793046992796
8
-
BSW
BAC WATERMELON
ELK'S LODGE #2644
19 W 1ST ST
EUREKA
MO
63025
-90.628635
38.503215
10
On-Premise
22438
GREY EAGLE DISTRIBUTORS
2340 MILLPARK DRIVE
MARYLAND HEIGHTS MO
MO
63043
7.50793046992796
9
-
BGA
BAC LC GRN APPL
ELK'S LODGE #2644
19 W 1ST ST
EUREKA
MO
63025
-90.628635
38.503215
10
On-Premise
22438
GREY EAGLE DISTRIBUTORS
2340 MILLPARK DRIVE
MARYLAND HEIGHTS MO
MO
63043
7.50793046992796
10
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 22 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
6. Required Testing
This section is designed to help ensure the proper release of a brand site that is using the Retail locator
web service
Test Illegal/Legal states
Legal States On-Premise: AL, CO, CT, DC, DE, FL, IA, ID, IL, KS, LA, MA, MD, ME, MI, MN, MO, MS, NC, ND,
NE, NH, NJ, NM, NV, NY, OK, OR, PR, RI, SC, SD, TN, UT, VT, WA, WY
Legal States Off-Premise: On-Premise + WI
Illegal States or states that should show the wholesaler Information only:
AK, AR, AZ, CA, GA, HI, IN, KY, MT, OH, PA, TX, VA, WV
Try zip codes that are suppose to return the wholesaler information and not the Retailer info. This includes CA
(90210), TX (77904), IN (46919) and many others. The one’s not listed above. The Result XML will set the
False to false when the web service finds that the user is searching in an
illegal state.
Test On premise and off premise.
This indicates which type of retailer should be returned.
It will either be 10 for on-premise or 20 for off-premise
Additional things to test for a new site
o Contact US is pointing to the Prod location and not test
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 23 - 12/3/2011
Anheuser-Busch Companies, Inc. Retailer Locater Services Developer Guide
Error Codes
An invalid zip code was submitted
If an invalid zip code is submitted it will provide XML to indicate an invalid zip code was submitted. An
example of an invalid zip code would be entering “ttttt” as a zip code.
999999
Input string was not in a correct format.
Any general error
If the retailer locater is experiencing technical issues, the XML below will be returned. The node will provide
a description on what the problem. In general, this text should not be displayed to the consumer. It used for
error logging and debugging purposes.
999999
ERROR MESSAGE
Return Code Error Possible Solution
returnCode = 5; “Invalid zip code Check that the zip code
//If the zip code doesn't exist throw an passed" is properly formatted
exception
returnCode = 10; "Invalid retailer Make Sure Either 10 or
type passed" 20 is passed in the
Retailertype Pram
10 = On Premise
20 = Off Premise
returnCode = 15; "Invalid retailer retailerCount
(retailerCount 100) count passed" needs to be between 0
and 100
returnCode = 20; "Invalid sales Salesreference must be
reference passed" set to 30
returnCode = 999999; General Error Something else is
wrong. Check with A-B
returnCode = 55; Invalid Retailer ID Make sure Retailer ID
passed is valid
8e38ce17-aa0a-4b16-85aa-7acf20a24817.doc - 24 - 12/3/2011