Skip to content

mwelburn/Salesforce-Case-Streaming-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Streaming API POC - New Case Feed

The premise of this POC was to setup a Visualforce page on the sidebar and as a page in Salesforce1 Mobile that allowed users to monitor new cases being filed. The list is color coded based on priority level.

There are plenty of inefficiences and lack of error handling in the CometD usage and AngularJS implementation, but it is stubbed out enough to show the possibilities.

Mobile Case Stream

Mobile Case Stream

Desktop Case Stream

Desktop Case Stream

Installation Link

https://login.salesforce.com/packaging/installPackage.apexp?p0=04ti00000004Nyh

Setup Steps

  1. Ensure profile access is set up for the following:
  • Case Fields: Account_Name__c, CaseNumber, Contact_Name__c, Priority, Subject
  • Visualforce Page: NotificationFeed
  • Custom Tab: Case Stream
  1. Create the PushTopic
  • Reference the following snippet to run as Anonymous Apex:
PushTopic pushTopic = new PushTopic();
pushTopic.ApiVersion = 29.0;
pushTopic.Name = 'NewCases';
pushTopic.Description = 'New Cases';
pushTopic.Query = 'SELECT Id, Account_Name__c, Contact_Name__c, CaseNumber, Subject, Priority FROM Case';
pushTopic.NotifyForFields = 'All';
pushTopic.NotifyForOperationCreate = true;
insert pushTopic;
  1. For Home Page Layout:
  • Follow the steps for Adding the Home Page Component to your sidebar
  • Choose the Case Stream (narrow left) component
    • If the component appears too tall for your liking, edit the HTML of the component to lessen the height of the iframe
  • Ensure you customize your UI to set "Show Custom Sidebar Components on All Pages" in order to view the component on pages besides the Home tab
  1. For Salesforce1:

Helpful Links

About

Salesforce Streaming API POC to show newly created cases to users.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published