Using Sites to easily publish data out of Salesforce

June 24th, 2009

I want to show you a quick and easy way to take live data from Salesforce.com and post it on your website using Salesforce Sites. You can see lots of hard-core examples of how to use sites. Those are cool, absolutely no doubt. People are building amazing things.

There also are opportunities for very targeted uses of Sites. With these micro-sites, the investment-to-value ratio can be really high. Here’s an example of one such use case.

The Use Case

A nonprofit wants to have a page on it’s website acknowledging all sponsors who supported events in 2007. They want a simple list of organizations, leaving out any who have asked not to be thanked publicly.

The Data

Sponsorships are tracked as Opportunities connected to the relevant Account. Here’s the Opportunity related list from the relevant Account:

screenshot

I have created a rollup summary field on the Account to sum up all Opportunities from 2007:

screenshot

And I’ve created a checkbox to flag Accounts that want to stay anonymous. You can see both fields on the account detail page:

screenshot

The Display

I want to show a simple list of donors that gave in 2007 and aren’t anonymous. To do this, I need to create a VisualForce page with a simple Apex controller so I can grab the right data, and then display it correctly

Here’s the Apex controller where I’m grabbing the data that I want. You can see from my SOQL statement that I’m only getting Accounts where the rollup field is greater than zero and the anonymous field isn’t checked. I’ve named it donorListing:

public with sharing class donorListing {
	List<Account> accounts;
	public List<Account> getAccounts(){
		accounts = [select name from account WHERE X2007_Giving_Total__c > 0 AND Anonymous_Sponsor__C = false ORDER BY Name];
		return accounts;
	}
}

Here’s the VF Page where I display the data. I point to the Apex I created via the controller attribute of the page. I also turn off the Header, so that I don’t see all the Salesforce navigation elements. Then I just list out the sponsors.

<apex:page controller="donorListing" showHeader="false">
	<apex:dataList value="{!accounts}" var="account" id="theList">
		<apex:outputText value="{!account.name}"/>
	</apex:dataList>
</apex:page>

And here is what the VF page looks like in my browser when I’m logged in to Salesforce.com:

screenshot

OK, looks great. But I want it visible to people not logged into Salesforce. To do that, I need to create a Salesforce Site.

The Site

You can create a Salesforce site at Setup | Develop | Sites. Create a site, and give it a name. It will show you the URL for this site. That’s the URL people can hit from anywhere on the web to see your VisualForce pages.

You associate VisualForce pages with a Site on the Site detail page. You’ll see here my donorlist page is a part of this site:

screenshot

Next, I want to make this page visible to the public–I don’t need people to login to see it. That’s done by modifying the public access settings:

screenshot

Make sure your pages and classes(classes used by VisualForce pages are added automatically) are associated with the site:

screenshot

OK, now we’re ready to hit the page at it’s external location. For this example, the URL is:

http://smsdev-developer-edition.na6.force.com/sms/donorlisting

The end product

Now that we can see the page publicly, we can embed it anywhere on the web using something called IFRAME. It’s a part of the HTML that runs the web, and has been around for a long time. Here’s the code for embedding this page in my website:

<iframe src="http://smsdev-developer-edition.na6.force.com/sms/donorlisting" width="100%" height="150" frameborder=0>

The nonprofit can now paste that IFRAME code into it’s website content management system. I’ve done just that in this post–you can see the sites page embedded right here:

When you hit this page, you’ll see the live data. If I get new sponsors or I flag sponsors as anonymous, they’ll appear or disappear accordingly. Just manage your data through your normal process and the public acknowledgement just happens.

Heck, you could even put workflow on the Account that automatically sends an email to the Account when they make this list. That email could contain a link to the acknowledgement page. That’s a pretty nice thank you experience for the sponsor, I think.

The challenge

This is a very simple example meant to get you thinking about what’s possible. What do you want to do with Sites? Come up with your own use cases and implement them in a developer org. As you can see, there isn’t much code involved to get it working. Show your boss what’s possible with an example. Tell them how long it took you to get data shared on your organization’s website. Modify the data in Salesforce.com and then hit refresh in the browser. Astound and amaze! And then build Sites into your business process for quick and easy publishing of your Salesforce.com data.

Drip campaigns with Summer ‘09

June 17th, 2009

John Kucera is posting an awesome series about doing complex engagement work with Campaigns and the new enhancements in Summer ‘09. This is killer stuff John!

Nonprofit Starter Pack is now an Open Source Project

June 15th, 2009

I just posted over on the Salesforce.com Nonprofit blog that we are releasing the Nonprofit Starter Pack as an open source project!

The post tells the full story and provides links to all the relevant resources: project site, issue tracker, code base, and documentation.

Come join us in this effort!

Digging Into Inherited Code

June 1st, 2009

I inherited a code base when I started at the Salesforce.com Foundation. If you’re a Salesforce.com Admin or consultant, you may find yourself in the same position. What’s the best way to come up to speed on a new code base? It can be a daunting process.

In one of my last projects at ONE/Northwest I started working on a very complex Salesforce implementation someone else built. There wasn’t any Apex or VisualForce, but the config was really gnarly. Getting my head around the record types, custom objects, and fields was a real bear. I saw some things I don’t like to talk about…

With my new job, the config isn’t particularly complex. There are relatively few objects and no record types. But there is Apex and some VisualForce. Here are the steps I’m undergoing to get my head around the code:

Put out any fires

  • Make sure the code is under source control.
  • Deal with any mission critical bugs, but remember you don’t really know what’s going on yet.
  • Set up an issue tracker and get it ready to collect issues you discover in this process

Schedule a demo so that you have a short-term goal

  • I was asked to demo the NPSP for the Boston user group only a week after I started. I said yes because I knew it would force me to get comfortable with it.
  • If you can’t demo to real users, demo to someone who will ask tough questions and understands the business process well enough to make you sweat.
  • If you can, build out your own demo org rather than using one that’s already built. You’re code may not be packaged, so this might not work for you.

Understand the application flow

  • Read any user documentation you’ve got
  • Talk to anyone available who was involved in the design so you can try to understand the intent of the application flow.
  • Click through the UI to see what happens
    • Take the time to document the application flow in a flowcharting program, like Visio or Omnigraffle–writing it down forces you to fill in the blanks
  • Discover all the button overrides
    • Find out where cool stuff is happening with Triggers and where it’s happening with a VisualForce page

Dig into the code and see how that application flow is accomplished

  • Look at existing Workflow to see what processes are handled there
  • Look at the code
    • Start with triggers, this is where the action happens
    • Take notes – update the application flow diagram with markers where Triggers fire
    • Look at the existing tests for nods toward key behaviors
  • Go back to workflow
    • If your workflow is complex, write detailed tests to prove the functionality
    • Just because you can write Workflow by pointing and clicking doesn’t mean it will be easy to understand the behavior without testing

Document what you now know by heart

  • Someone will be inheriting this code from you, so think about what you just went through and be kind.

For me it feel like probing in the dark with little parts of the picture slowly becoming illuminated. Follow your instincts about what to dig into, but don’t go to ground in any one area until you have a shallow understanding of the whole thing. Probe into the darkest corners until there is enough light to know how scary it is, and then move on, shooting for the whole room to reach dusk, and eventually, bright light.

I think it’s fun, this process of discovery. It’s much more fun when the code you are inheriting is well-designed, like this code is. When it’s rationally designed, your life is much easier. You’ll still have lots of work to do, but it won’t feel like a giant tangle of yarn for very long.

Ramping up

May 22nd, 2009

I just finished a week down in San Francisco, trying to come up to speed on the Salesforce.com Foundation and what I’ll be doing here. I had four main goals in coming down:

  • Meet my new co-workers face to face (the ones in HQ, anyway)
  • Get a better read on the culture of the Foundation–that’s hard to do remotely
  • Spend time with Steve Wright working through what my main areas of focus should be
  • Connect with folks at Salesforce.com the company and learn how best to leverage their knowledge and systems in serving nonprofits

I felt like my trip was a great success in all of those categories. I have great co-workers and it was so nice to spend time with them in meetings, at happy hour, etc. It was really cool to connect with some great people at the Company. The Foundation is a small nonprofit, but we’re connected to this massive software company.

I’ll be at the Foundation filling all sorts of roles that have whole teams at the Company–product management, sales engineering, internal process work, partner support. I’ve already gotten great tips and suggestions from Company employees about how best to get this work done. It’s really exciting.

So I’m feeling good, if overwhelmed. Starting a new job is always a lot to absorb. It’s a bit daunting hearing how the Product Management team gathers requirements, interfaces with developers, and tracks progress, and then realize that I’ll be doing all that by myself! Setting expectations of what we can get done will be key…

I am moving on from ONE/Northwest

April 15th, 2009

It is with a mix of sadness and excitement that I announce my departure from ONE/Northwest to join the Salesforce Foundation. I’ve had a great 4 years building out the CRM consulting program, and the time was right for me to take a very exciting opportunity. I get to work at the source of the force behind the growth of the Salesforce platform in the nonprofit sector.

It’s difficult for me to leave ONE\Northwest. It is hands-down the best environment in which I’ve worked. It’s an incredibly talented team that thrives on respect and shared purpose. It was a tough decision to leave such a great team, and such great friends.

I started at ONE/Northwest in 2005 with the goal of starting a CRM consulting program. The team is now 5 staff, cranking on 10 simultaneous projects. We have a very sophisticated set of consulting practices, some pretty slick code, and a track record of happy customers. I’m very pleased with where we’ve gotten to in the last 4 years. What a ride it’s been!

While I have been the most visible face of the ONE/Northwest CRM team, each member of the team is a strong performer in his/her own right. Most of our best code and practices were suggested and developed by my colleagues, not by me, and I thank them for the great years working together. I’ve learned a lot from these folks, and I’ll miss working with them every day. It has been a real joy.

I’m very excited to join the team at the Salesforce Foundation I’ve come to know over the last 4 years. If you’ve worked with them you know they are great people. I look forward to being able to work toward the mission of getting Salesforce into the hands of nonprofits around the world. That’s a reach I can’t really fathom quite yet.

I am the first overtly technical hire at the Foundation, so I’m sure they’ve got lots for me to do. There are a number of areas where technical expertise will come in handy–the Nonprofit Starter Pack, working with the NPSF community, working with partners who are looking to create nonprofit solutions, partnering with large NGOs who are pushing the platform to new places, and the list goes on. I can’t wait to get started!

To those of you who know me in person or on the web, I don’t suspect you’ll notice too much different. I’m staying in Seattle and I’ll be remaining active in all the fora I currently frequent. I look forward to seeing you there in my new role!

Thanks to everyone at ONE/Northwest who helped make the last 4 years a great experience, and to the folks at the Foundation who have given me this new opportunity! I’ll keep you all posted along the way.

ISPICKVAL going away in Formula fields

April 6th, 2009

An inside source just told me TEXT(picklist) will be live for formula fields in the next release! See the documentary evidence on the idea exchange. Also included is Workflow Field Updates!

Next up is TEXT(picklist) in Workflow Rules, Approvals, etc.

Awesome work from the declarative team!

Everyone needs customization

March 25th, 2009

I just read Keith Heller’s article about choosing a donor management package over on Idealware. I generally agree with the article–I think his comments on the big picture are applicable. I do have one point of contention, however.

Heller says,

If you consistently hear that the software you want is going to need customization to do what you want it to do, stop and consider what you need—and the limits of the software. Customization is always more time-consuming and expensive than it looks. Ideally, you want something that will work out-of-the-box for your organization. Talk to people who have traveled the customization path and see if it paid off for them and was viable for the long term.

I disagree. In my experience, everyone needs customization.

CRM systems, like donor management, need to support the work you’re getting done in order for them to be helpful. If they don’t support the work, they get in the way of the work. This leads to dissatisfaction, lack of use, and inability to trust the data in the system.

I think that the difference between a usable system, and one that is considered “in the way” can actually be very small. Little usability problems can loom large to users. When the system doesn’t go that last mile, people get frustrated and forget that the system brought them the first 99 miles. All that is forgotten, because some annoying work-around is necessary.

But if the system is customized to fill in that last mile, then it will no longer be seen as a barrier. Often this customization is very small compared to the size of the system as a whole. These are the kinds of customizations people need, and should demand.

While I agree with Heller’s point that all nonprofits are very similar, especially around the way they fundraise, I also know that each nonprofit is, indeed, unique. Each one I’ve worked with has had some business process that was different enough, and important enough to them that we needed to customize the software system to support it. Could they have ditched their practice and adopted some well-defined fundraising strategy supported by a donor management system? Sure. Then they’ve changed their most fundamental revenue-generating business practice at the same time they’re making a software buying decision. I’ve found the groups I work with are reluctant to make that kind of change, and don’t want to tie it to a software purchase.

Customizations can be critical in making a system usable and useful to the organization. I don’t steer organizations away from customizations. I try to help them find the most valuable customizations, and make them as useful as possible.

Multi-payment Opportunities

March 19th, 2009

Here’s a short movie explaining how we’re doing multi-payment Opportunities and dealing with complex nonprofit accounting.

Watch it here.

Charlie Wood on remoteness

March 9th, 2009

Charlie Wood tells of what must have been a very frustrating experience: making the final cut for two awesome high-tech jobs only to learn that the requirements had changed and to get the job he’d have to move to the Bay Area. He turned down both jobs and runs his software business out of Austin with a 100% remote team.

In a post today, he muses on remote teams vs. local teams, and has a really interesting passage about hybrid teams–some local staff and some remote staff:

Finally, I had a great conversation with Clay Spinuzzi, an associate professor at UT who’s writing a book on modern working arrangements. In that conversation, we talked about the awkward dynamic of a team comprised mostly of people working in the same physical space but with one or two members working remotely. We agreed that such an arrangement is problematic, and that the remote workers would no doubt become marginalized. But then it struck me: maybe the fact that a team can’t support remote members effectively is an indication of a problem with the design of the team.

In the same way that on-premise systems that use proprietary protocols and can’t connect to cloud-based systems are problematic for IT managers, a team that relies on “proprietary” communications among its members—that is, informal, social interactions that can’t be replicated online—limits its own potential.

The good news here is that new technologies like Twitter make it possible to translate much of the casual, interpersonal communication that has traditionally happened in an office to online, asynchronous, geographically-distributed teams. In other words, Twitter is the new water cooler—which comes as no surprise to anyone who uses it.

When two machines sit next to each other in a server room it doesn’t really matter what networking technology they use to communicate: AppleTalk, NetBIOS, and Banyan VINES will all get the job done. But TCP/IP will too, and with the added benefit that if you move one of the machines across the world it will “just work”. I suggest that the same is true for intra-team communications.

Teams built to rely on electronic, and more specifically Internet-based, communication channels can include remote members transparently, and can therefore be comprised of not only the best people in town but the best people period.

My team is mostly local, but with one remote person. The same is true of a couple other teams at ONE/Northwest. We hear constantly that the remote team members don’t feel connected to the group. Charlie’s identification of the problem rings very true.

The concept of ditching non-Internet communication in support of the team-dynamic is a very interesting one. It maps very well to the local protocol vs. IP decision–I think that’s an astute and thought provoking comparison. I remember how much I came to loathe NETBIOS when I was in IT. It was great for local communication, but when we added multiple offices connected by the Internet it was clear NETBIOS didn’t scale.

Is it worth ditching voice conversations because they aren’t accessible to remote team members? I’m not sold yet that it’s worth it. Remote teams can do amazing things, that is true. But aren’t local teams better? Communication just seems easier and has so much more density in person. The Internet has made impossible things possible, but I don’t think in my situation it’s worth the trade-off yet.

Thanks, Charlie, for such a great frame in which to think about the problem!

Gokubi.com is written by me, Steve Andersen

I'm a Solutions Architect at Salesforce.com Foundation helping nonprofits use Salesforce.com to change the world. I've been working with Salesforce.com since 2005 and working with nonprofits since 2001. We're at a point in time where agents of social change can get access to the same quality technology systems that large corporations can. I do what I do because I want to help people take advantage of this amazing opportunity.