Wednesday, January 31, 2007

Widget Hardware: Ambient Orb

by Ryan Goodman

During a discussion last week I was commenting on my Ambient Orb and how it is one of the coolest devices in the market. This cool piece of hardware has served as a conversation piece for anyone who walks by my office, and is currently configured to display the health my entire investment portfolio. When I was looking to purchase a house last year, I linked it to the local market rates with an extremely tight tolerance and was able to have my mortgage guy execute on my loan application and in return I saved a small amount of money (more than enough to pay for the orb itself).



Today, anyone can leverage this technology to monitor any type of information. In my case I built a module that will allow you to plug this technology into any Xcelsius dashboard. There are a few basic steps to enable your dashboard to pass information to your ambient orb.

1. Once you purchase your orb, go to the Ambient Devices website and setup an account that allows you to add your own channel.

2. Obtain your orb ID located at the bottom of your orb, and enter it into the excel model.

3. Configure the tolerances in the model, based on the values you will receive from your connected source. One tolerance is for color and the second is for blink speed, which means you can visualize two values on the device.

4. Make sure the web service URL is configured to connect to ambient devices. (Data>XML Map Options…)

5. Connect your model to refresh with live data from any data source (BI, CRM, etc..)

6. Setup the refresh rate. *Note that depending where you live you can expect up to 20 minute transmitting latency for your orb to change color.

7. Generate your SWF file

8. Vuala! Your SWF will now dictate the color of your ambient orb.
Download the source files

So when Christmas rolls around next year you can be a hero: Give your VP an easy way to monitor their most important key performance indicator, and a cool looking glowing tech-toy for their office. You will be a hero going into the next year!

Tuesday, January 30, 2007

Embed Xcelsius inside of Salesforce.com

by Ryan Goodman

Salesforce.com Inline S-Control Analytics with Xcelsius
With the Winter 07 release, you now have the ability to assemble your own dashboards using the custom S Control, which serve as an IFRAME on any Salesforce.com page. While testing these new features last October before Dreamforce, I was able to quickly assemble a dashboard that can leverage the Salesforce.com API along with an inline S Control to extract information on the page.

The result was an embedded dashboard inside of every opportunity page that would display a visual history of the account. Though I am not sure how well it resonated because it was visually not that sexy compared to the full dashboard applications, the power of these nested dashboards for SFDC end users is extremely valuable if executed correctly.


Here is an overview of what I did.
1. Decide on a practical business case that would warrant a dashboard on every opportunity page:

In this case I wanted to embed a standard dashboard on every opportunity page that would allow the end user to visually digest the history of all other opportunities for a given account: won, lost, and pending. In addition, it was important to show the current opportunity in relation the historical view. Then the end would need to view high level details and navigate to any other historical opportunity with a single click. The underlying idea was to alleviate the mental juggling and repetitive clicking to access the same valuable information. I counted 10-15 clicks in some cases to obtain the same exact information.

2. Build a SAOP web service to pull down all opportunities and details from a specified account using the SFDC API. There is a good article on the Xcelsius Business Widgets Site outlining best practices.

3. Build a custom S control to expose the current opportunity information as variables, so they can be pushed to dashboard on-load, using Flash Variables. It is this S Control that will supply the information about the current opportunity that and will also define the Account parameter for our SOAP web service. Upon inserting the S control onto the opportunity page, I set the size to 1 pixel to hide it from the end user.
Example: Exposes the Session ID and Opportunity Name as variables.

sforceClient.setLoginUrl("https://www.salesforce.com/services/Soap/u/8.0");
sforceClient.init("{!API.Session_ID}", "{!API.Partner_Server_URL_80}", true);
sforceClient.init("{!Opportunity.Name}", "{!API.Partner_Server_URL_80}", true);

4. Build a custom S control to house the SWF file, and set the Flash Variables. You will also upload the SWF file to SFDC as part of the S Control.
Example: This example will load the SWF file, and define the Flash Variables (Param#). I also set the SWF background color to match SFDC.

‹html›
‹body›
‹object type="application/x-shockwave-flash" data="{!Scontrol.JavaArchive}" class="movie" width="100%" height="100%"›

‹param name="movie" value="{!Scontrol.JavaArchive}" /›
‹param name="bgcolor" value="F3F3EC" /›
‹PARAM NAME=FlashVars VALUE="salesforcesession={!API.Session_ID}&param1={!Opportunity.Name}&param2={!Opportunity.StageName}&param3={!Opportunity.Amount}&param4={!Opportunity.CloseDate}&param5={!Opportunity.Account}&param6={!Opportunity.Link}"›

‹img src="http://path-to/noflash.gif" width="100%" height="100%" alt="No flash installed" title="No flash installed" class="image" /›
‹/object›
‹/body›
‹/html›


5. In your Xcelsius dashboard, bind the Flash Variables based on the naming convention you used. In my case, I named them param1, param2, etc.


Hopefully, this has left you with some good ideas, of how a simple dashboard can really add value to your end users, specifically for SFDC.

I do have to give some credit to the guys at Salesforce.com, for helping me get my syntax correct for the first Inline S Control. Sorry guys, I can’t post the source files for the web service or Xcelsius file for this one. I can only help you along with how to build it.

Tuesday, January 16, 2007

Embed a SWF in Excel

by Ryan Goodman

Often I get questions about placing an Xcelsius generated SWF inside of an Excel file. If you go through this tutorial, you will truly appreciate the single click export option in Xcelsius. In covering how to import a SWF into Excel it is important to understand that there is no way to connect the SWF to the Excel data. When you generate a SWF from Xcelsius, it is completed self contained as is not tied back to the originated Excel file in any way. All of the data, logic (Excel formulas converted to Action Script), and connectivity mapping is contained inside of that SWF. With that said, here is how you can take a SWF file and import it into Excel, though the process is the exact same for PPT, or Word.
Download Source Files


  1. Open the Control Toolbox by clicking on View>Toolbars>Control Toolbox
  2. In the control toolbars menu, you have an icon called More Controls
  3. Scroll down and click on the menu item called Shockwave Flash Object. This will insert a container where you will load and resize your SWF
  4. Right click on this container and click on the menu item: Properties. Note that sometimes you may get a weird behavior with this container in order to get the correct right click menu. Reference the You may need to click in the empty space on your document before right clicking on the container.
  5. Click on the top field, (Custom), then click on the ellipse button (…).
  6. In the property page popup, you will need to fill in the absolute or relative path to your SWF file.
  7. Before embedding the SWF you want to make sure that the path you entered worked. Click OK to temporarily exit the properties popup window.
  8. Resize your container and your SWF should load inside, though it will not work quite yet. As long as you see the dashboard, it worked. Now you need to embed the SWF so you can move or email the Excel file.
  9. Go back to the properties popup box and check Embed Movie.
  10. Now you need to activate your SWF so you can use it. Back in your Control Toolbox, there is a design mode button. You will need to click on it to Exit Design mode, and now you can use your SWF.

Monday, January 8, 2007

Dashboard Design and Deployment Best Practices with CX: Part 3- Finalize and Connect your Dashboard

by Ryan Goodman

Follow Excel best practices
Now that you are transitioning from your mockup toward your final production dashboard, you will want to start incorporating some Excel best practices designed specifically for use with Xcelsius. These best practices will help you couple your excel based model with live data. Excel best practices will allow you to scale your dashboard as you add and remove metrics. Click here to view the Excel best practices whitepaper.

Utilize summarized data
Though it has not been stressed through the other best practices, connectivity is just as important as the visual dashboard itself. I many cases, the data will originate from a database or warehouse. When building a connected dashboard with Crystal Xcelsius, it is extremely important that the data streamed to the Xcelsius dashboard is summarized. While Xcelsius can do some calculating and summarization during runtime within the SWF, it is best to utilize the web services or reporting tools to do the heavy lifting (calculations and summarization). While the volume of data, complexity of calculations, and refresh frequency can dictate which connectivity method is used, it is important to understand that you want the final range of values streamed to the dashboard to be summarized as close as possible to the information you will visualize.
To ensure you can visualize all of the needed information, there are several ways to summarize the data:
  • Use parameterized queries to stream data to the dashboard based on the end users’ selections
  • Use reporting tools like Crystal Reports or MS Reporting Services to do the heavy calculations and summarization. Xcelsius supports both of these solutions as data sources.