feed-icon-32x32.png

Demand Tools by CRM Fusion

Scribe Software

Learn how Salesforce.com can help your business
arrowpointe @ twitter
  • there goes 1 salesforce competitor down for the count. not for reason's you'd expect, though. http://tinyurl.com/4e53ud 1 day ago
  • in Apex Code, for a num from -90 to 90 with many decimal points, should I use a Double or Decimal data type? 1 day ago
  • is there an Apex method to URL Encode a String? for an http request for an example 2 days ago
  • embedding VisualForce into a Page Layout detail section is nice, but it'd be REALLY cool to add it in the related lists area. 3 days ago
  • ah ha! You can mouseover the link and read the Bio line. Problem solved! Way to think ahead Twitter! 3 days ago
  • I wish Twitter would list my followers Bio line when I look at the list. Seems like a logical thing to display there. 3 days ago
  • very happy gmail added thumbnails for TIF files. now i can tell a spam fax from a real one at a glance 3 days ago
  • More updates...

Powered by Twitter Tools.



Archive for Innovations Category Feed

Salesforce on the iPhone

Salesforce demonstrates a sample Salesforce application built on the Apple iPhone SDK.

Comments (1) comments feed

Fight Web to Lead Spam w/ Akismet

Back in January, I posted about a way to help combat web to lead spam. That type of solution works well, but is not scalable. Also, it is a reactive approach rather than a proactive one.

I decided to try and see if I could incorporate Akismet into the web to lead process and I was successful in doing so! I created a set of scripts for you to download if you’d like to leverage Akismet with your web to lead forms.

Akismet is the best spam tool I have ever used. When I posted in January, it had captured 7,680 spam in its existence on this blog. Less than 4 months later, the spam count is up to 23,994. Needless to stay, spam is an exponentially increasing problem and will plague your Salesforce.com environment eventually. I feel that Salesforce.com needs to include a spam filter in their product for web to lead (vote for it).

Until then, leveraging Akismet could help you significantly.

About the Solution

The scripts are intended to be proof of concept for you to use and apply to your own environment. The code and downloads are now being officially hosted at Arrowpointe’s Open Source Project at Google.

To use this solution, you’ll point your web to lead forms to this script rather than to the standard Salesforce Web to Lead page. The script accepts the data from your web to lead form, passes it to Akismet to determine whether it’s spam or not and then passes the data to Salesforce.com’s web to lead page with the Akismet result appended to it.

In Salesforce, you’ll need to add checkbox field (e.g. “Akismet marked as spam”) on your Lead. If Akismet thinks it’s spam, that field will be set to TRUE. You would then need to add assignment rules or validation rules to do whatever you need. For example, you could have a lead assignment rule looking at that one checkbox field and put leads into a special queue if they are marked as spam.

The script leverages the Akismet PHP5 Class to handle the core communication with Akismet. I found this class from the Akismet Development page.

This script will only work on PHP5 and requires the cURL module to be enabled. cURL is enabled by default in most PHP installations. The PHP5 requirement is a limitation of the Akismet PHP5 Class. If you are on another platform (PHP4, Ruby, Java, etc.), I don’t see any reason why you couldn’t use these scripts and integrate a different Akismet toolkit into it. Additional toolkits are available from the Akismet Developer Page.

Cost

You’ll need a server running PHP5. If you have a server already setup, then hardware should cost you nothing.

Akismet is free for personal use, but has a small license fee for commercial use. If you will be using this in production, you should purchase an Akismet Commercial License Key. During development, I am sure you could use a personal key to make sure it works.

The scripts themselves are free and licensed under the GNU General Public License v3. I did this as a proof of concept for the betterment of Salesforce.com data quality everywhere.

Getting Started
  1. Add a checkbox field to your Salesforce.com Lead Object that will hold whether Akismet thinks it’s spam or not.
  2. akismet_marked_as_spam.png

  3. Download the scripts. Three files will exist in the zip file:
    • index.php: The main script that handles the incoming data, talks to Akismet and posts the data to Salesforce.com Web to Lead.
    • constants.php: You will need to go into this file and edit some variable values based upon your own organizational setup. See the next step.
    • Akismet.class.php: This is the Akismet PHP5 class I was talking about above.
  4. Edit the constants.php file:
    • Enter your Wordpress API key where it says ENTER_WORDPRESS_API_KEY. Get a personal or commercial key if you don’t have one.
    • Enter your company URL where it says ENTER_YOUR_COMPANY_URL.
    • Enter your company’s Salesforce.com Org ID where it says ENTER_YOUR_SALESFORCE_ORG_ID. This is actually optional. Doing this allows you to remove the OID from your public web to lead forms so spammers don’t know your Org ID. Doing this will reduce the amount of spam you actually need to process.
    • Generate a web to lead form in your Salesforce setup. Find the new Salesforce field you created in step 1 and copy the id value from the HTML form and put it in the constants.php file where it says ENTER_THE_W2L_CUSTOMFIELD_NAME. This step is required so that your Salesforce org is actually populated with the Akismet result.
    • PHP Advanced: The $Akismet_noPass array holds the names of fields that should not be included in the content passed to Akismet. Feel free to add/remove values from this array. The values in the array are referring to the names of form fields in your web to lead HTML form. I have no idea if this helps/hurts, but it seemed like a practical thing to add into the script.
  5. Upload the scripts to your web server and note the fully qualified URL for that directory (e.g. http://www.example.com/web2lead)
  6. Update your web to lead forms to have them post to the location of the files from the previous step (e.g. http://www.example.com/web2lead/ - make sure to put the / at the end of the URL. Not sure why, but I wasn’t able to get it to work without it)
  7. Test your form to see if it works. The script acts as an intermediary between your form and Salesforce web to lead. The end-user experience should be the exactly the same with or without the scripts.
  8. Once you know it works, you should add a lead assignment rule into Salesforce as rule #1 that looks to see if this field is checked. If so, then route the lead to a “Potential Spam” queue or something of that nature. Another option is to create a validation rule that doesn’t even allow the lead into the system.
  9. Make sure your Auto Response rules don’t email a reply to leads marked as spam. If you allow this, then those spammers have an email address to try.
  10. Update some/all of your web to lead forms to post to this new page. If desired, remove the “oid” field from the HTML form for each of these since the script will pass your Org ID to Salesforce automatically.
Other Stuff

These scripts are a proof of concept. I am not officially supporting them, but am happy to help people out informally. Post comments here if you have questions/comments/criticisms.

I have only tested this with leads that were either real or very obviously spam. It worked well. From Akismet’s perspective, the data it checks looks just like a blog comment and I can attest that Akismet is amazing at identifying blog comment spam. So it should work well for Salesforce.com web to lead.

I am going to update my existing web to lead forms on this site and see how it works and report back to you. I encourage you to do the same and let me know your experiences with it or recommendations on how to improve the scripts.

Enjoy!

Comments (36) comments feed

MapQuest for AppExchange

MapQuest recently released a mapping application on AppExchange. This is a free application that lets you map an Account or Contact (like you would using the default link to Yahoo! Maps), but adds a cool new feature on the landing page that allows you to find nearby Accounts and Contacts. Pretty slick. Chris Kramer has a good write up on it here.

This obviously has some overlap with the mapping work I do with Salesforce.com and Google Maps and it also attacks it in a different way.

I can think of many possible approaches towards mapping data and many different user experiences Salesforce.com users would enjoy. How do you choose one?

What do you think? What would you like to see in an application that maps Salesforce.com data? How would you design it?

Comments (1) comments feed

SFCubed - Sync Salesforce data with your Mac

Simon Fell just released a beta application called SFCubed.

SFCubed allows you to sync your Contacts and Tasks between Address Book and iCal, respectively. Simon is planning to include Calendar sync in the future. Couple that with Spanning Sync and you have a fully synched iCal, Salesforce.com and Google Calendar. Whoa!

I don’t use a Mac (yet), but let me or Mark know what people are thinking about it.

Comments (4) comments feed

Improved Google Maps Mashup

I have recently completed some custom Salesforce.com / Google Maps mash-ups for clients and have made some improvements to the whole integration.

First, it has been updated to utilize the Salesforce.com PHP5 Toolkit. Performance is improved from the nusoap toolkit. Also, if you are running a PHP 5 version after 5.1.2, the toolkit supports compression, which is great.

Second, I found a really good Google Maps PHP class that allows for additional functionality beyond what Phoogle provides. The adapter I am using now is by Monte Ohrt from phpnsider.com. You can get it here. I had to make a couple changes to it, but those changes should be going into his next release. Some of the improved functionality this adapter provides is:

  • Ability to use Yahoo! or Google Geocoder APIs: Yahoo! currently supports the US only. Google supports many countries such as United States, Canada, China, Japan, the UK, France, Germany, Italy, and Spain. I have been opting for the Google API, but both work well.
  • Include a sidebar that lists the returned records: Clicking on a sidebar link pops up the corresponding map marker
  • Caching of Geocode lookups. Cache your successful lookups to a MySQL database for faster retrieval the next time you Geocode it. This is an optional feature.
  • Auto centers the map based upon the map markers placed on it
  • Better error handling.
  • Has all the same functionality as Phoogle, so I didn’t lose anything in the transition
sfdcgoogle_mapsmashup.png

I put up a new demo of it in action. For this demo, I decided to get a little fancier and show how a form can drive the results returned in the map. My clients typically want the querying capabilities to be dynamic, so adding forms is common. This demo has a very simple form to demonstrate the capabilities. However, for some of projects, I am building forms dynamically based upon the metadata in the Salesforce.com org. Pretty cool!

If you are interested in this functionality being customized for your organization, please visit the product page on the Arrowpointe website and complete the form on that page.

Comments (2) comments feed

« Previous entries