Capturing User Stories on the Go with Salesforce1


Steve Williams is a Cloud Solutions Architect for a global high tech firm and has been working with Salesforce as a Business Analyst and Admin for 7 years. He is the leader of the Kitchener User Group up there in Canada and is a huge fan and advocate of the Salesforce Community. His non-Salesforce time is spent having adventures with his Wife and two Children while attempting to protect the “Daddy LEGO” from being scavenged for parts.

Steve Williams - Capturing User Stories
One of the things that excited me at Dreamforce last year was the focus on retiring points from the Idea Exchange.  After a few conversations with some Product Managers I thought wouldn’t it be great if our ideas were captured in a more structured manner instead of just a giant text field. You can see the idea I posted about it here . This led me to thinking “How would I do it” so I started out with a Chatter Action in mind as my primary method for data entry. What i ended up with was a handy little tool to augment my existing Request Management App.

The App allows for the capture of user stories from any Salesforce1 device using common business language. For those of us who carry our laptops to meetings the Browser works just as well, minus the Siri of course. I expect to see this flow seamlessly to the Salesforce1 Desktop App that is coming soon #SafeHarbour <– you see what I did there eh?  The User Stories require a Parent Object to function fully so it bolts on to an existing solution easily.

Once your User Stories have been entered and finalized you can use them to facilitate your user acceptance testing. If you have a single tester the Use Case can be assigned to them with a Custom Lookup field and managed using the Status pick list. If you have multiple testers a report extract to excel can be used to run multiple iterations of a group of test cases.

Let’s build the app!

An existing Project or Request management object

As I mentioned previously this is designed to be an add on for an existing Request Management object. However with a few changes to the formulas it can be used on its own.

Custom User Stories Object

The User Story object follows the classic “As a <role>, I want <goal/desire> so that <benefit>” template. The fields I’ve included are:

1. Name: uses a text formula to include the project name & the “UC” & the sequence #.

2. Request (Master Detail – Feedback__c) this is my custom object for managing requests. The Master Detail relationship is needed for the sequence auto counter described below and removes the need for an Owner on the record which is nice.

3. Narrative (Long Text Area – 256) this is the user story, when using the Chatter Action this field contains default text to prompt the user to complete the statements of “As a”, “I want to”, “So That”. I also added some line breaks to make it easy to move the cursor from line to line on a touch screen.

The formula for the default text is:

"As a "&BR()&BR()&
"I Want To "&BR()&BR()&
"So That "

I chose a Long Text Area here to support the easy export to excel for User Acceptance Testing. If your plan is to use Salesforce to manage test execution then i would recommend separating the three values into separate fields.

5. Assumptions (Long Text Area – 256) we all make them so let’s make sure they are documented to avoid ending up like that Mption fella. I used Default text here as well to prompt the user to use a number sequence. The formula for the default text is:

"1"&"." & BR()& BR()&
"2"&"." & BR()& BR()&

6. Basic Flow (Long Text Area – 32768) the sequence of steps that the user will take to achieve the result from the narrative. This is where we enter solutioning territory, depending on the complexity of the user story you may be able to capture this right away or expand upon it for later when you have more information. Again default text was used as in the Assumptions field.

The next set of fields are added to support using the records as test scripts:

1. Sequence (Text – 2) the order of execution for testing. This field counts upwards automatically thanks to the aforementioned master detail relationship and the predefined field value features of the Action that I will describe below.

2. Test User (Lookup – User) this is who will be assigned to execute the test script for UAT.

3. Status (Pick List –  Open, Pass, Fail, Obsolete)  for tracking test execution

4. Acceptance Criteria (Long Text Area – 32768) the quantitative variables that are required for the expected result to occur.

5. Expected result (Text Area 255) the business language description of the end result required to pass the test

6. Actual Result (Text Area 256) what happened when the test case was executed. Were there deviations or were all of the acceptance criteria met

7. Am I the Test User (Formula, Number) this little community gem allows the use of a custom list view to filter records based on the value in the Test User Lookup Field. All you have to do is create a list view with the filter criteria of Am_I_the_Test_User__c | equals | 1. Call it My Use Cases and it will display all records where the user accessing the list view is the same as the user in the Test User Lookup.

The formula for the field is:

IF( $User.Id = Test_User__r.Id , 1, 0)


Parent Object Field Values: Use Case Count is a Roll-UP Summary (COUNT Use Case) . This is just a count of the number of child Use Case records that are already related to my Request. This is required to drive the counter used in the Sequence field and Name formula described below.

The Chatter Action

This is where some of the magic comes into the App. One of the greatest features contained within the Chatter Action settings is the ability to set default field values using formulas. This way the user can see calculated values when they are entering data instead of pulling the mystery switcharoo on them after they click save with a Workflow Rule or having to displace standard buttons with custom url hacks.

Where is my Action

Since I have an existing Request record that will be the parent for my User Story’s my Chatter Action exists on that object. This allows me to insert the child Use Case records while relating them to the correct Request.

Creating the Publisher Action

Creating the Publisher ActionIn this setup we are working with a Custom Object as a parent so the New Action is created from the Buttons, Links and Actions Related List on the Object page.

On the New Action page select Create a Record in the Action Type field and select your User Story Custom Object as the Target Object. Next enter a Label value to be displayed in the Chatter Publisher and of course as a responsible Admin a Description.

New ActionPredefined Field Values

Predefined Field ValuesOnce your Action is created you will see a related list for Predefined Field Values on the Action detail page. Clicking “New” on this related list will allow you to select a field from the Object your Action relates to. Once you have selected your field and click next you will be brought to the formula builder screen. Create the following Predefined Field Values on your Action.

1. Use Case Name: This is where I set my naming convention Request__c.Name & “-UC”& text( Request__c.Test_Script_count__c +1). So if I have 3 Use Cases already and my Request is called “Request ABC” my Use Case Name will be “Request ABC-UC4”

2. Sequence: This is my test sequence/counter field  that iterates by 1 on each new record Text(Request__c.Test_Script_count__c + 1)

3. Status: Here we are simply defaulting the pick list field to “Open”

The Layout

The layoutNow we will determine the layout for the Chatter Publisher. To do this click Edit Layout from the Action Detail page. The standard Page Layout editor is used here so it should be familiar to you already.

There are two columns available to use. I have chosen to keep it to a single column and have included both the User Story and Test Case fields. The Save button is available regardless of your position on the page within Salesforce1 so i am not concerned with the overall length of the Layout. If you’re using this via the browser you may want to consider shortening it to avoid unnecessary scrolling.

The Finishing Touches

The Publisher Action S1Well that was pretty easy right? Here comes the easiest part, rolling this out to Smartphones, Tablets, Laptops or in other words; Hallways, Elevators, Coffee Shop Line-ups, Lunch Tables and yes even Meeting Rooms built on four person bicycles. All that is left is to add the new Chatter Action to the request object page layout. To do this navigate to the page layout applicable to your Request object and from the edit screen select ‘Actions’. You will then see all of the available Chatter Actions for this object in the same place you are used to seeing the fields for the page layout. Keep in mind that if this is the first time you are customizing the Publisher Actions section of the layout you will need to click on ‘Override the global publisher layout’ in order to be able to drag your new action on to the page. Once the actions are in the order you like click save and you’re done! Now you can start capturing those User Stories whenever and wherever with the power of Salesforce1 . Not to mention you now have a cool mobile app of your very own so you can stop being jealous of your users and get some Salesforce1 goodness all for yourself.

Salesforce CSI: Uncovering What was Previously Built

So, you’ve inherited an undocumented org…now what? You’ve started a new job. (Congrats!) You’re volunteering for a non-profit. (Go you!) You’re a consultant who’s just started working with a new client. (It begins!) You ask your new boss/supervisor/manager for the documentation of the Salesforce org and you get a blank stare and a shrug. Oh […]


9 Things Your Consultant Won’t Say To Your Face

I recently read a very interesting article about the behind-the-scenes truths in sales and it inspired me think about the truths of consulting. Having worked on a few consulting projects, I reached out to the Cloud for Good team who has worked on hundreds of implementation projects and here is what they came up with: 1. We […]


Increase Mobile Adoption with the Salesforce1 Wizard

The Salesforce Winter 15 release was packed with exciting new features for Admins- Lightning Process Builder, Duplication, and many more. There is one you shouldn’t overlook and that is the Salesforce1 Wizard. If you listen to the ButtonClickAdmin Podcast you have heard Gillian say numerous times that “Admins live in the setup menu” so […]


Have an Idea for a Story?

We are all about the community and sharing ideas.
Do you have an interesting idea or useful tip that you want to share?