Overview

One of the really fun things about working at Jive is we often get to work with other innovative and fast moving companies. In getting ready for Jive World this year, I had the chance to work with Matthew Marum from SugarCRM and Mohammad Nezarati from Esna. Our goal was to show an integration with a CRM system that didn't violate what Jive co-founder and CTO Matt Tucker coined as the "One Click Rule". Essentially, this rule states that the proper use of an app must be more than just wrapping an existing UI inside of an app. This level of integration is not valuable because, with "one click", you could just as easily open the native Web page of the target application.

 

So we stepped back and looked at the kinds of problems that integration via an app can solve, how we might be able to leverage the activity stream, and, how being able to open an application in context (!App or !App Experiences), can provide a more effective and efficient way to bring together the disparate systems that a person uses on a daily basis. What we ended up with surprised even us! We have an incredibly powerful way to use the Jive What Matters Activity Stream to aggregate and surface workflow that spans multiple backend systems! What's even better is that because this builds on top of everything that's already in Jive, this was incredibly quick and easy to build.

 

The Scenario: Winning an Opportunity

Our scenario starts with a sales team doing what they do best: trying to win deal. A sales person will typically work in both Jive and SugarCRM. They'll often need to pull in information from around the company to get the win. For example, often the engineering team will have the latest details on the newest product features or the marketing team may have the latest competitive analysis. In many organizations, teams outside of sales, like engineering, do not have access to the CRM system. This makes integration with Jive's enterprise collaboration platform paramount for organizing and facilitating communication across the multitude of teams that affect the success of a deal.

https://developers.jivesoftware.com/assets/images/jive_devslanding_transparent.png

The intent of this scenario is to be illustrative how we can use Jive What Matters Activity Stream to to surface a basic sales deal workflow that spans multiple enterprise systems. We'll start by having Actions posted to the stream, then use several apps to interact with the information that flows in with the stream. We'll show how to update the CRM from Jive when the opportunity is won and conclude by sending a notification to Jive with the deal information and the team's pipeline.

 

Automatically Posting Actions via the App Gateway

Each day, a background process running in SugarCRM sends the sales team a set of actions via their Jive What Matters stream. This contains a list of opportunities that they are targeted to close by a specific date, in this case, the end of Jive World.

daily deals.jpg

We used the Jive App Gateway so that we could easily post actions via a back end service. When the request comes in to the App Gatewy, it's signed, so Jive knows that it's valid. It also contains the Jive Id of the target instance so Jive knows where to publish it. There are lots of use cases for pushing information into Jive via the gateway. We illustrate two in this scenario; a CRON job that pulls information from a SugarCRM daily, as shown above, and a service that is invoked as the result of an event trigger e.g. an opportunity being closed.


For more information on using the app gateway, check out the doc Using the Jive Application Gateway API. The structure below is the action entry that gets posted to the Jive App Gateway. We'll refer to various parts of this throughout the rest of this post.

---- Activity Entry ----

{"items": [

    {

        "title" : "Opportunity with the TEST ACCOUNT 1",

        "object": {

            "id": "urn:jw12sweetness:salescall:{oppId}",

            "objectType": "urn:jw12sweetness:salescall",

            "summary":

                    "<p>View <a jivemacro=\"appEmbeddedView\" __jive_macro_name=\"appEmbeddedView\" href=\"javascript:;\" class=\"jive-link-app-icon jive_macro jive_macro_appEmbeddedView\" __icon=\"https://;apphosting.jivesoftware.com/apps/dev/jw12sweetness/images/icon16.png\" __appuuid=\"9417c8f9-77ab-42fd-93c4-0c7511ceae2e\" __view=\"embedded\" __context=\"{&quot;opportunityId&quot;:&quot;{oppId}&quot;}\" modifiedtitle=\"true\">Opportunity information<span class=\"j-ui-elem j-app-link\"></span> </a> from SugarCRM </p><p><a jivemacro=\"appEmbeddedView\" __jive_macro_name=\"appEmbeddedView\" href=\"javascript:;\" class=\"jive-link-app jive_macro jive_macro_appEmbeddedView\" __appuuid=\"4df62159-dfc3-47b2-865e-275e910edf25\" __view=\"embedded\" __context=\"{&quot;contacts&quot;:[{&quot;id&quot;:&quot;dummy1&quot;,&quot;displayName&quot;:&quot;Mark Weitzel&quot;,&quot;emails&quot;:[{&quot;value&quot;:&quot;mark.weitzel@jivesoftware.com&quot;,&quot;label&quot;:&quot;Work&quot;}]}]}\" modifiedtitle=\"true\">Call this Opportunity's Contact<span class=\"j-ui-elem j-app-link\"></span></a></p>",

            "displayName": "Sales Call"

        },

        "verb": [

            "urn:opportunity:salescall",

            "posting"

        ],

        "openSocial": {

            "embed": {

                "context": {

                    "object": "{oppId}"

                },

                "preferredExperience": [

                    {

                        "target": {

                            "type": "gadget"

                        }

                    }

                ]

            },

            "deliverTo":["/people/2004", "/people/2125"],

            "actionLinks" : [

                {

                    "caption": "Close Won",

                    "target": "http://{proxyOrigin}/osJumpstart/rest/sugar/entries/opportunities/win/{oppId}",

                    "httpVerb": "post"

                },

                {

                    "caption": "Close Lost",

                    "target": "http://{proxyOrigin}/osJumpstart/rest/sugar/entries/opportunities/lose/{oppId}",

                    "httpVerb": "post"

                }

            ]

        },

        "icon": {

            "url": "http://a0.twimg.com/profile_images/2027721183/Sugar_cube_RGB_180x180_mini.png"

        },

        "content": "Follow up on <a jivemacro=\"appEmbeddedView\" __jive_macro_name=\"appEmbeddedView\" href=\"javascript:;\" class=\"jive-link-app jive_macro jive_macro_appEmbeddedView\" __appuuid=\"9417c8f9-77ab-42fd-93c4-0c7511ceae2e\" __view=\"embedded\" __context=\"{&quot;opportunityId&quot;:&quot;{oppId}&quot;}\" modifiedtitle=\"true\">\"{name}\" opportunity <span class=\"j-ui-elem j-app-link\"></span></a> with {accountName} that is closing soon.",

        "jive": {

            "display": "grouped"

        }

    }

]}

----- End ------

 

Actions for the Team

The first thing that we will look at is the behavior of Actions when they are sent to a collection of people. This is accomplished by passing an array of people in the "deliverTo" field. In the example below, this sends the Action to me (2004) and Matt (2125), which are our user IDs in the target Jive instance.

"deliverTo":["/people/2004", "/people/2125"],


This is sending THE SAME action to MULTIPLE people. The implication is that the FIRST person to act on this is taking action on behalf of the entire group of people to which the action was sent. This is great for workflows where you have a queue of things to do and team of people to accomplish them. This is a very common pattern that occurs across many different domains. For example, a development team could get a list of all the Sev 1 bugs that can be handled by any engineer, or a team of researchers may have a collection of papers to review. Of course, it's possible to make multiple copies of an action and send each to different people. Jive gives you the flexibility you need to properly surface the behavior of the back end system you are integrating with.


Interacting with Multiple Systems via !App Experiences

 

It's very rare that we use only one tool to get our job done. In this scenario, in addition to working with SugarCRM to build an integration into their platform, we also worked with Esna, to integrate a voice component. The Esna platform is very robust and can do interesting things like transcribe voice mail, record phone calls et. We are at the beginning of our integration efforts with them and are very excited about the possibilities. In this scenario, the Esna team created an embedded view of their application that, when opened, allows user to call the opportunity's main contact. Expanding the Action, there are two !App experience links present:

action details.jpg

The two links are "Opportunity Information" and "Call this Opportunity's Contact". First, the sales person may want to refresh their memory about the details of this account, so they would click the "Opportunity Information" link. This opens up a purpose built embedded view from our application, JW12Sweetness. This is just a quick summary of account to help prepare for the sales call.

opportunity details ee.jpg


To place the call, we use the embedded experience from our app partner Esna, by clicking on the "Call this Opportunity's Contact". This opens up the embedded view of Esna's app! We've had one application, JW12Sweetness, create an App Experience for another application, Esna. In this way, we are tying together multiple systems within a single action that comes into the What Matters stream.

esna calling.jpg

 

!App Experiences are created in the summary object of the Action. (Note: It's an Action because of the presence of "Action Links".) Here's a snip from the entry above.

--- Summary Object ----

  "summary":

                    "<p>View <a jivemacro=\"appEmbeddedView\" __jive_macro_name=\"appEmbeddedView\" href=\"javascript:;\" class=\"jive-link-app-icon jive_macro jive_macro_appEmbeddedView\" __icon=\"https://;apphosting.jivesoftware.com/apps/dev/jw12sweetness/images/icon16.png\" __appuuid=\"9417c8f9-77ab-42fd-93c4-0c7511ceae2e\" __view=\"embedded\" __context=\"{&quot;opportunityId&quot;:&quot;{oppId}&quot;}\" modifiedtitle=\"true\">Opportunity information<span class=\"j-ui-elem j-app-link\"></span> </a> from SugarCRM </p><p><a jivemacro=\"appEmbeddedView\" __jive_macro_name=\"appEmbeddedView\" href=\"javascript:;\" class=\"jive-link-app jive_macro jive_macro_appEmbeddedView\" __appuuid=\"4df62159-dfc3-47b2-865e-275e910edf25\" __view=\"embedded\" __context=\"{&quot;contacts&quot;:[{&quot;id&quot;:&quot;dummy1&quot;,&quot;displayName&quot;:&quot;Mark Weitzel&quot;,&quot;emails&quot;:[{&quot;value&quot;:&quot;mark.weitzel@jivesoftware.com&quot;,&quot;label&quot;:&quot;Work&quot;}]}]}\" modifiedtitle=\"true\">Call this Opportunity's Contact<span class=\"j-ui-elem j-app-link\"></span></a></p>",

---- End ----

Note: Right now, this is a pretty ugly way of creating an !App Experience because you need to know the underlying macros that Jive's RTE uses. Don't worry! We are working in improving the API so that this is isolated from you in the future. Stay tuned to the developer community for updates!

 

The key thing that makes this work is the app id that's contained in the HTML. This is represented in the HTML above as "__appuuid". This is the same ID that you get either through the dev console or when you create an app via the command line tool. The "__context" is the context that is passed to the application when the view is opened. If you look close, you'll notice two app Ids in the action above, one for JW12Sweetness and the other for Esna. In this way, as long as you know the UUID, any app with an embedded view can be utilized!

 

What we've been able to do is post one Action, asynchronously, to a team of people, that allows us to interact with multiple systems via !App Experiences, all without leaving Jive!  Being able to work with systems without losing context is a key part of turning an Activity Stream from a noisy spew of data into a powerful tool that fundamentally changes the way you get work done.

 

 

Using Action Links to Win an Opportunity

So far, we've looked at the first part of this scenario where the sales team can learn who they need to call, review the account information, and place the call. Now, let's see what happens when we win the deal. When a deal is won (or lost), we want to close this out in SugarCRM. To do this, the sales person would click on the "Closed Won" button. Taking this action sends a REST call to SugarCRM. This request is signed by Jive which enables Sugar to know which user at which instance won the opportunity! Here is how the links are defined in the Action above. We substitute in rogrammatically the {proxyOrigin} and the {oppId}.

 

 

 

When the request is properly received and returns a 200, the Action will be removed from the list and the value is SugarCRM is updated!

close won-1.jpg closedWonSugar.jpg

 

Using Notifications to Communicate Success and Close the Loop

The final step in the workflow is to notify the manager of the team of the salesperson's success an let them know a deal has been won! Again, we can post asynchronously to the What Matters stream, except in this case, we'll create a notification instead of an action. Because you can get the organization chart from Jive, it's possible that you could direct the notification to Matt's boss, a.k.a. his @manager. Here is what an incoming notification might look like.

jive won notification.jpg

 

Notice again that we use App Experiences inside of the notification. Because this was sent to a manager, they need to see information about not just the account, but also the overall performance of their team. Clicking on the "Team's Opportunity Pipeline" brings up a view of our JW12Sweetness application that pulls the right set of information from SugarCRM to reflect the progress of the overall team.

team pipeline.jpg

 

What Matters + App Experiences + Developers = Pure Awesomeness!

Jive continues to pioneer innovation that fundamentally changes the way work gets done. We're way beyond simple, noisy streams that endlessly spew bits of blah blah blah. By combining our What Matters Activity Stream with our App Experiences technology, we've created an even more powerful tool that increases your effectiveness and the efficiency of your organization by delivering information, and the ability to interact with it, directly to your fingertips, wherever you are in Jive. Opening this to developers through the Jive APIs unlocks infinite possibilities of creative integrations between multiple backend systems and Jive. What this demo showed is just the beginning. There's lots more coming!

 

What are you waiting for? Join us on our journey and Get Started Now!