Sunday, August 30, 2015

Creating a Codeless Opportunity Payment Schedule in CRM

This blog is a republishing of the original I did for the Microsoft Dynamics CRM Team Blog which you can find here.

The new calculated fields provide a lot of opportunity for codeless configuration in Dynamics CRM. In this example I will walk through creating an automated payment schedule in CRM for an Opportunity using calculated fields and Dialogs.

Business Case

For larger sales, we sometimes stagger payments over a period of time. Perhaps this is a lease-purchase arrangement or maybe a lay-by payment system. While, in theory, aspects such as interest, deposits and final lump payments could also be incorporated, I will leave these as an exercise for the reader.

The Key Entities

For this example, I will work with two entities: Opportunities and a custom child entity called Payments. In terms of the fields I am using we have:

  • Opportunity
    • Days Between Payments (Integer, How many days between each payment)
    • Payments Start Date (Date, When payments start)
    • Total Payments (Integer, The number of payments)
    • Estimated Revenue (Currency, The out of the box field to represent the total amount being paid back)
  • Payment
    • Amount Remaining (Currency Calculated, After this payment, how much remains to be paid)
    • Days Between Payments (Same as the field of the same name on the Opportunity)
    • Due On (Date Calculated, When the payment is to be made)
    • Payment Amount (Currency Calculated, How much the payment is for)
    • Payment Number (Integer, The nth payment)
    • Payments Start Date (Same as the field of the same name on the Opportunity)
    • Total Amount (Same as the Estimated Revenue field on the Opportunity)
    • Total Payments (Same as the field of the same name on the Opportunity)

In an ideal world, I would not repeat the fields on both the Opportunity and the Payment record, keeping them on the Opportunity record. However, it is not possible to refer to parent fields in a calculated field so it is necessary to denormalize and keep the values in both places.

The Calculations

The formulae for the calculated fields are:

Amount Remaining


Due On


Payment Amount


In theory, with the values we set on the Opportunity and the Payment Number, all other numbers can be calculated.


Automating with Dialogs

In principle, we could leave the solution there and manually create Payment records from the Opportunity. Assuming we map the fields down from the Opportunity to the Payment entity, all we need do is create a new Payment record from the Opportunity, enter the Payment Number and the system will do the rest. However, for a schedule with 100 payments, this is a lot of work.

This is where Dialogs come to the rescue. With Dialogs we can automate the creation of all Payment records. To do this I will create two Dialogs:

  • Payment Scheduler: This initializes the loop and creates the first payment record
  • Payment Creator: This is a child Dialog that calls itself and creates all the other Payment records

What is interesting about this arrangement is that it appears to circumvent the infinite loop detection which can plague workflows when we try to call them to generate multiple records. I tried creating 100 payments and it while it took a few seconds of processing, it worked fine.

The Payment Scheduler looks like this:


Both Dialogs run from the Opportunity entity. In this one we confirm the four key constants, held on the Opportunity (Total Amount, Start Date, Days Between Payments and Total Payments) and write them back to the Opportunity with the Update step.


For some reason I could not get the Estimated Revenue to appear for the Prompt and Response default value, even though I could display it as part of the prompt. If this is a problem, you may need to create a separate Total Amount field.

We then create the first Payment.


Finally we call our looping Dialog to create the rest of the Payment records, passing it the total number of Payments.

The looping Dialog looks like this:


Firstly, it takes in the previous Payment’s number and if the last Payment was the final Payment i.e. Payment Number = 1, the Dialog ends. If this is not the case a new Payment record is created.


We then update this record to reduce the Payment Number by one.


The next step in our Dialog is a bit of a dirty trick. We want to loop the Dialog but we do not want a Dialog page to appear many times. Every Dialog requires a Page with an associated Prompt and Response so, to meet this criterion, we embed it in an If-Statement which will never succeed (in my case the associated Opportunity name must be blank, which will never be the case).

Once past this, the Dialog calls itself passing through the Payment’s Payment Number.

The Final Result

The end result is a set of Payments against the Opportunity, evenly dividing the Opportunity total across all Payment records. If we want to keep track of when payment are actually made, we could add additional fields like a receipt number field or a simple tick box.

To create the Payment records, the user simply fires up the Dialog from the Opportunity.


Then, after making sure the four fields have values, they click Next and the Dialog shows its Finished screen.


After clicking Finish, the Opportunity now has a full set of Payments against it.



While a simple application of the tools, this shows how combining Dynamics CRM functions like calculated fields and Dialogs can create very powerful and intuitive tools for the user. In the past creating a tool like this for the user required plugins and extensive development with limited capacity for maintenance by the CRM Administrator. With this approach the CRM Administrator gets complete control of the tool and its behavior.

Wednesday, August 26, 2015

Salesforce: The Elusive Goal of Profitability

As some of you may know, my former employer, Oakton, was a partner with both Salesforce and Microsoft. While I did my best to judge fairly, any fear of bias is now removed as I have moved to KPMG. KPMG is “all in” with Microsoft especially with their cloud, ERP and CRM solutions. Do not get me wrong, their technology enablement arm also work with Oracle and products like Workday but, in terms of CRM, their path is pure. On to the analysis…

Last quarter, on the back of a lease termination, Salesforce made a small profit. Has lightning struck twice? Has Salesforce finally turned the profitability corner or are losses still the normal with non-GAAP reporting to cover it up?

There was also rumours of a mystery buyer looking to scoop Salesforce up. Who was this mystery buyer and why did they pull out? All will be revealed.

Salesforce Quarterly Results

The GAAP numbers, as reported to the SEC and taken from Salesforce’s web site. Any disparity to press releases, especially in regards to profitability, are an illusion created by ignoring certain expenses to generate what are called non-GAAP reporting. The promoters of non-GAAP reporting say it is designed to give a more accurate reflection of the day to day operations, ignoring those inconvenient outlying expenses. However, when the expenses you ignore are regularly occurring, this justification is harder to swallow. Also, I am yet to see a non-GAAP report which shows the business to be in a worse state than the GAAP numbers report. This is why I consider non-GAAP reporting to be little more than a public relations exercise to quell the nerves of nervous share holders and, in my opinion, it is not worthy of actual financial analysis. So here are the ‘real’, GAAP numbers.


2015 Q2

2015 Q3

2015 Q4

2016 Q1

2016 Q2







Subscription Revenue






Revenue Cost






Operating Cost






Salesforce Income






Highest Transaction






Transaction Growth QoQ






Revenue Growth # YoY






Revenue Growth % YoY






Revenue Growth % QoQ






Total Cost % YoY






Total Cost % QoQ












Staff Growth YoY












Growth Difference












Accounts Receivable












Expenses Relating to Stock Based Awards






Stock Based YoY







Numbers of Note

Transaction Growth

The transaction growth numbers are calculated from the largest transaction count of any day on, on the day of writing the blog. In other words, it is the highest level of activity in the last 30 days, every quarter.


Here is the growth in the last four quarters; it has gone from just shy of 25% growth quarter on quarter, to 5%. It is clear the number of transactions being conducted by Salesforce users is slowing down. My prediction is that, by next quarter, it will be near flat and the quarter after that will begin to drop.

So what does this mean? Well it means either:

  • The user base is doing less with Salesforce
  • The user base is slowing in growth
  • Salesforce software allows you to do the same stuff with less server transactions
  • The transaction fluctuations are settling down and my use of the highest transaction in the period is in error

My guess is it is a combination of the first two but it is a guess. I was hoping the revenue growth would give an indication of what is happening but not the case.

Revenue Growth

Looking at the quarter on quarter revenue growth, we see an interesting upturn in this quarter.


So, if the user growth is slowing down, it is not reflected in the revenue. It is a bit of a mystery. The only way I can resolve this is to speculate that Salesforce are focussing more on upselling to existing customers than trying to find new customers. Therefore, the revenue is increasing by having existing customers pay more per user without resulting in a significant increase in system use.

In terms of the growth difference between revenue and costs, for the quarter this has slipped into negatives (costs are growing faster than revenues). For year on year, while they have narrowed, revenue is still outpacing costs meaning long term profitability is still an option for the future.

Staff Growth

Staff growth (year on year) has slowed down again this quarter.


Here we see the last six year’s of staff growth and a three year moving average trend line. The growth continues to slow and, as it was last quarter, reflects a staff growth rate of five years ago. As with the last quarter, the slowing of factors such as staff growth and transaction growth suggests the business is finally slowing down.


Unfortunately, Salesforce was not able to maintain a GAAP profit this quarter, again slipping into a loss, albeit a small one ($850,000). Perhaps the rumoured buyer saw this coming and backed off.

The Mystery Shopper

Towards the end of April, there was speculation that someone was looking to buy Salesforce. My assumption at the time was either Google, Oracle or IBM. It turns out the shopper was much closer to home; Microsoft. This surprised me when I first heard it but follows a bit of a trend in their market acquisition strategy. To cite a similar example, let us consider Skype. Microsoft had IM and Lync so when they acquired Skype, it was a bit of a surprise, given they already had products which did similar things. However, by taking on the millions of paying Skype subscribers, they had a path for turning a profit as well and carving out a significant part of the instant messaging market.

I think this was a similar play. While Microsoft has Dynamics CRM, the only other horse in the race these days, according to Gartner, is Salesforce. If Microsoft managed to seal the deal, they would be the only vendor in the Gartner’s leaders quadrant. Unfortunately, Marc’s price was a bit rich and Microsoft pulled out.

Earnings Call Buzzword Bingo

Still no talk of profit, of course (seriously, the word was not mentioned once in the earnings call) but our usual suspects are there. In fact there were no new key words and no words dropped off the list.

For those new to the game, I take the transcript of the quarterly earnings report, up to but not including the question and answer session and run it through a word analyser. The result are the words at the front of mind of the the Salesforce executives. As long as the word is mentioned 10 or more times in the last five quarters, it remains on the list.


2015 Q2

2015 Q3

2015 Q4

2016 Q1

2016 Q2

Number of words



















































































In fact the only things of note are the steady decline in talk about analytics and the massive spike in Dreamforce mentions. Dreamforce is in a few weeks time so it is not too surprising.

Words on notice are “Marketing” and “Enterprise(s)”. One more quarter with less than ten mentions and they are off the list. Salesforce has ExactTarget aka the Salesforce Marketing Cloud. If it was doing great things, Marc would be talking about it as much as Dreamforce (which, to my knowledge, is Salesforce’s only profitable venture). The fact that marketing barely features on Marc’s radar makes me think the acquisition is not yielding fruit.

As for the diminishing importance of the enterprise, this surprises me a little. Marc used to be about the number of 7- and 8-figure deals he had done. These days Marc does not talk in these terms so perhaps he is finding more traction in the smaller end of town.

Google Trends

Let us see how “Dynamics CRM” and “” are trending on Google.


Blue is “Dynamics CRM” which holds steady. “” continue its linear drop. In terms of the region split, it is a story we have seen before. Salesforce is concentrated on the US domestic market.


While Dynamics CRM is more international.


We also see this in the city split. While Salesforce’s cities are in the USA and India.


Dynamics CRM is more metropolitan.


While the positions juggle a little from quarter to quarter, the names remain the same. Salesforce may be well known at home but, abroad, it is a different story.

Insider and Institutional Sales

A trend is emerging in the insider trades.


2015 Q2

2015 Q3

2015 Q4

2016 Q1

2016 Q2

Insider Sales






Institutional Sales






Since the spike in insider sales in 2015 Q3, sales have slowly tapered, dropping 0.1% each quarter. Similarly institutional sales are slowing. In both case they are still selling their holdings, just not as rapidly as before. What does this mean? Perhaps the prospect of someone buying Salesforce at a premium was giving them pause for thought. Now that the deal has fallen through, maybe we will see an upturn next quarter.

Looking to the Future

My last prediction was revenues of $1.66b and breakeven on the profits. In terms of revenue I was within 2% and they did pretty much break even so I call that as a successful prediction.

Next quarter I predict revenues of around $1.78b and another breakeven result.


Salesforce looks to be fighting for profitability but it keeps eluding them. Last quarter, based on a real estate deal, they did make a small profit but this was truly a once-off adjustment and the proof is their inability to make a profit this quarter. Hopefully, as the business slows down, costs will be reined in and Salesforce will return to the profits it used to have four years ago. While every quarter Marc claims it has been “the best quarter ever” or some similar hyperbolic statement, the day they make a sustainable profit and continue to grow that profit, as they once did, I may start believing him. Until then I will continue to believe the Kool Aid being passed around is little more than shareholder Snake Oil.

Tuesday, August 18, 2015

The Best Free Apps For Your Corporate iPhone

One of the perks of a new job are the new toys. In this case, my new employer has given me a Lenovo Helix and an iPhone 5s. I am familiar with Windows laptop/tablet hybrids, owning a Surface Pro, but I have never owned an iPhone before so it has been a bit of a learning curve. One of the drawcards of iPhones are the masses of free apps available, so I dived right in to work out the best ones.

This list is the distillation of a bunch of “best apps for business” articles, the relevant top 150 categories in the iStore and the apps I already have running on my Windows Phone (I used my personal phone in my last job). Here we go…

Miscellaneous Work Apps

General apps which make the little things at work a little easier


As a Windows user, PDF documents needing a signature ARE a hassle. You print them off, sign them, rescan them and then send them on. With HelloSign you import a PDf file into the app, add a signature and email it on. Too handy, and perfect when you need to turn documents around quickly.


Take photos of your receipts and it will auto-scan them for the totals and the merchant. You then collate them into ‘reports’ for your expense reporting. Too easy.

Dragon Dictation

An interesting app that automatically translates what you say into text for distribution on various channels e.g. SMS, social or email. It even works with my Australian accent.

Voice Memos

A default app which lets you record your vocal pearls of wisdom and then share them through messaging or mail channels as an m4a sound file. Great for recording those good ideas or blog topics when a pen is not in reach.


These are the apps to mostly do with traditional media e.g. books and newspapers.


Part of the default set of apps that came with the phone, this gives you some reading time when at those airport gates. Unfortunately many of the more popular titles give you one free magazine and then need you to pay to subscribe. Also, if your company has disabled iCloud on the phone, some titles will not work. One title which was free was “Whisky Magazine” which was a special edition covering American Whiskeys. Apparently I need to check out Woodinville in Washington state, a small drive out of Seattle when I go to the MVP Summit.


Similar to Newsstand, pick the topics and Flipboard will serve you articles to while away the hours in transit.


The default book app for the phone, there are free books worth a browse. In my case “Dr Karl’s Little Book of Trivia 101”


If the previous options hold no thrall, another default app is Podcasts with an excellent array of audio and video podcasts to choose from. For me, Good Game and Dr Karl on Triplej. Yes, I am quite the fan of Dr Karl.


My preferred music streaming service of choice. Give it a song and it will build you a playlist. If you are looking to relax after a tough day in the office, feed Pandora your favourite chill-out track and see what comes back.


I recently blogged about how I am a fan of my new Netflix service. When music is not soothing the savage beast, kick back with a great range of television shows and movies (for a subscription fee). Awesome for hotel rooms where the television service does not quite pass muster.


The default photo app. This is where your receipt photos from Expensify end up.


Apps for communication on various channels outside of the traditional phone and email.


If you are not on LinkedIn, you should be. Traditionally hailed as the tool of choice for lazy recruiters, I find it invaluable as a networking/sales tool. Curious about whether that old client is still with that company where you implemented CRM? Check them out on LinkedIn. Want to distribute your blog article to hundreds of professionals who might be interested? Post into a LinkedIn group.


Now owned by Microsoft, the pervasive VOIP service is ideal for making cheap calls on your phone while overseas. Just make sure it is using the local Wi-Fi service and not the carrier’s data service otherwise you may need to mortgage your home to pay for the call.


Another social channel I embrace (@leontribe for those interested), Twitter is SMS for the internet with all messages being public. Great for research on people and organisations and also a great way to consume information on practically any topic of interest.


Often maligned as a productivity killer, there are actually many of corporate and professional pages on Facebook. The Microsoft Dynamics CRM Facebook group is an excellent group rivalling the forums for the quality of responses to questions from end users.


The same messaging system that appears in Facebook is my preferred instant messaging tool on the iPhone. With this tool you get access to all of your Facebook friends without Facebook being permanently open. For all of the CRM MVPs around the world, Messenger is my tool of choice for reaching them for a quick question about Dynamics CRM.


This is the iPhone’s default messaging tool. By default it uses the iMessage system which means when you are talking to other iDevices, it does not use SMS for communication. Therefore, to keep the message channel consistent you might want to disable the iMessage option in the settings.


Another default app which I am yet to explore in detail. I understand it is a video chatting application similar to the video chatting feature of Skype. Given Skype does the job I will probably stick with that but it is there for those more used to the Apple way.


This is a group messaging system which allows you to create groups and message within that group. We use it at the MVP Summits to keep in touch but I imagine it will be eventually replaced by one of the other tools above. Not necessarily an essential app but it is one I use.


These are the Microsoft Office and related apps which, even on the iPhone, leave the imitators for dust.


I had the pleasure of trying out the Outlook app for Android and love it for what it is. It is not a patch on the Windows equivalent but it does have one feature which the Windows version does not, which is the “Focused” option. The Focused tab shows the emails in your inbox you really need to see as opposed to the regular missives from stores, those interest groups you belong to and so on. How it works it out I am not sure but it does a pretty good job. If I have half an hour at home to see if there is an important email in my inbox, I reach for the Samsung, not the Surface.

Fortunately, the Apple version of Outlook has the same feature. Instead of getting up to date on my Facebook wall while heading to work, with my iPhone I now check my Focused inbox. Microsoft need to bring this to Windows Outlook and, hopefully, they will very soon.

In terms of how it compares to iPhone Mail app, one annoyance for me with Mail was having to set up mailboxes to see other folders. The ability to merge inboxes is nice though in the iPhone Mail app and something worth having in the Outlook app. Overall though I think my preferences are more down to familiarity than any inherent gap in either product.

Excel, Word, PowerPoint

I doubt I will be creating any of these on the iPhone but they are there so I can read the files that come into my inbox. You can also link these apps to the OneDrive, OneDrive for Business and SharePoint services to access files there but be careful not to violate corporate policies by storing work documents on these, if your company has such a policy.


OneDrive is an inexpensive cloud storage option and does the job. You can even stream mp4 movies from it, if so inclined. Again, an option in hotel rooms or Wi-Fi enabled transit lounges. Also, remember to comply with corporate policy if they have rules about storing files on third-party cloud services.

Lync 2013

Now known as “Skype for Business”, the app still bears the old name. I am struggling to get this app to connect to my work’s Lync server but, for the rest of you, try it. Even the staunchest of the anti-Microsoft crowd acknowledge how great Lync is. In terms of what it does, “Skype for Business” pretty much says it all; a corporate version of Skype where your ‘friends’ are your work colleagues and, if federated, your customers and suppliers.


As a consultant we need to get about. Here are the apps to help.


The default map application for iPhone. Given all the bad press when it first came out, I will probably stick to the alternatives but I do believe Apple has worked hard to make it practical.

Google Maps

No compelling reason other than it is really good and does not rely on locally stored maps. You can be anywhere in the world and, if you have an internet connection, you will have a map.


GPS becomes social in this great little navigation tool. People report incidences real time and the app even detects if you are moving slower than you should on a road and asks if there is a problem. When I am in traffic and need an alternative route, I reach for Waze.


The app that is so effective people call for it to be banned. This is a taxi service from your phone. What I love is that I can link it to my corporate card, book my taxi through the app, the payment is automatically deducted from my card, and the receipt is emailed to me. It could not be simpler. Being a phone app you can also see how far away the taxi is and the app gives you an estimated time of arrival based on the distance.


The apps I use when travelling by plane.


Replace with whatever airline your company uses. These apps are great for online check-in and using your phone as a boarding pass.

Virgin Australia Entertain

Needed so you can connect your iPhone to the Virgin Australia entertainment system.


A freemium app which you can send your pdf booking confirmations to and it will keep track of your flights. From there you can share the flight with loved ones or use it to check details when heading to the airport and the booking email is proving elusive. It also allows you to see who else is nearby when travelling, which is great when you are tired of ordering dinner for one.


An app which helps you book your seat. Give it an airline and flight and it will tell you which seats you should book and which you should avoid.


I use this for one purpose only; to find a decent restaurant when travelling. Tell it to find the restaurants nearby and it will give you the list, how far away they are and how they rank. You can then read the reviews to make sure.


A new app for me, it promises to keep track of all my loyalty cards. Having been in numerous hotels over the years for work, I have signed up to multiple hotel loyalty programs. Rather than carry around a stack of plastic cards I use infrequently, this app promises to keep them in one place. To get them in there there is even a scan feature to read the bar code on the card.

World Clock

The app for, this allows you to set up a series of cities and, for each one, it will display the time and date for that city. Great for international calls or for working out when you can call the loved ones back home.


While this is a business apps list, there is one game I will call out when you are travelling.


Google’s app which combines Geocaching with Capture the Flag. The missions feature is a great way to explore an unfamiliar city and see a few landmarks on the way. There is the added bonus of helping the Resistance stop the enslavement of mankind by the Enlightened. Fight evil, get some exercise and adjust, through exposure to sunlight, to the local time zone. Who says playing games is bad for you?


Apps specific to Dynamics CRM

The Two Microsoft Dynamics CRM Apps from Microsoft

While there are a mountain of apps in the App Store which work with Dynamics CRM, there are two official ones from Microsoft. I am yet to set these up but it would be remiss of me, as an Dynamics CRM consultant, not to have them available in case of that impromptu demo we are sometimes required to do in elevators or at business events.

Miscellaneous Apps

Here are the rest which defy classification.


I am yet to try it but so many “Must have” lists recommended it I was compelled to download it. Basically, you feed it a CSV file and it produces a presentation-quality graph which you can download and use.

Yahoo Weather

While the iPhone does come with its own weather app called Weather, the lists were also very complimentary of Yahoo Weather so I have downloaded it to see what the fuss is about.


If you are heading to a foreign country, this is a great little tool for learning a few words and phrases. In my case I am using it to keep my Spanish reasonably fresh. It is fun to use and very forgiving, recognising minor errors in accents and misspelling as small omissions, rather than marking them as completely wrong.


A conversion app for surviving weights and measures in the USA.

Wi-Fi Finder

An app which locates paid and free hotspots. Ideal when overseas and you cannot use phone data.


I am yet to meet an Apple user who rates Safari as a browser so I have downloaded Chrome.


So there you have it. There is my list of apps in my corporate iPhone to make my job easier. I am sure those of you with iPhones may have other suggestions so feel free to add them in the comments.