Friday 28 November 2008

Tesco.com API first cut is up and running

What a nice way to end the week: A very first edition Tesco.com API is up and running on one of the internet-facing R&D servers. It supports the core functionality of grocery shopping:
  • logging-in,
  • searching for products (text search and using the dept-aisle-shelf hierarchy)
  • adding products to/removing from basket
  • showing all the products and quantities in the basket.
I've forwarded the API connection details to some colleagues who, like me, are going to geek-out this weekend rustling up some test applications to try it out!

Since it's built on Windows Communication Foundation (WCF) it will be hopefully a simple case of extending the API to support the simpler Representational State Transfer (REST) interfaces as well as today's weightier Simple Object Application Protocol (SOAP) interface.

Of course I know a lot of readers of this blog are wanting to have a play too. In my view it's going to be a few weeks before I get it out to a wider audience. Well, we're not too far away but we need to build in all the important factors such as security and resilience before we allow a in wider developer base.

I've got to think about assigning and managing developer-ids and application-ids so that we can control who and what can access the API. I've also got to think about fair usage limitations, such as how many results are returned in each search, and how many searches per day are allowed.

After all, do we want loads of clients dragging the service down by asking for all 30,000+ products every hour? Someone is going to write such a thing, I know it!

However this all good stuff and I must really thank Paul Tallett at Microsoft UK for his skills, knowledge and enthusiasm in helping deliver the API, and his understanding management for agreeing for him to work on this for us.

Wednesday 26 November 2008

'Where's My Delivery?" beta now extended to 20 stores.

Recently I discussed the launch of the SMS service we have started in beta mode where customers can find out by text exactly when their delivery is arriving.

Well I am happy to say that we have now extended the service to 20 stores around the country. The branches are listed below, so if you have your Tesco.com groceries delivered by one of these stores you are welcome to join the beta test (the branch name is shown on your last home shopping delivery receipt):


  • BLACKBURN
  • BOSTON
  • BURY ST EDMUNDS
  • CHELTENHAM
  • CUMBERNAULD
  • GALASHIELS
  • HASLINGDEN
  • HEXHAM
  • HULL
  • LANARK GALLOWHILL RD
  • LEIGHTON BUZZARD
  • LUDLOW
  • PLYMOUTH TRANSIT WAY
  • PORT GLASGOW EXTRA
  • SOLIHULL EXTRA
  • SWANSEA LLANSAMLET
  • WARWICK
  • WIGAN EXTRA
  • WISHAW BELHAVEN
  • WORKSOP

If your grocery delivery store is in the above list, text the word GROCERY to 81550 (and await a confirmation message). That's it! You'll receive a free text message every time a delivery is on its way from then onwards.

If you wish to stop the service, text the word STOP to 81550, and (after a confirmation text) the text messages will stop.

Please note:

  • SMS texts sent to 81550 cost 10p.
  • If you have a 'text bundle' as part of your mobile phone contract, any texts you send to 81550 will not come from your bundle, so will be charged as an extra outside your monthly inclusive contract cost.
  • Any texts you receive from us from this service are free to you, since we're picking up the bill. However if you pay to receive texts when abroad, you will be paying to receive this text too. We advise that you send STOP to 81550 before you leave the country.
  • The number you use to send the GROCERY text must be the same as one of the numbers in your Tesco.com grocery account, or we cannot match them. Quite a few people can now send and receive texts from their home landline. That's fine - just make sure it is one of the numbers in your Tesco.com account.
  • You will go on receiving texts for future deliveries until you send STOP to 81550.
  • May not work on mobile phones with non-UK numbers. However if you change your Tesco.com online account's mobile number entry to include the country code as a prefix then it should work. So in Ireland you would lose the first zero and replace it with '353'. If you have a UK number, though, leave it as-is with a zero prefix.
  • If your store is not in the list, you will get a confirmation message when you send GROCERY to 81550 but you will not receive any delivery texts.
  • There are occasions when you will not receive a text even though a delivery is on its way. There can be a number of technical or data reasons for this, which we are working through at the moment (thus the 'beta' tag!). For example, the odd occasion when a vehicle does not pass our internal checks before it leaves the store, and your groceries are transferred onto another van at the last minute.

Thursday 13 November 2008

What Time is it in the Windows Azure 'cloud'?

I had very interesting meeting yesterday with Neil Hutson and James Conard from Microsoft Corp who are members of a team responsible for the forthcoming Windows Azure 'cloud' platform.

Microsoft recently announced Azure at the PDC in Los Angeles. It's essentially a Microsoft owned and run hosting solution. If, like us, your systems run on Microsoft.Net and SQL Server then it is possible that those systems could be run in Azure.

I hasten to add that we have no plans to host Tesco.com anywhere other than our own hosted spaces. This solution wins for us on many fronts including security & legal (where data is hosted and how it is protected), availability (given that we are a 24/7 operation) and performance (not too many hops from the customer's computer to our web servers).

However it's my job to look at new technologies even if it is to prove that we do now is best, and so Azure has arrived as a project to see if it could a possible future hosting solution from a technical viewpoint.

Neil and James explored with me the facilities that will be available on Azure. Since the service is at an early stage of development there were many questions, the most important of which was the various elements of service level agreements that would need to be place.

There was also the subject of performance and efficient coding for optimal use of Azure without too much CPU or memory requirements (as this would affect cost directly).

One interesting question I posed them, however, was one that they have had to go away and answer: What time is it in Azure?

In other words, if I create an ASP.Net application with a web page that prints out the system date/time, and upload it from London what will it say?

Response.WriteLine("The time in Azure is: " + System.DateTime.Now.ToString());


What will it say to users in the UK (Summer/Winter time)? In the USA (Summer/Winter time + 4 time zones)? In India (constant time all year)?

Time is critically important to Tesco.com as it is involved in nearly every aspect of our service from scheduling vehicles to texting customers. It's no good a customer choosing a 10am to 12 slot when the time is an hour different, for example.

Now the easiest way out for Microsoft is to simply offer up UTC/GMT time for everyone, and it's up to the application to work out what local time it is. However that's a bit unfair - after all our Windows Servers all set the Summer/Winter time seamlessly and we don't have to worry about it. In addition, Tesco has its own time server ('tesco time!') which is used by all servers across the company to set their time by - a service which Azure would not have/want access to!

I suspect that Azure applications are going to have to have an extra parameter in Web.Config that allow developers to set the local country or region. That way Azure can supply the correct local time to the application through System.DateTime.Now and Transact-SQL's GETDATE() function, and switch it between summer and winter time at the appropriate moment.

It's important the Azure team get time right, so next time you discuss Azure with Microsoft, ask them what time it is!

Sunday 9 November 2008

Using SMS texting to communicate with customers

In a recent post I talked about how we have started to trial a service which sends out SMS text messages to customers to let them know exactly when their delivery will be arriving.

The SMS service works using our own SMS server linked to cellular provider O2. The server can receive messages, process commands in the text, and of course send an appropriate response.

Since the interfaces of the SMS server are built with Microsoft .Net, it has been easy for us to integrate it with the rest of our .Net-based infrastructure. Indeed, it has somewhat fired up the imagination of our business who are encouraging me to try all kinds of ways of communicating useful services with customers using SMS!

Not surprisingly O2 are excited by our plans too so we jointly agreed to create a video that explores some of our ideas.

Also at http://uk.youtube.com/watch?v=zD_OKiCoOB0

Thursday 6 November 2008

HD video of Tesco presentation at PDC

I have had several requests from people asking for a much higher quality video of the Tesco presentation at Microsoft PDC than the one I made available via YouTube.

If you right-click the following link you can download a WMV version of the 5 minute segment in 'near HD' quality. It's about 65MB in size:

http://www.lansleytech.com/videos/tescoatmicrosoftpdc.wmv

Tesco@Home application making the news

News travels fast and far from the joyous Übergeek land that is the Microsoft Professional Developers Conference.

Here are some noteworthy articles about the Tesco presentation:

I also like the BBC's Rory Cellan-Jones blog entry where he aims to explain the PDC event to the public. Rather pleasantly he says:

"The audience is mostly quietly enthusiastic, sometimes cheering "awesome" new software features - the loudest applause was for a Tesco executive presenting a new online shopping application hosted in the cloud."

Thanks for all the continued enthusiastic feedback. I have asked Paul Dawson from Conchango to bow at regular intervals to accept thanks for his team's design and development of the prototype application.

Stay tuned to this blog to be the first to know about the Tesco API as we begin to unfurl a beta version in the coming weeks.

Tuesday 4 November 2008

Where's My Delivery?

So back to the office and today marks the launch of our trial/beta of the 'Where's My Delivery?' service for customers.

I'll write more in a near-future post about the telematics system we are installing in every Tesco.com delivery van in the UK which we're using mainly to monitor and cut-down on fuel usage so that we can deliver a more environmentally-friendly and cost effective delivery service for customers.

From now on, whenever our vans drive away from the Blackburn Tesco Extra they 'break through a geofence' surrounding the store.

Imagine that we've drawn a square around the Blackburn Tesco building and car-park which each van drives through as they start out on their deliveries. This 'break' triggers a server monitoring the location of each van which then runs a satellite navigation algorithm to plot the journey to each customer. Each delivery has a time and it's this time that we will now be texting to Blackburn customers if they have registered for the service.

The magic of this solution is that customers who have booked their two-hour delivery slot can now get most of their time back since they know much more precisely when the van will arrive.

If the van gets stuck in traffic (say, an accident occurs on the road ahead) the system will detect this and, if necessary, send a subsequent text message (apologising!) with a renewed time.

If you have your groceries delivered from the Blackburn store, simply login to the Tesco.com grocery website and you'll see more information about how to register for the SMS service.

We will be rolling this service to several more stores over the coming weeks. Just login to the Tesco.com grocery web and you'll see more info if it applies to you.

The service is running in R&D mode at the moment as we tune the software to make sure everything is accurate. Once we're happy my production colleagues are rather eager to take it on and roll it out nationwide.

After all, we work for Tesco.com but we're all customers too!

Sunday 2 November 2008

My presentation at Microsoft PDC2008

Here is the video of my presentation at the Microsoft PDC 2008 keynote by Scott Guthrie, Corporate Vice President in the Microsoft Developer Division (who introduces me).

My 'glamorous assistant' operating the HP TouchSmart PC is Conchango's Experience Director, Paul Dawson, whose team researched, designed and built the prototype for us.

Running time 5:54.

(UPDATE: I have moved the video to the 'tescocomtv' account on YouTube so if you have bookmarked the old link it is no longer available).

Also at http://www.youtube.com/watch?v=kSJBKXlz9Wg

Download a near-HD version (Windows Media Video format) from
http://www.lansleytech.com/videos/tescoatmicrosoftpdc.wmv



Saturday 1 November 2008

Closeup of the Tesco Shopping Application shown at Microsoft PDC

Just arrived back in London after a great week at the Microsoft Professional Developer's Conference (PDC2008) in Los Angeles where the announcement of the forthcoming Tesco API and the Tesco Shopping Application went down a storm!

I'm not just 'saying that' - the unexpected huge 'wall' of joyous applause that crashed into me when I was on stage when the webcam barcode scanning was demonstrated is not one I'll forget (see video blog entry).

Here are some screenshots of the prototype Tesco grocery home shopping application to give you a sense of what we are trying to achieve with this prototype. It's all about quick and convenient shopping for groceries., as well as easily finding cheaper alternatives and remembering interesting items you wish to buy in the future.

The prototype application was researched and developed for us by Conchango, a company specialising in designing excellent experiences in software. As you can see, they raised their game pretty high to help create this groundbreaking application.


Above is the 'corkboard'-style main screen. It accesses feeds from Flickr, Live and other RSS-compatible photo feeds that you can set up.

The calendar is 'powered' by Window Live/Hotmail so if you have a Live-ID you can let the application load up your calendar to display various entries you have added. Usefully, the application stores your booked Tesco delivery slot. You can also plan meals by dragging products (and whole meal ideas and recipes) into the calendar in order to plan and budget. This is saved into your Live calendar which can be accessed from the web and other applications, too.




Above is the result of a product search. You can move products into your shopping basket or favourite lists by dragging them from their location across into one of the circled areas.


Here is an example of a recipe. You can alter ingredient levels by altering the 'serve' number. You can then drag the whole thing into a shopping basket.

The whole application is at the prototype stage and we're going to be testing it over the coming weeks and months alongside the Tesco API which is at the prototype stage and going through its first peer review.

My goal is to make the whole thing fully live by Summer 2009, and 'quietly live' (or what the rest of the internet likes to refer to as 'beta'!) much sooner.