Beacon Idea #5: Retail, Analysis, and Dynamics CRM

So if you have been reading my blog frequently over the past few months you will notice that I have been doing  lot of mobile-related development, mostly with the Xamarin platform (which I absolutely love, btw).

One of the projects that I’m working on will involve the use of beacon, or iBeacon, technology.  I thought I would spend a little time today discussing how you can unite beacons and Dynamics CRM to collect a variety of information about your prospects and customers.

A Bit about Beacons

iBeacon is Apple’s technology for indoor positioning, where you need a finer-grained position that can be achieved using GPS. Apple decided to make the iBeacon specification available to other vendors and companies like Qualcomm and Estimote have products that are iBeacon compatible.

There are alternative beacon technologies available that are not iBeacon compatible, so for the sake of simplicity, I’ll just refer to everything as a “beacon” to keep things generalized.

Beacons are just transmitters that broadcast their position using Bluetooth Low Entergy, or BLE.

The intelligence dealing with where the beacons are located and their distance from the receiver, must be handled within an application that has connected to a mobile device’s BLE signal.

Currently, late models of iPhone, Android, and even some Windows Phones are equipped with a BLE interface which will allow you to write applications that can search for an recognize beacons.

Again, the beacon just announces, “here I am” and the application on the mobile device does the real work of “seeing” the beacon and deciding upon the next course of action.

The Retail Connection

One of the most talked about areas for the use of beacons is in a retail environment – and the possibilities are truly endless. 

Here is a sample scenario:

Customer Visit Tracking

It is possible to install beacons various locations within a store and track the following:

  • When the customer entered or exited the store
  • The amount of time spent within the store
  • The departments visited
  • The amount of time spent within a department
  • Purchases

All of these data points are primarily centered around a customer having an application on their phone that can interact with the beacons and send the data back the the cloud-based collection system.

Data Analysis

The one thing you really need to be careful of when capturing beacon data is the amount of data produced. The data flow will dictate the design of your beacon data storage and what tools you use to perform the analysis.  There are several possibilities here:

  • Estimote has built-in analytics for their beacons
  • You can roll your own using Azure App Services to both record the data and perform analysis
  • Add it to your internal SQL Server data system and use tools such as PowerBI to perform the analysis

The Dynamics CRM Connection

Let me state right up front that Dynamics CRM is not where you put your beacon data. There will, in most cases, be too much data and there are better, faster, and cheaper alternatives for both the storing and analysis, like the ones mentioned above.

After you have collected the data and performed the analysis is when you connect it to Dynamics CRM.  The primary use of any Customer Relationship Management system is to record data about a customer:

  • When do they shop?
  • What do they like to buy?
  • Are they purchasing for them selves or a family member?
  • Do they have a brand-preference or a deal-preference?

Use your analysis tools to deliver that type of information by using data obtained from their purchase history, the beacon data, and your web site. That is how you can improve the interaction of your company with the customer.

Make sure your marketing department makes good use of this new data and delivers to the customer the types of offers that make sense to them.

The key point here is value. You need to constantly be providing value to the customer.  It is not always about you; and yes, you need to sell things to stay in business, but it is much easier to sell to people who want to buy.

The Big-Brother Creepiness Factor

This type of process is fairly high on the big-brother creepiness factor but is really saved by the fact that the customer has opted-in to this program by:

  1. Installing the application on their phone
  2. Setting their personal preferences to allow their activities to be tracked

Physical Retail vs. Online Retail

What is so very ironic about this entire conversation is that Online retailers already collect this type of data each and every time a customer visits their web site.  Some are much better than others, but they all do it to a certain extent.

Deploying a technology like beacons to a physical retail store gives that company the ability to collect, and hopefully use wisely, the same types of data that their web site produces.  When you combine those two sets of data together, you can generate a more complete picture of the customer.

Conclusion

All of these things we’ve discussed today are fairly easily done, just remember one extremely key point: Do not be a pest. 

One one likes a pest, either in the online or physical retail world.

Taking screen shots of a mobile application

There was a really great thread on the Xamarin Forms forum yesterday regarding taking screen shots of your mobile application. I thought I would share this information here to summarize the conversation.

From Outside the Application

Greg Shackles wrote a great article about using Xamarin UITest to generate screen shots using the built-in functionality of the testing mechanism.

Fredy Wenger recommends using SnagIt, which I also use for all of my screen shots, regardless of platform.

From Inside the Application

Daniel Hindrikes created a ScreenshotManager component to handle the work from within your application. This work is documented here.

Norman Macay also pointed us to a previous post about collecting screen shots for Android.

All in all, there are a variety of methods, you just need to select the one that works for you, given your situation.

Beacon Idea #4: Restaurant Check-in and Loyalty Program

Xamarin is holding contest to get ideas of how beacons (iBeacons) can be used to context-aware mobile applications.

I have been doing a lot of research on beacons so I thought I’d share some of my ideas.

The Concept: Restaurant Check and Loyalty Program

You would like to create a program that rewards your regular customers and offers them rewards, such as free food or drinks, the more often they drop in.

The Problem

You need to track customer visits without resorting to any manual operations (you’ve got a restaurant to run),

The Solution

This solution will involve creating an application for your store that will provide a variety of functionality, but for this conversation, we’ll just discuss the part involving beacons.

You place a beacon near the front of the restaurant, probably in the hostess stand and encourage your regular customers to download your free restaurant application. Part of the functionality of the application is to monitor for the “check-in” beacon. When a customer walks into the restaurant, the application locates the beacon and sends a check-in report back to the web service that handles the check-process, which rests in Windows Azure.

After recording the check-in event, the web service increments the “reward counter” then checks to see if it is greater than seven. If so, then a notification is sent back to the customer’s phone (using Azure Notification Hubs) which is displayed in the application as a coupon giving the customer a free item from your menu. The reward counter is reset to zero and the reward process will restart upon the next visit.

Upcoming Training: JavaScript Development with Dynamics CRM 2015

Hi Everyone,

I am holding my JavaScript development workshop in conjunction with the CRMUG Academy.

Visit this page to register.

Here are the details:

The goal of this 2 day class is to provide every student with a very thorough introduction to using JavaScript within Dynamics CRM. This is an Internet-based, hands-on workshop with each student provided their own virtual development environment for the duration of the class. Each classroom day will run from 10:45am to 5:00pm Eastern with the virtual environments available for student use until midnight on the second day.

And thanks to our virtual development environments, the majority of our time will be spent actually developing JavaScript solutions for Dynamics CRM. Think labs. Lots and lots of labs. And homework. There will be homework.

We’ll cover the following topics:

  • Creating a development environment ?Setup

    • Source control

    • Working in teams

    • Working with Visual Studio

  • Working with Web Resources

  • Working with Solutions

  • Working with Forms ?JavaScript libraries

    • Form events

    • Form Event Handler Execution Context Reference

  • Working with the Xrm.Page Object Model ?Working with Collections

    • Data operations

    • Tabs and Sections

    • Working with Controls

    • Working with iFrames

    • Working with Navigation Items

  • Ribbon button and JavaScript connection

  • Opening Dynamics CRM Forms and Web Resources via JavaScript

  • Using the XrmSrcToolkit to CRM-related data operations

We will be using about 75 of the methods found in the Xrm.Page object model so you should leave class with a fairly good understanding of where things are and how to access them. If we have time, we will also cover some of the freely available JavaScript components that can be used to aid in your development efforts and to increase your user’s productivity.

Students will also receive a draft copy of my upcoming book on Dynamics CRM JavaScript development along with sample code and utility web resources that should help you kick start your CRM JavaScript development efforts.

Using the XrmSvcToolkit to perform the following operations using JavaScript:

  • Create

  • Retrieve

  • Update

  • Delete

We will also be covering advanced topics such as working with the Dynamics CRM tablet client.

Student Prerequisite Knowledge:

  • Each student must have working knowledge of Dynamics CRM 2011, 2013, or 2015.

  • Knowledge of JavaScript is also required.

Preparation: The detailed instructions for connecting and attending the class will be sent one to two days prior to class. Students have the option of connecting to the class via conference call or VOIP. If using VOIP, a headset with a microphone is strongly recommended. Your instructor will use a hands-on training environment. You will receive a separate email with the setup instructions, and a dual monitor is strongly recommended to facilitate navigation.

Let me know if you have any questions.

Thanks, Mitch

Beacon Idea #3: Find my friends

Xamarin is holding contest to get ideas of how beacons (iBeacons) can be used to context-aware mobile applications.

I have been doing a lot of research on beacons so I thought I’d share some of my ideas.

The Concept: Find my friends

You are at a conference and need help locating your friends who are somewhere on the Expo Hall floor during the opening reception.

The Problem

This is an idea I have been trying to work through for quite some period of time due to the number of technical issues involved. Here are some of the issues that we will run up against:

1. Everyone must have the Conference application installed, since it will have the beacon reception software added to it.

2. Everyone must have a phone that is Bluetooth LE compatible, which is currently available on the later versions of each operating system: iOS (7), Android (4.3), and Windows Phone (8.1)

3. The beacon software must be compatible with the phones being used.

The Solution

Like the problem, the solution involves several phases or steps:

1. Add a beacon to each vendor’s booth.

2. Add beacon detection to the Conference application.

3. The Conference application will also need to be modified to add the Find My Friends functionality, which is an entirely different development effort.

Application Architecture

This solution will require several components, each of which will handle a specific requirement.

Friend Selection

It is assumed that the name of everyone who is at the conference will be available to the conference application. This list will be used to locate your friends.

Beacon Identification

This feature merely identifies the closest beacon. That information is then sent to a cloud-based server which will record the information for later reference.

Friend Finder Service

This cloud-based service will actually perform a search for a specific friend using the data submitted by the Beacon Identification service.

Friend Map

This will show you a map of the conference Expo Hall floor with the approximate location of your friend.

Bells and Whistles

The above features are just the basics to make the application function. Here are some other things you could add to make the experience much more enjoyable for the users:

  • Real-time location, which would send a “ping” to the user’s phone to locate or verify their immediate location.
  • Notifications and messaging to send the friend a notification like, “I’ll meet you there in two minutes.”
  • The friend map can be modified to track multiple friends
  • You can send a notification to a group of friends instead of just a single friend (similar to the GroupMe application)
  • A side-effect of the beacon is the ability to record a person stopping by their booth. You would need to make some adjustments to the proximity calculations but it could probably be done, and eliminate the need for scanning of a visitor’s badge at the booth.

 

Big-Brother Creepiness Factor

This type of application rises fairly high on the big-brother creepiness factor so you can always have an “opt-out” option within the Conference application so the user can turn off all tracking features or just some of them.

Beacon idea #2: Don’t touch my beer

Xamarin is holding contest to get ideas of how beacons (iBeacons) can be used to context-aware mobile applications.

I have been doing a lot of research on beacons so I thought I’d share some of my ideas.

The Concept: Don’t touch my beer

This little idea will help insure that your beer remains where you put it.

The Problem

Occasionally you have to work late at the office; really late.  On such occasions you might like to enjoy a couple of beers as you wait around to verify your work. The issue is you do not have a personal refrigerator in your office so you are forced to put your two beers in a paper bag with your name on it in the shared kitchen refrigerator. 

Unfortunately, and on more than one occasion, you have opened the fridge to find that your beer is no where to be seen. (I’m talking to you, Lyn).  This makes for a most disappointing end to the evening.

The Solution

This solution involves an Estimote sticker and a small application that has been created to monitor the sticker for movement. Estimote stickers have a variety of sensors and can actually report back changes in orientation and movement. You set up a trigger to notify you should your paper bag move more than two feet which will trigger an alert on your phone.

This will allow you to run to the kitchen to see who is handling your beer (Lyn).

The Velociraptor Option

An addition to this type of security measure would be the connection to a a micro-drone that you also keep in your office. Working in conjunction with a 3-letter federal agency (which must remain nameless, of course), you have developed some custom software that ties the drone to the beacon, allowing the drone to home in on the beacon so that the on-board camera can take a picture of the offender, as well as to take, “alternate actions,” which again, I really can’t talk about at this point.

Beacon Idea #1: Did I take out the trash

Xamarin is holding contest to get ideas of how beacons (iBeacons) can be used to context-aware mobile applications.

I have been doing a lot of research on beacons so I thought I’d share some of my ideas.

The Concept: Did I take out the trash?

My city picks up trash and recycling on a weekly basis, on Monday mornings. You need to have your trash bins on the curb by 7:00am because the trucks come rolling through somewhere between 7:01am and 5:00pm, and it’s not a good thing to miss a pickup.

The Problem

Sometimes I work late on Sunday night and sleep in the next morning.  And let me tell you: Nothing will make you move quicker than to hear the roar of the diesel engine as it starts and stops all the while rolling ever closer to your house as you hurry to slip on your pants and get the bins to the curb before they get to you.

The Solution

The solution is actually quite simple and it should work something like this:

1. Stick a beacon on the trash bin.

1a. Note the distance from the trash bin in the garage, to your beside table, where I will assume your phone can be found when you sleep.

2. Create an application that will allow you to send a local notification (iOS) at 6:50am

3. When the application receives the notification, it will wake up and check the location of the beacon.

4. If the location of the beacon is greater than the “resting” location for the trash bin, while in the garage, then do nothing.  However, if the location of the beacon is within the calculated range of the garage, display a notification with sound that will alert you that you need to jump up and get the trash to the curb before the truck comes by.

Announcing Teaching on Tuesdays

Hi Everyone,

I have had this idea for a free webinar series that I call Teaching on Tuesdays.  Mostly because they will be held on Tuesday.

The idea is that I take a topic and have a webinar to introduce people to that topic and maybe get some questions answered that they may have.

The webinars will be free and will generally last between 30 and 60 minutes each.

I’ve created a Google Moderator site to record, which you can see here.  There are a few topics already added but feel free to add your own topics and vote up existing topics as you feel the need.

Please let me know what you think.

Thanks, Mitch

Dynamics CRM Developer Tip O’ the Day: Working with Tabs

I learned an important lesson yesterday, again, on working with tabs with Dynamics CRM forms.

There are several ways to reference tabs when writing JavaScript and using the Xrm.Page model.  You may reference the tab by number, like this:

Xrm.Page.ui.tabs.get(2)

Note: Tabs are numbered starting with zero for the first tab.

Or by name, like this:

Xrm.Page.ui.tabs.get("tab2Tab")

It is always a best practice to use the name of the tab instead of the number because if you ever move the tab around the form, then the number will no longer be valid and any JavaScript you have written which references a particular tab in such a manner will start to cause some very strange user experiences.

By using the name of the tab, you will always be referring to the same tab, no matter where it may be located on the form.

In my particular case, this was a Dynamics CRM 2013 installation that had been upgraded from 4.0.  My JavaScript conversion tool, Transformer!, automatically converts the tab references using the number because of the naming convention applied to the converted forms, which is a GUID.

I had merged the original Information form with the new Entity form and in doing so, I had inadvertently moved the tabs out of place.  The logic in JavaScript involved changing the title of a tab as well as showing and hiding one of two different tabs, based on the value of an Option Set field.

I worked around my issue by renaming my tabs from the GUID value to tabxTab, which was the original CRM 4.0 naming format then modified my JavaScript to use that name instead of the number.

By the way, the same practice also applies to form Sections, which are named and referenced in a similar manner.

Dynamics CRM 2015 Spring: Plugin Trace Log

Yay! Finally, the good folks on the Dynamics CRM team have added the ability to log errors that occur in plugins and custom workflow activities.

Plug-In Trace Log

This is a new entity that we can access from the Settings, Customization area:

image

 

Setup

You need to enable the logging of exceptions to the plug-in trace log entity. Navigate to Settings, Administration, System Settings, then select the Customization tab.

image

Change the Enable logging to plug-in trace log setting to Exception.

Usage

Any time you have an unhandled exception in your plug-in or custom workflow activity, a log will be written to the trace log:

image

The detail looks like this:

image

Final Thoughts

This is a huge advance for those of us who develop with Dynamics CRM. Prior to this feature, we found I very difficult to record exception information, especially in CRM Online because any record we recorded to a logging entity was erased and when the transaction was rolled back, which was the common occurrence when exceptions were encountered.

This new entity and feature will be a most welcome addition.

Sharing information and lessons learned with other developers

Sign up for our new KnowledgeBits service and get news, tips and tricks and more, delivered straight to your inbox.