Wednesday, 30 May 2007

BlackBerry non-corporate email account setup

Took me a while to find this so I thought it was worth a post.

We use the BlackBerry Enterprise Server to redirect emails to our BlackBerries. I wanted to be able to access my personal email accounts on the same device.

Conceptual leap for me, apologies if it was obvious, was that I needed to setup the BlackBerry Internet Service with my carrier.

If you're on Vodafone UK then you go to mobileemail.vodafone.net enter your PIN and IMEI and you're away.

Sunday, 27 May 2007

State of the UK Mobile Content Market

Went to the MDA Member Forum this week. The subject was the state of the UK Mobile Content Market.

Saw some interesting presentations by analysts from Informa as M:Metrics as well as Graham Brown of both Wireless World Forum and Mobile Youth.

In short the ring tone and wallpaper market is dead, too many subscribers have fancy phones that allow them to share content, take great photos and play MP3s whenever someone calls.

Mobile Youth focus on researching the the mobile habits and views of children and their recent research came up with some interesting findings for the network operators. When asked what network they were on, many said 'Nokia' or equivalent. This could be terrible news for the mobile networks. If there is no association with them providing the services then where is the loyalty?

The mobile networks are desparately trying not to become a bit-pipe. If they let that happen they will essentially become mobile ISPs and there is no value in that for them. Unfortunately off-portal is where the growth in consumer spend is going to come, according to Informa.

In response to this demand for off-portal access they are placing a Google search box at the head of their portals, allowing people to leave their controlled, revenue generating environments and out into the frontier land of the Internet. The problem is how do the generate any money?

The Payforit scheme (sorry couldn't find a link) or Trusted Mobile Payment Framework is an attempt by the operators to provide a payment mechanism for this off-portal world. This was officially launched this week. Given the operator's propensity for significant margins on their payment solutions, see premium SMS outpayments, I think they're going to face stiff competition from services like PayPal Mobile.

An alternative is to keep the subscribers on-portal by providing compelling and exclusive content. This can be subsidised through advertising or sponsorship, repeating a business model that has operated for decades in TV, radio and printed media.

Mobile TV is the highest profile example of this new generation of services, although notably the subcriber is currently paying for the privilege in Vodafone's case. Check out my previous post Is Mobile TV the new WAP? for my views on the current offerings.

So the industry that has got fat on ring tones and wallpapers is trying to establish itself as a necessary part of the mobile internet. The problem is they could end up just providing the plumbing.

Thursday, 24 May 2007

Is Mobile TV the new WAP?

Mobile TV is being touted as the next big revolution in the way we use our mobile phones. Wherever we are, we will be able to have live TV streamed to our handsets.

I'm seeing distinct parallels with the launch of WAP services on handsets. It was presented as giving us an Internet experience wherever we were. As we all know this was not the case and it fell very flat. Technical limitations on both the handset and the network meant the service was worse than Teletext.

Even today with the rise of 3G handsets and services, data from the MDA shows WAP traffic is stuck at around 16 million page impressions per month.

I believe WAP traffic will increase as discussed in a my previous post Mobile Internet, finally it's time has come but Mobile TV, are the networks really ready? Have they thought it through?

This came up on SMS Text News post recently where one of the contributors had found information that the Vodafone service can only support 15 users per mobile base station (BBC News - Mobile TV predicted to be a hit). That was fifteen, 15, midway between 14 and 16. Given how many people a mobile base station serves, surely that's a crippling limitation.

To top that the recent Vodafone ad campaign, 'Be a Train Potato' suggests we'll be watching TV on the train. Given that networks are unable to maintain a voice call on the majority of train lines around the country, how on earth are they going to maintain a stream video session.

Thirdly, and possible most importantly, people will naturally compare the experience with their televisions. Now I it's not fair to compare a mains powered, 28+ inch dedicated audio visual system with a 4 3 foot ariel mounted 2 stories up with a power constrained, multi-function device, but people will. Call it TV and they'll expect a TV like experience.

I understand the operators have a lot riding on this. People are becoming increasingly resistant to paying for mobile content so operators have to move to a subsidised model. Advertising and sponsorship around media content has worked for decades on TV, radio and more recently the Internet. People are comfortable with advertising around TV programs. But if the experience is a poor one they won't watch anything.

One option to improve the user experience would be to provide downloads that can be watched later like the Apple video iPods. This would greatly enhance the user experience. Data from m:metrics show increasing numbers of people are listening to music on their mobile phones so why not video. Unfortunately for the operator this is side-loaded, ie from a PC and not over the operators network.

In my opinion this is more in keeping with the viewer in control model that has been pioneered with podcasts. I'll download what I want and watch it when I'm ready on the train, tube, plane, wherever. The media owners should still be happy with this approach. They can offer their latest shows for online download, complete with sponsor's message or with a more direct revenue model. People may well watch them on their mobile phones but the operator isn't involved.

Removing the operator from the value-chain could actually increase the quality of the content available. One less entity taking the piece of the action means more money for creating the content in the first place.

So we have severe technical limitations, a user experience that is no where near the quality of the existing method of delivery and an alternative delivery mechanism that improves that experience as well as removing a link in the value chain.

What is it I'm not getting?

Thursday, 17 May 2007

SMS Alerts from Salesforce [3] - Send an SMS

I've realised two things writing this series of posts.

  1. I need a different template if I'm going to include code samples
  2. My blog host does not support uploading source code and projects for download

So, once I've complete this project, I'll collate it all and summarise it as a Code Project article. I'll post the link when I'm done.

So back to the matter at hand. We've completed the setup of the various elements, time to start tying them together. Today's post focuses on developing the code in the notifications method of the CaseAlert web service.

The first step is to retrieve the Case object passed through to the notification

CaseNotification caseNotification = (CaseNotification)notifications1.Notification[0];
Case caseItem = (Case)caseNotification.sObject;

I then setup the binding to the Salesforce API using a proxy I made earlier from the Salesforce WSDL. I passed in the Session ID contained with the notification. One gotcha, you have to specify the Url value which should be passed in by the calling service. This meant I had to add it in to the test harness application.

sforce.SforceService salesforceBinding = new sforce.SforceService();
salesforceBinding.SessionHeaderValue = new sforce.SessionHeader();
salesforceBinding.SessionHeaderValue.sessionId = notifications1.SessionId;
salesforceBinding.Url = notifications1.EnterpriseUrl;

Now I'm getting a lightweight Account object containing just the Name and OwnerID for the account. If you're new to the Salesforce API this retrieval of objects by specifying the fields and object type along with the ID can seem a bit arcane. It's actually really useful as by keeping the interface generic it allows you to request custom fields as well as those that are inbuilt.

sforce.sObject[] ret = salesforceBinding.retrieve("OwnerId,Name", "Account", new string[] { caseItem.AccountId });
sforce.Account caseAccount = (sforce.Account)ret[0];

Doing the same this time with the User object which corresponds to the Owner of the account.

ret = salesforceBinding.retrieve("MobilePhone", "User", new string[] { caseAccount.OwnerId });
sforce.User accountOwner = (sforce.User)ret[0];

The SMS message body is constructed using the data retrieved in the previous steps. If you want to include different parameters then just get more fields the Account and Owner objects.

string messageBody = string.Format("Your account {0} has opened a new Case ref:{1}. Call support on 0845 356 5759 for details", caseAccount.Name, caseItem.CaseNumber);

Now the really easy bit ;) sending an SMS. For this code snippet I've create a web reference called esendex to the SendService of the Esendex XML Web Service. You will need to have an account with us and enter the appropriate credentials to use this code as is. If you haven't got an account yet, then feel free to setup a trial.

esendex.MessengerHeader header = new esendex.MessengerHeader();
header.Account = "EX0000000";
header.Username = "user@company.com";
header.Password = "xxxxxxx";
esendex.SendService sendService = new esendex.SendService();
sendService.MessengerHeaderValue = header;
sendService.SendMessage(accountOwner.MobilePhone, messageBody, esendex.MessageType.Text);

Return a ACK response back to the calling service.

return new notificationsResponse();

Would you believe it, it worked first time! Well, after I'd set the EnterpriseURL property in the test client.

Next time I'm going to setup the workflow rule in Salesforce and see if the whole thing hangs together.

BlackBerry Salesman - easiest job in the world?

As an Orange Partner in the UK we get invited to internal product fairs to keep their sales teams up to date with our service offerings. Also in attendance were RIM and their very shiny, very latest handsets.

The stand was inundated during the breakouts from the product briefings with people admiring and stroking the 8800. I'll be honest, it was the first one I'd seen in the flesh and I think I've concluded it's not for me. It's like a big Pearl which looks great but I know that sleek exterior would be scuffed in no time at all if my record with mobiles is anything to go by.

Chatting to one of our sales team who was their yesterday, apparently what I saw was nothing compared to the clamouring scrum that developed when the produced a Curve.

Their product marketing and development has been fantastic. They've started with a ratherer utilitarian device that works very well and a lot of people want. These have now developed into shiny, sleek objects of desire that send grown men weak at the knees.

Now where's that barrel, right in I get, oink, oink!

Message Response Time : UPDATE

I posted recently about the 160 Characters survey on Message Response Times. Well results are in and their report can be found at Stats & Research: Five Minutes To Respond

Key points for me were:

  • 84% of people expect a response to an SMS in 5 minutes
  • a similar number said they would respond to a personal SMS within 30 mins
  • yet only 56% said they would respond to a work SMS in that time
  • 31% people would respond to emails the following day, I bet they weren't BlackBerry owners!

The conclusion seems to be that SMS remains the king of short communication requiring a quick response. There did seem to be an implication that people at work were becoming less responsive to SMS.

I'd be really interested to find out the industry sectors the respondents came from. Did the survery reach outside of the mobile industry and if not, are we the best people to represent usage of mobile messaging.

Sunday, 13 May 2007

SMS Alerts from Salesforce [2] - Creating the Web Service

Once you've defined the outbound message and specified and Endpoint URL, when you view the definition you'll see a link to the WSDL. This is the interface definition for the web service that the service generation tool will require to create the web service code.

The .net framework SDK ships with a file called wsdl.exe. This is most often used for generating web service client proxies but used with the /server switch, it generates an abstract server class that forms the basis of our web service. In the default installation of Visual Studio 2005, it can be found in C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin.

So I downloaded the WSDL to a file call CaseAlert.wsdl and ran the following command line

wsdl.exe /server CaseAlert.wsdl

This created a file called NotificationService.cs containing the abstract service class and supporting data types to enable the service to receive calls from the Salesforce systems.

I then created a web project called salesforcelistener and dragged the NotificationService.cs file into the App_Code folder. My initial thought was to create a new WebService called CaseAlert in this project and inherit from the abstract NotificationService class.

Unfortunately this didn't work, the methods of the base class were not exposed as a web service methods. I'm guessing this is because of the reflection algorithms that are used to generate the WSDL. So I deleted the CaseAlert code behind page and turned the NotificationService into a concrete class for the CaseAlert web service.

[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Web.Services.WebServiceAttribute(Namespace = "http://soap.sforce.com/2005/09/outbound")]
[System.Web.Services.WebServiceBindingAttribute(Name = "NotificationBinding", Namespace = "http://soap.sforce.com/2005/09/outbound")]
[System.Xml.Serialization.XmlIncludeAttribute(typeof(sObject))]
public class CaseAlert : System.Web.Services.WebService
{
[System.Web.Services.WebMethodAttribute()]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute("notificationsResponse", Namespace = "http://soap.sforce.com/2005/09/outbound")]
public notificationsResponse notifications([System.Xml.Serialization.XmlElementAttribute("notifications", Namespace = "http://soap.sforce.com/2005/09/outbound")] notifications notifications1)
{
return new notificationsResponse();
}
}

Fired up the project and success:

Test Harness

Rather than use Salesforce workflows to generate test messages, and potentially annoy the live users of the system, I generated a harness so test messages could be fired at will. As this is essentially a web service this is incredibly simple.

While the web service project was running, I created a new console application project. Created a web reference from this to my web service (called salesforceoutbind) so I can make calls as required.

Remember the Session ID, this is value returned in response to a successful login request to the Salesforce API and can then be used for all subsequent calls to the API. So I added in the proxy cs file supplied with in the Salesforce sample C#.net application which includes all the code required to set this up.

The code for my console app is below. Logging and error handling excluded for brevity.

static void Main(string[] args)
{
SforceService salesforceBinding = new SforceService();
// amend these with your details
LoginResult loginResult = salesforceBinding.login("user.name@company.com", "password");

salesforceoutbind.notifications n = new salesforceoutbind.notifications();
salesforceoutbind.CaseNotification cn = new salesforceoutbind.CaseNotification();
salesforceoutbind.Case c = new salesforceoutbind.Case();
cn.sObject = c;
c.AccountId = "00120000004SPkT";
c.CaseNumber = "001000";
c.Subject = "My New Case";

n.Notification = new salesforcelistenerclient.salesforceoutbind.CaseNotification[] { cn };

n.SessionId = loginResult.sessionId;

salesforceoutbind.CaseAlert alert = new salesforcelistenerclient.salesforceoutbind.CaseAlert();
alert.notifications(n);
}

I can now push messages to the listener with complete control over the data that is passed in. Next time I'll call back into the Salesforce API to get the contact details for the Account Manager and send them a message using the Esendex SMS XML Web Service API