Install and Configure Mobileforce: Sugar Instance

Install and Configure Mobileforce: Sugar Instance

Updated

This document is updated (Summer 2023) to describe three distinct actions that need to be performed in order to make Mobileforce work within your Sugar Instance.

The following topics are a guide on how to directly install and configure Mobileforce for an instance of SugarCRM without using SugarCRM Marketplace or Sugar Outfitters. This is currently how Mobileforce products are installed and set up in a Sugar instance.

Note:
In future, when Sugar Outfitters becomes active, this direct method will not be recommended. Sugar Outfitters is the enhanced SugarCRM Marketplace, which will allow you to more easily install Mobileforce. For more information, see Using Mobileforce CPQ with Sugar CRM

Assumptions:
This document assumes that you have a Sugar Instance with Sugar Sell (in order to use Mobileforce CPQ) and Sugar Serve (in order to use Mobileforce FSM). It also assumes you have Admin credentials for your Sugar Instance in order to complete Action 1 below, and Admin credentials to Mobileforce in order to complete Action 3 below.

Action 1: Install Mobileforce within your Sugar Instance

You need to be a Sugar Admin to complete the steps in this action

To install and configure Mobileforce within your SugarCRM instance, you will perform the following steps:

Action 2: Create a Mobileforce cloud Instance for Mobileforce FSM and Mobileforce CPQ.

You will need to run a (new) Mobileforce script to create a Mobileforce cloud Instance for FSM and CPQ. This instance is different from your Sugar Instance. Anyone can run this script, but you need to know some details (specifically admin email) about your Mobileforce Admin user/roles in order to complete this action.

Run the script https://apps.mobileforcesoftware.com/website/provision.php This script specifically uses the information you provide for Account Name, Work email, and CRM, to automatically create a Mobileforce Cloud Instance that is specifically customized for you and your CRM.

Use the following information for your sugar instance:

Field Value
Account Name prospect/customer name
Your Name Check w Mobileforce Support
Work Email Check w Mobileforce Support
Your Company Name similar to Account Name
Your Company Address Corp office Address
#Employees Pick a numerical value
CRM Sugar or Hubspot or Zendesk or Pipedrive

If the script succeeds, you'll get this message:

Action 3: Tie together your Sugar Instance with your Mobileforce Instance.

You need to be a Mobileforce Solutions consultant and work with Mobileforce Product Engineering to complete this step.

Specify the following Prop keys in your Mobileforce Cloud Instance ADL by using your Sugar Instance URL

Assumptions:

  1. Your Sugar instance URL is abstracted as sugar-instance-url
  2. Your Sugar instance has an admin user sguser whose password is sgpwd
  3. Your OAuth client id key in Action 1, Step 1 is ConsumerKey
  4. Your OAuth client id secret in Action 1, Step 1 is ConsumeSecret

Code snippet

1. <prop key="sugarcrm-sugarurl">sugar-instance-url</prop>
2. <prop kev="sugarcrm-oauth-accesstokenurl">sugar-instance-url/rest/v10/oauth2/token</prop>
3. <prop key="sugarcrm-sugarurl">sugar-instance-url</prop>
4. <prop key="sugarcrm-oauth-service-username">sguser</prop>
5. <prop key="sugarcrm-oauth-service-password">sgpwd</prop>
6. <prop key="sugarcrm-oauth-clientid">ConsumerKey</prop>
7. <prop key="sugarcrm-oauth-clientsecret">ConsumerSecret</prop>

Note:

  1. Mobileforce uses SugarCRM accesstokens for oAuth authentication which can can be used to set up timeout period: the time after which the accesstoken is invalidated and the user would need to re-establish a new accesstoken (by having to re-login)

  2. The duration of accesstoken validity is controlled by SugarCRM (See below)

  3. Short duration lifetime on access tokens ensure security of sessions, however may also become an inconvenience for the end-user in having to re-login every so often.

  4. A good balance for accesstoken lifetime is 60 minutes (which is the default). The smallest time interval to control access token validity is 5 minutes.

Access Token Lifetime Settings in SugarCRM

To set up SugarCRM Accesstoken lifetime, here are the steps to follow

  1. Log in as a System Administrator.
  2. Navigate to Admin > SugarIdentity (for versions 13.0 and lower, go to Admin > SugarCloud Settings).
  3. Click on Token Lifetimes (found in the Advanced Settings or Home page of SugarIdentity).

Enter the desired values in minutes:

Code snippet

    Access Token Lifetime:
    Default is 60 minutes.
    Minimum is 5 minutes.

Refresh Token Lifetime: Default is 14 days (20,160 minutes).
  1. Click Save.

Finally, one last set of changes needs to be made to the file instance.ini on our cloud infrastructure (under customers/sugarcrm/instance.ini). These changes can only be made by Mobileforce Product Engineering. Please email them to complete this last change

On Server

At the end of the file, add another entry as follows: (with values from the table above

Code snippet

[InstanceURL]
account = "prospect/customer name"
app = "mobileforce"
cpq = "Home;cpq-Quote"
fsm = "Home;easyclm-ServiceTask"
cpq_new = "Home;cpq-NewQuote"
fsm_new = "Home;easyclm-ServiceTask"

In ADL

In addition, the Mobileforce Product Engineering needs to add a specific screenID in the ADL for the screens that use the CPQ button: cpq- QuoteFilterByOpportunity

In Database

As an additional task that only the Mobileforce Product Engineering can perform, an additional entry is needed in cloud dbms fmdb in the fmaccounts database and the AccountAppLookup table.
In this table a specific sugar url (for your sugar instance) needs to be used in place of what's shown in this screenshot: