But what if you wanted to use them for something different instead? Like a “Web-to-Anything” form?
Using a Developer Org is a great way to practice setting up one of these, using Process Builder to turn the lead/case into just about anything else, and seeing how it works before trying to apply it to a specific business case.
Here is how I game the Web-to-Lead process to create something else instead:
This isn’t meant to be put into an Enterprise level org necessarily, but more as another way to think about the platform and open people’s eyes to different ways of using what is already there in a different way.
There are two objects that I probably use more than anything else in my developer org. They may not be the most useful, but they get the most use and I need to interact with them the most often.
The best way to describe this is my “super” bookmarks from around the web. I’m sure lots of people can relate to bookmarking lots of useful sites, and then the links getting lost in with the other 100s of bookmarked sites and specific links that are logged in your bookmark manager. So I set up a simple custom object that houses the ones I constantly come back to
- I like to bookmark Answers that I’ve (or others have) provided, and reference them later on, but I often need to categorize them
- It forces me to keep a smaller list
- I can search for them easily, and also tag them to categories
- I can get to them from anywhere
Pretty simple, yet really useful. At the end of the post I’ll share a few of my favourites
Blog Post Ideas
I get ideas all the time, and then forget about them. So instead of repeating the same mistake over and over again, I created an object and I use a quick action (formally publisher action) to log them from my phone. These come to me
- When I’m in the grocery store
- When I’m sleeping
- When someone at work doesn’t understand junction objects
- When I’m working my way through Trailhead
- Who knows where else
Both are simple objects, with simple inputs required to log the records. Out of the box they can be logged through
- Desktop using regular Salesforce and the New button
- Mobile using Salesforce1
But what if we could use Web to Lead (or Web to Case), provide minimal fields for entry, and convert the entry into one of these objects instead? If nothing else it’s good practice and I wanted to see how this could be done with Process Builder.
I first thought of this last year when we did a project where the Web-to-Lead form was used, and after insert code was used to check for already existing Contacts and/or Leads, then some stuff happened with code, and things were changed that are too complicated to explain here. But what I really got out of it was that the Web-to-Lead form was really just a starting point, a leg up if you will.
Setting Up Web-to-Lead
The help topic I posted at the start of the article will get you going with setting up a default Web-to-Lead form. What many people don’t realize initially is that nothing says you can only have one Web-to-Lead form, you can have as many different ones as you want. So far this is my first in the developer org
I wanted to keep this as simple as possible to start with so all I did was create a few hidden lead fields
- Object for Conversion (picklist)
- Record Name (text)
- Details (text)
- URL (Useful Link Only)
and used only them in the form.
The output is code that you insert into a text editor like Notepad or TextEdit, and then save with a .HTML extension.
You can read the code if you want. I didn’t. That’s the great part about using Web-to-Lead – I didn’t have write any of this!
Mine looks like (after taking out some comments):
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">
<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">
<input type=hidden name="oid" value="00Dj0000000K5BU">
<input type=hidden name="retURL" value="https://success.salesforce.com/">
Object for Conversion:<select id="00Nj0000009YGKm" name="00Nj0000009YGKm" title="Object for Conversion"><option value="">--None--</option><option value="Blog Post Idea">Blog Post Idea</option>
<option value="Useful Link">Useful Link</option>
Record Name:<input id="00Nj0000009YGKr" maxlength="120" name="00Nj0000009YGKr" size="20" type="text" /><br>
Details:<input id="00Nj0000009YGL1" maxlength="255" name="00Nj0000009YGL1" size="20" type="text" /><br>
URL (Useful Link only):<input id="00Nj0000009YGL6" maxlength="255" name="00Nj0000009YGL6" size="20" type="text" /><br>
<input type="submit" name="submit">
Another little known fact is that you don’t actually need Last Name or Company when using a Web-to-Lead form, it will still allow record creation
So now we have a basic form that will take entry of items that I don’t actually want as leads, but will store them as leads.
Process Builder has been talked about at length by many different people, and my favourite way to get started is to work through Rakesh’s getting started series Learning Process Builder.
It’s also been called “Workflow 2.0” which I think is a good way to think about it. What works great for leveraging it in this use case is that you can utilize multiple steps. So I can say “check Criteria 1”, and if it doesn’t hit that, then “try Criteria 2” and so on. This post only shows two scenarios, but you could have lots more, all within the same overall Process
So I won’t go too in-depth with each of the steps, but here’s what I’m trying to do:
- Action off of a created Lead record
- Conditionally create a completely unrelated record based on a value chosen in the Web-to-Lead form
Here are the screenshots if you aren’t sure
Step 1 – Object
This is saying that I want to fire the process off of the Lead object on record creation
Criteria 1 – checking picklist value
If the picklist value is “Blog Post Idea” then do something (hint: it’s Action 1)
If the picklist value is “Useful LInk” then do something (hint: it’s Action 2)
(don’t forget to Activate)
You know have a way to create a link, or a desktop icon, or embed the code somewhere else, where you can now very quickly create a record for either object – no Salesforce login required.
I’m not saying that everyone should run out and introduce this in their business orgs, the solution isn’t about that
- It works well for personal items, not necessarily robust business solutions
- It’s another vessel to learn, another way of thinking about the platform. Use it as a way to know what the platform is capable of, and also as a way to think about potential issues that could arise from this kind of solution
This approach, while not great for data integrity, is in my opinion the fastest way to get information basic information into Salesforce. What you do with it from there is a great way to continue learning!
Some of my favourite Useful Links
- Declarative Lookup Rollup Summaries
- Power of One
- Delete Records Prevention – using easy VF page to overwrite Delete button
- Global Search – what fields are searched
What about all the garbage Leads now?
This is the part where I still have to learn. I’ve been playing with Flow but haven’t gotten into deleting records yet. Good reason to do another blog post soon!
I’d love to hear if anyone has some great business use cases for this as well, or have done something similar in their own org.