8 Replies Latest reply on Jun 2, 2013 4:24 PM by peter.lim

    Purposeful Places - shared configuration & architecture

      Hi Mark Weitzel

       

      I'm back working on purposeful places and have a few questions... I know Sonny has been asking you a few. 

       

      Question 1

      I've had a look at the Salesforce tiles and came across the "Share configuration" (screenshot below). I had a look through the code in the jive-sdk and checked the provided examples but couldn't find anything on it.

      share_config.PNG.png

      Can you tell me if and how we can use this, or provide code of an example for us to look at? I'm looking at linking a few of the related Shuriken tiles that Sonny put together and have also been working on the auth for them. It appears as if the Salesforce requests are getting sent as signed requests to "https://dealroom.jiveon.com" with some sort of ticket?

       

      Question 2

      If we wanted to deploy our custom tiles on another instance of Jive, how do we go about doing that? Is there another tileinstaller for this or will it be integrated into the admin console?

       

      Question 3

      I know it's still early days.. but will there be an API to create and set up these deal rooms?

        • Re: Purposeful Places - shared configuration & architecture

          Peter,

          I am copying Aron and Charles who wrote the sf example. The ticket that you are getting is the access token that comes from jive. It's kinda like a bearer token and is the way that you make a secure call bake to the integration middleware. If you look at the flows, which are in the docs in github but not documented yet, you'll get a sense of how this works.

           

          We're working on a way now to do installation to another jive instance. Stay tuned.

          1 person found this helpful
          • Re: Purposeful Places - shared configuration & architecture

            Hi Aron Racho - Could you please take a look at Question 1 (above) and advise? Thanks

            • Re: Purposeful Places - shared configuration & architecture

              Hi Peter,

                 Sharing configurations is enabled when multiple tiles in a place use the same "config" URL. For example, if you create 2 tiles of the same type in a place, you will always have the option to share the configuration.

               

              If you want to be able to share configurations between different tile definitions, you can set the "config" key to the same value in two different tile definitions. For example, using the node.js framework, you could

              1. Create a common configure endpoint accepting GET requests to "/myTileConfig"
              2. Modify /tiles/tile1/definition.json so that "config" is equal to "/myTileConfig"
              3. Modify /tiles/tile2/definition.json so that "config" is also equal to "/myTileConfig"

               

              By default, the "config" field will be set to "/<tileName>/configure" by the SDK, but since we provided a value for "config", it will use "/myTileConfig" instead.

               

              Since <tile1> and <tile2> now use the same configure endpoint, it is assumed they accept the same JSON format for the "config" field of a tile instance. When you configure the tiles in Jive, the "Share configuration" option will now be available!

               

              Hope that helps,

              Charles

              1 person found this helpful
                • Re: Purposeful Places - shared configuration & architecture

                  Thanks Charles, that's useful information. I just tested it out with multiple copies of the same tile and I can see the "Share configuration..." checkbox. I haven't tested it with different tiles types yet. A few follow up questions -

                   

                  Shared configuration

                  1. Does the "Share configuration..." only work when adding the tiles in the one go?
                  2. I tried updating one of the tiles with a shared configuration after saving it and it was unlinked. Does that mean each tile in a deal room would need to be updated individually or is it possible to push the configuration to multiple tiles? Is there a way to update the "shared configuration" afterwards?
                  3. I noticed that the Salesforce tiles seem to share the same config information this despite being related to different objects. i.e. Accounts vs Opportunities. Do different tile types that share configurations need the same config format?

                   

                  Handling tile data updates

                  It seems like there could be a lot of periodic requests due to the way the examples are set up.

                  1. How often do the Salesforce examples check and update the tiles?
                  2. Is there (or will there) be any way to pause updates or decrease the frequency of updates for particular groups/tiles?
                  3. Are there any "push" update examples?

                   

                  Just want to be mindful of the request overheads and possible API request limits (e.g. API Usage Limits). I can see the number of requests building up over time.. e.g. 100 active/inactive deal rooms, each with 3 tiles, each being updated every 15 minutes (4 times per hour) = 1200 requests per hour.

                   

                  Also, wondering what we would need to do to deploy purposeful places in the future - it's not something we really discussed with Mark.

                  Is the plan that we (e.g. HEDLOC) host our own purposeful place services? or will Jive be hosting the services? or will it be up to the end user to host the services?

                   

                  Thanks

                    • Re: Purposeful Places - shared configuration & architecture
                      aron.racho

                      Peter,

                       

                      You can take a look at the salesforce tile examples themselves to see what they are doing. Generate them using jive-sdk:

                       

                      jive-sdk create sfdc_opportunity_activity

                      jive-sdk create  sfdc_opportunity_detail

                      How often do the Salesforce examples check and update the tiles?
                      Are there any "push" update examples?

                       

                      Take a look at sfdc_opportunity_detail/backend/services.js of each tile. For example, in sfdc_opportunity_detail/backend/services.js;

                      exports.task = new jive.tasks.build(

                          // runnable

                          function() {

                              jive.tiles.findByDefinitionName( 'sfdc_opportunity_detail' ).then( function(instances) {

                                  if ( instances ) {

                                      instances.forEach( function( instance ) {

                                              opportunities.pullOpportunity(instance).then(function(data){

                                                  jive.tiles.pushData(instance, data);

                                          }).catch(function(err) {

                                              jive.logger.error('Error pushing salesforce data to Jive', err);

                                          });

                                      });

                                  }

                              });

                          },

                       

                       

                          // interval (optional)

                          10000

                      );

                      In our example above we're doing it every 10 seconds. In this example we are pulling data from SFDC and then pushing that data to the tile in Jive. Is that what you wanteD?

                       

                      Is there (or will there) be any way to pause updates or decrease the frequency of updates for particular groups/tiles?

                       

                      We don't have an example of controlling the updates, but there is nothing to stop developers from adding a more controlled update of the tiles/groups. The example above uses the built-in periodic scheduler of the framework but you can just as easily schedule stuff manually. If you need a more sophisticated example, we'll need to cook one up.

                      1 person found this helpful
                        • Re: Purposeful Places - shared configuration & architecture

                          Hi Aron, thanks for taking the time to respond.

                           

                          Aron Racho wrote:

                           

                          Take a look at sfdc_opportunity_detail/backend/services.js of each tile. For example, in sfdc_opportunity_detail/backend/services.js;

                           

                          OK, thanks. I'll take a look. I don't think that example was available in the jive-sdk the last time I checked.

                           

                          In our example above we're doing it every 10 seconds. In this example we are pulling data from SFDC and then pushing that data to the tile in Jive. Is that what you wanteD?

                           

                          I was thinking more along the lines of using an "after update" trigger (e.g Salesforce Triggers) instead of doing a periodic "pull". Seems to make a lot more sense when the system supports it.

                           

                          We don't have an example of controlling the updates, but there is nothing to stop developers from adding a more controlled update of the tiles/groups. The example above uses the built-in periodic scheduler of the framework but you can just as easily schedule stuff manually. If you need a more sophisticated example, we'll need to cook one up.

                           

                          OK, thanks for confirming. I was thinking it might be useful to incorporate some sort of "flag" into the group or tiles to help handle it. No need to cook up an example.

                        • Re: Purposeful Places - shared configuration & architecture
                          aron.racho
                          I noticed that the Salesforce tiles seem to share the same config information this despite being related to different objects. i.e. Accounts vs Opportunities. Do different tile types that share configurations need the same config format?

                           

                          Both tiles need you to choose an opportunity to track, so yes they can share the same config format.

                          • Re: Purposeful Places - shared configuration & architecture
                            aron.racho

                            Does the "Share configuration..." only work when adding the tiles in the one go?

                             

                            It can work when you click 'Walk through configuration' during edit mode of a social gorup.