Archive for Tips Category Feed

Opportunity Roll-Up Summary Recommendations

Salesforce released Opportunity Roll-Up Summary fields on the Account object in the Spring 08 release. This is a pretty useful feature and below are some recommendations to help you get started using them.

One of the major benefits of this feature is that you now get quick answers on the Accounts you are selling to without having to run an Opportunity report and get multiple records for the same Account. If you sell to a customer multiple times throughout the year, that customer will be represented once in an Account report, but will be represented multiple times (once for each sale) in an Opportunity report.

Create the Fields

To get started, create a new Account field and choose the Roll-Up Summary option and click Next.

rollup_summary_newfield.jpg

Next, give it a name. I’d like to recommend a naming convention because you will probably create multiple of these. My personal naming convention is used in the example fields below. For the API name, you should also use a naming convention. This will help keep these fields together when viewed in Eclipse or Explorer.

After clicking Next, your options are to COUNT, SUM, MIN, MAX information from the Opportunity. Below is a table with some ideas for fields you that might be useful:

Field Name Rollup Type Field to Aggregate Filter Criteria
$ Opportunities (Open) SUM Amount Closed = False
$ Opportunities (Open – This Year) SUM Amount 1) Closed = False
2) Close Date = THIS YEAR 1
$ Opportunities (Won) SUM Amount Won = True
$ Opportunities (Lost) SUM Amount 1) Won = False
2) Closed = True
# Opportunities (Open) COUNT N/A Closed = False
# Opportunities (Open – This Year) COUNT N/A 1) Closed = False
2) Close Date = THIS YEAR
# Opportunities (Won) COUNT N/A Won = True
# Opportunities (Lost) COUNT N/A 1) Won = False
2) Closed=True
Using Formulas on the Rollups

One really nice thing about these Rollup fields is that you can use their results in your regular formula fields. Using the rollup fields I mentioned above, we can use formula fields on the account to create the fields such as:

  • Win Rate (%) = # Opportunities (Won) / (# Opportunities (Won) + # Opportunities (Lost))
  • Avg Win Amount = $ Opportunities (Won) / # Opportunities (Won)
Using the Roll-Ups

Now those rollup fields can come in handy in reporting to do things like:

  • Filter for all sold-to Accounts: $ Opportunities (Won) > 0
  • Filter for all Accounts with Open Opportunities: # Opportunities (Open – This Year) > 0

Another possiblity is in, say, an application that allows you to map your Salesforce.com data. Adding the $ Opportunities (Won) field onto the query page makes generating a map of all sold-to accounts a breeze.

arrowpointemaps_AllWonAccounts.jpg

What about you? How are you using Roll-Up Summary fields?

1 [back] – Other date filters include THIS QUARTER, THIS MONTH, LAST MONTH, NEXT YEAR, NEXT QUARTER, etc. Refer to the Salesforce help for more. These date filters are particularly useful for rollup summary fields.

Comments (11) comments feed

Developing Arrowpointe Maps (the tools)

It’s been a while since I blogged, so I thought I’d get back into it by talking a bit about the tools used to develop Arrowpointe Maps in the hopes that you might find this useful for your own development and that you might comment here about your tools of choice and what makes them great.

The Stack

Although you access the application via a Web Tab in Salesforce.com, Arrowpointe Maps is actually hosted with OpSource, one of the 2 pre-certified Salesforce.com hosting providers, and is running on a LAMPS (Linux/Apache/MySQL/PHP/Salesforce) stack.

Ideally, this entire stack will be replaced by Force.com. Someday it might. At this time, however, Force.com just isn’t ready to take on all of this and Apex Code, especially, doesn’t have the flexibility or community of something like PHP. I look forward to improvements being made to all of the Force.com components and hopefully Arrowpointe Maps can eventually be a showcase application running 100% on the platform.

Another architecture I really like is Adobe’s Flex technology. Both Salesforce & MapQuest have really good Flex integration. I really like this approach and you might start seeing some Flex output in future releases.

Web Services

salesforcelogo.jpgAll the business data resides in the user’s Salesforce.com database. We connect to Salesforce.com via the API to access configuration information as well as business data for mapping purposes. The application leverages the end-user’s Salesforce.com session, so all authentication is piggy-backing off of the Salesforce.com security model, which is really nice. Because Arrowpointe Maps is certified, we get a Client ID that gives us API access to Professional Edition orgs too.

MapQuest_Logo_small.gifWe use the MapQuest JavaScript API (Tiled Maps). MapQuest’s API is really well put together, is accurate and reliable. I’ve been very pleased with it. They are rolling out new functionality all the time and I do my best to incorporate the most useful pieces with each release.

I will be looking to incorporate more useful web services into the mix as the product expands. Programmable Web is the best resource I know for a comprehensive listing of web APIs.

Development Frameworks

xajax_logo.gifxAjax is an open source PHP library for building Web-based Ajax applications. It makes it dead simple to perform an AJAX server call, do the heavy lifting in PHP and then return HTML and JavaScript to the page without an entire refresh. It has allowed me to keep the bulk of the logic in the comfort and power of PHP and only using JavaScript where I need to.

prototype_logo.pngPrototype is a JavaScript Framework that aims to ease development of dynamic web applications. If you do any JavaScript development, this is a must have. It provides many useful methods for working with the DOM and has been written to be cross-browser compatible. It’s worth using if only for its $ function.

yahoo_logo.gifThe Yahoo User Interface Library (YUI) is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX. I use it in a few random places in Arrowpointe Maps. YUI is the most well documented user interface framework I have seen and it’s been taken up well in the development community. I highly suggest it.

I am not using these JavaScript frameworks, but I came across them in my research and they have good reputations:

Other Development Tools

eclipse_logo.jpgEclipse is an open source community whose projects are focused on building an open development platform comprised of extensible frameworks, tools and runtimes for building, deploying and managing software across the lifecycle. It is my main PHP development environment and Salesforce also has their Force.com IDE in Eclipse, which is useful. There are a number of “projects” that I use in Eclipse, but some of the standouts are:

  • Web Tools Platform
  • PHP Development Tools
  • Subclipse: Plugin to support connectivity to a Subversion (SNV) code repository.
  • Mylyn: Provides task management functionality in Eclipse. I utilize the Trac connector to connect to my Trac system that I use to manage my defect & enhancement request tracking.

devguard_logo.jpgI use DevGuard for professional SVN hosting. It’s pretty cheap and provides good tools for managing my code in a secure place. It also includes the Trac project management system that sits on top of SVN and it all integrates very well into Eclipse. This services are similar to what Google Code provides, but it keeps the code private and is not open-source.

appexchange_logo.jpgArrowpointe Maps is distributed via the AppExchange. The AppExchange makes it simple for any Salesforce prospect, customer or developer to download the application for free, no questions asked. Now they have what they need to connect to me and this allows me the flexibility to enable/disable access to the application as necessary.

firebug_logo.jpgFirebug integrates with Firefox to let you edit, debug, and monitor CSS, HTML, and JavaScript live in any web page. I use it every single day for a multitude of reasons. I highly recommend it.

References
  • MapQuest’s API Reference and Forums: I go here almost everyday. They are migrating everything to the developer site I linked to. Currently, most of their documentation is in their Technical Resource Center.
  • Salesforce’s API Reference: Used pretty regularly, especially as I delve into more obscure areas of the API and special use cases.
  • Force.com Cookbook: I use this pretty rarely, but it has some really good examples in it, so I keep it handy.
  • PHP Manual: I downloaded the CHM file from this page and I use it multiple times every single day. It’s the best resource for PHP information. If you visit the same documentation online, each page has other developers adding comments, so you get some rich information.
  • W3Schools: My one-stop shop for the official reference to HTML, JavaScript, the DOM and CSS. I used it a bit to learn XML too. I go here almost every day.
  • Prototype Documentation: The API docs for this most useful JavaScript framework.
  • YUI Documentation: Yahoo has documented their Yahoo User Interface Library very well.
  • Google: When at a loss, use Google to find examples of what you are trying to do. I try and corroborate most of the examples I find from a few sources before applying it to my development.

Some other, random tools I use that make my development/work life easier are:

  • Snag-It: Taking screen captures and for light image editing.
  • Jungle Disk: Mount Amazon’s S3 storage service as a drive and backup files to it. It encrypts all the files stored there.
  • Trillian: multi-protocol instant messaging client.
  • Jing Project: Create demonstration videos. From the creators of Snag-It.

What about you? For developing applications (especially Salesforce-related ones) what tools are you using and recommend?

Comments off comments feed

Gmail’s Alias Feature is handy for Salesforce Usernames

Did you know that you can add a + within your gmail address to automatically give yourself a new, unique email address that acts as an alias for your main address? Then, using Gmail’s filters, you can label/delete/forward those emails as needed. It’s a handy way to create a new unique email address on the fly without needing to go somewhere and actually create an account or explicitly setup an alias.

For example, the following email addresses will all go to myemail@gmail.com.

  • myemail@gmail.com
  • myemail+adn@gmail.com
  • myemail+developer@gmail.com
  • myemail+app1@gmail.com
  • myemail+app2@gmail.com
  • myemail+client1@gmail.com
  • myemail+client2@gmail.com
  • myemail+client3@gmail.com

This works for gMail as well as Google Apps for Your Domain.

The main reason I bring it up is that it’s a handy way to create new Salesforce usernames without needing to take an extra step and setup a new email address for yourself. Also, it’s a handy way to keep your email organized because you can use Gmail’s Filters to do so.

Comments off comments feed

Authorize logins from any IP address

Salesforce has mostly implemented their security changes. FYI, this is the help file page explaining to admins how to setup Network Access in the application and what happens when a user logs in.

If you have an org that you need access to without the burden of this restriction (e.g. an org you use to perform demos at various locations and/or from many different computers where you might not have email access), you can authorize all IPs by making 0.0.0.0 the start IP and 255.255.255.255 the end IP in a Network Access record.

Doing this will essentially put that org’s security back to what it was before Salesforce made their enhancements. I wouldn’t recommend making this change unless you actually need it, but it can come in handy even if for a short-term fix.

This is the approach Salesforce.com has taken for Test Drive orgs on AppExchange listings so that Test Drive users are not restricted access to a demo. All of my Test Drives had a record with this range pre-populated by Salesforce when they made their security changes.

Note: I do not recommend anyone do this for their corporate Salesforce.com org as this would negate all the good work Salesforce has done to button things up.

Comments (5) comments feed

Upcoming Security Changes – overview of impact

Salesforce.com is making security changes on Monday Nov. 26, 2007. (Note that the rollout was pushed back a week from their original communications. It is now Monday Nov. 26, 2007)

There were a couple of webinars today about the changes. The customer-focused webinar will be available at http://www.salesforce.com/security soon. The partner-focused one will be available in the Partner Portal.

Below is my understanding of what was said and a high-level overview of the main impacts. Please add clarifications in the comments.

API Logins
  • If you connect via a Session ID passed from a web link/tab, none of these restrictions apply as the user is explicitly providing you with login access to his/her active session.
  • To login with a username and password, the IP address you are logging in from needs to be white-listed.
  • Salesforce will pre-populate the org’s whitelist with IPs used in the past 4 months.
  • Each end-user can generate an API token to replace their password for API logins.
  • API logins using the API token do not require their IP to be whitelisted.
  • API tokens do not expire. Only 1 is active at a time. It can be replaced by the user generating a new one. This automatically invalidates the old one.
  • API tokens cannot be used to login at https://www.salesforce.com/login.jsp.
  • Going forward, the best practice would be for end users to provide their API token to any app/service they use other than the main Salesforce.com login page.
Logging in at https://www.salesforce.com/login.jsp
  • Username and password will still be the way to access Salesforce.com from the main login page
  • A new feature will be added requiring you to confirm that your computer is valid to login using that username.
    • The login page will check if you’ve logged in from that computer before (by looking for a browser cookie)
    • If not, the email address on the user record will be sent an email to confirm that you are, in fact, the one trying to login now.
    • You will click a link in that email “activating” your computer for login with that username
    • Unless you delete the cookie or clear your broswer’s cache, you should be good to go for a while without repeating these steps.
  • There are no new IP restrictions affecting logins at the main login page. The profile-based IP restrictions that have been around for a long time are still the way to go there.

If you are a consultant, you may fall victim of the new security measure when you try to login as your client (maybe they couldn’t afford another temporary username just for you). On the call, I was told that you can request a temporary one via the Partner Portal or ask your customer to forward you the email to confirm your PC is okay.

My thoughts

I think it is great to see Salesforce taking a step to tighten up the API, especially. I like to think that my old API Authentication List post had something to do with it, but who knows.

The biggest impact to me will be using client’s logins to get into the system from my PC, but I’ll just have to workaround that one. Security and convenience are generally a trade off and overall I’d rather use/subscribe to a service that is tightened down with my business data. If anyone can handle the inconveniences of logging in, it’s developers since we are used to doing hacks/workarounds in the first place.

Comments (3) comments feed

Next entries » · « Previous entries