877.703.4488 info@cloudmybiz.com
Tip of the Week – Easy financial formulas for Salesforce

Tip of the Week – Easy financial formulas for Salesforce

Here at CloudMyBiz, we’re big proponents of formula fields. We’ve shared with you hundreds of formulas that can do anything from formatting data for document merging, to figuring out the exact age of a customer, to even showing dynamic images to help give your team important at-a-glance information. A lot of these formulas get pretty fancy, but what if you need to get down to the numbers and calculate important financials like you’re already doing on an old spreadsheet? Can Salesforce really replace your spreadsheets and give you numbers like compound interest or gross margin percent? In short, totally!

Anything a standard spreadsheet program can do, formulas in Salesforce can do, and generally better. Take for example calculating compound interest: Principal__c * ( 1 + Rate__c / M ) ^ ( T * M) ). Or maybe you need to calculate gross margin: Total_Sales__c - Cost_of_Goods_Sold__c. Salesforce has provided a list of common financial formulas that can give you a fantastic jumping off point for all your financial calculation needs. And if you can’t find what you need there, I find one of the easiest ways to build the formula I need is to open up one of my old spreadsheets with the formula, then paste and translate it into Salesforce. Once you’ve got your calculations working, check out some of the other formulas and start thinking about how to take your formulas to the next level!

-Jared and the Salesforce Guys

Tip of the Week – Get your customers’ age right every time in Salesforce

Tip of the Week – Get your customers’ age right every time in Salesforce

Birthday

Everyone knows that it’s poor etiquette to ask someone their age, and even worse to skew it in the wrong (read: upward) direction when you do need to confirm it. There’s a bunch of formulas out there for calculating someone’s age (or just the number of years between any two dates), but the simple ones have a tendency to be off by as much as a week or more, and the more complicated ones can be difficult to understand if you find a bug. Your team shouldn’t have to stop and do the math before asking that ever difficult question, and they shouldn’t have to go red in the face wishing a happy 21st birthday to someone who’s already been to the bar. You especially don’t want to send someone a Senior Citizen’s discount too early or offer an insurance package they’re not eligible for. You need a simple, clean formula that gets it right every time. Look no further!

This gem comes to you from the Developerforce Cookbook site and essentially operates on the principal of the Futurama Birthday Song (what day is today; it’s so-and-so’s birthday). All you need is a date field (here, they’ve used a custom field called DOB) and you’re ready to create your formula. IF( MONTH(TODAY())>MONTH(DOB__c), YEAR(TODAY())-YEAR(DOB__c), IF(AND(MONTH(TODAY()) = MONTH(DOB__c), DAY(TODAY()) >= DAY(DOB__c)), YEAR(TODAY())-YEAR(DOB__c), (YEAR(TODAY())-YEAR(DOB__c))-1) ) . With this formula you’ll always have the right age.

-Jared and the Salesforce Guys

Tip of the Week – Always call the right number with a simple formula in Salesforce

Tip of the Week – Always call the right number with a simple formula in Salesforce

Frustration

When you want to make the sale, voicemail is most certainly not your friend. If you leave your message after the tone, you never know if they’re going to call right back, start a game of phone tag, or miss it entirely, giving your competitors another opportunity to snatch your hard-earned revenue. No different with customer service – when a client is angry, nothing can sooth their frustration like a friendly, live voice on the other end. The answering machine isn’t going to answer their questions. If you’re using Salesforce, you have six standard phone number fields (yes, 6, I counted) between Accounts and Contacts, not to mention any custom phone fields you’ve added over time. But which one is going to get a pick-up instead of going straight to that annoying automated teller? Wouldn’t it be great if you could clearly and easily identify the preferred phone number? You can, with two simple fields!

First, create a picklist field called “Preferred Phone?” and make the values the names of all your phone number fields (Account Phone, Mobile, etc.). Now, create a formula field called “Preferred Phone” (to make your life easy, add “_Formula” to the API name). The formula: CASE(Preferred_Phone__c, “Account Phone”, Account.Phone, “Mobile”, MobilePhone,…,null)obviously add any other numbers in that … bit. Add the picklist near the other phone numbers, and give your formula a predominant place at the top of the record and you’re all set! You can leverage this field in related lists, list views, and anywhere you’ve got a lookup to Contact. Now, you’ll always know which number is best to get an answer! It’s so simple, why not give it a try today!

-Jared and the Salesforce Guys

Tip of the Week – Barcodes in Salesforce are that bleeping simple

Tip of the Week – Barcodes in Salesforce are that bleeping simple

Barcode Scanner

Whether you’re managing 100 faxed applications a day, trying to follow items as they circulate on your shop floor, or you just need an easy way to track your inventory, you’ve likely run into a situation where you said, “wouldn’t it be so much easier if we could just scan a barcode?” Yes. Yes it would. There’s a reason barcodes are so popular. Just pull a trigger, listen to the satisfying bleep, and you’re in business. Most USB and Bluetooth barcode scanners work like a keyboard – when you scan a barcode, they type in the number and click Enter. This means that whether you’re using a standard search or a complex custom system, you don’t have to worry about crazy code. You can even use a barcode scanner with a mobile Salesforce1 app! But getting the barcodes themselves is another matter. Wouldn’t it be great if you could just automatically generate a barcode straight in Salesforce? Well, you can – and it’s free!

Adding barcodes to Salesforce is really simple. You’ll just need two new fields. Start off by creating the field that will hold the actual number – I’d recommend an autonumber field, but if you need more control, it can be plain text. Let’s call it Barcode #. Now, create a formula field and add the following code:

IMAGE("//www.barcodesinc.com/generator/image.php?code="&Barcode__c&"&style=325&type=C128B&width=200&height=50&xres=1&font=3",Barcode__c)

Using barcodesinc.com, a cool free service, a barcode will be instantly generated for you. And that’s it! Now you can add that field to Reports or List Views for printing, add them to your page layouts, include them in email templates, and the list goes on. With just two simple fields, you have a barcode for everything you might need. Now go get yourself a scanner and have fun!

-Jared and the Salesforce Guys

Tip of the Week – Fast formulas for formatting forms in Salesforce

Tip of the Week – Fast formulas for formatting forms in Salesforce

Whether you’re new to Salesforce or it’s all old hat to you, you’ve probably come up against some requirement where you needed to take information from Salesforce and put it on a PDF, Word Doc, or other document. Whether you use Salesforce Mail Merge, Conga Composer (our App of the Year pick for 2013), or any one of the numerous other solutions on the market, you will come up against issues where the format of the data you have in Salesforce doesn’t match the format you need on your document. Sometimes you can format the data right on the form, but frequently you’re going to need it formatted before it ever leaves Salesforce. No need to give your team a lot of extra work. Just throw a few formula fields in and you’ll be merging faster and cleaner than ever before!

A common requirement is splitting up a date into separate Year, Month, and Day fields. A separate Formula Field for each will take care of this. Here’s how it works:

Create a Text Formula Field called Date Year, choose the date field you’ll be using, and put it in the following formula: TEXT(YEAR(Date_Field))

Now, create another for Month and Day – TEXT(MONTH(Date_Field)) and TEXT(DAY(Date_Field)) respectively.

Another common scenario comes when you want your document to display a client’s Billing Address if the Shipping Address is not available. For this, create a Text Formula Field for each segment of the Address (I’ll show you for Street). Now we’ll use an IF statement to check if the Shipping Street is blank. Here’s how it looks:

IF(ISBLANK(ShippingStreet), BillingStreet, ShippingStreet)

Do the same for City, State, and Zip, and you’re in business.

Remember, when in doubt with mail merges, formulas are your friends! Check this out for more formula ideas to get you going.

-Jared and the Salesforce Guys