Install and Configure Mobileforce for Salesforce Sales

Install and Configure Mobileforce for Salesforce Sales

This article is for Mobileforce solution engineers and needs Admin Access not only to Mobileforce but also to Salesforce Sales.

Adding CPQ tab in Salesforce Sales

  1. Start from the App Launcher icon in the top left and select Sales.

The Mobileforce CPQ workflow can be configured to initiate either from an Account object or from an Opportunity object.

Configuring your Mobileforce CPQ App

The following prop keys can be set in your Mobileforce instance in order to configure and use Mobileforce CPQ with Salesforce Sales CRM.

Code snippet

<prop key="cpq-param-prefix">sf-prod-</prop>
<prop key="sf-prod-listinfo">{"Opportunity" : ["AccountId", "CloseDate", "Amount", "Type", "StageName", "Probability", "NextStep"]}</prop>
<prop key="sf-prod-ignore-layout">0</prop>
<prop key="sf-prod-non-layout-fields">1</prop>
<prop key="sf-prod-datatable-url">https://apps.mobileforcesoftware.com/adapters/sf-php-oauth-v2/service/describe.php</prop>
<prop key="sfdc-opportunitylineitem-properties-to-update"/>
<prop key="sfdc-product-match-create-map">{"ProductCode":"cpq_code", "Name":"cpq_name", "Description":"cpq_desc"}</prop>

Offline Settings

Mobileforce CPQ supports offline access and quoting on Salesforce sales, which can be configured using the following properties.

Code snippet

<prop key="offline-enable">1</prop>
<prop key="offline-sync-tables">Account,Contact,Opportunity,CallPlan__c,User,Role</prop>
<prop key="offline-sync-up-to-date-tables">Account,Contact,Opportunity,CallPlan__c,User,Role</prop>
<prop key="offline-cache-sqlite">1</prop>
<prop key="save-offline">[{"screenId" : "Home;Account"}, {"screenId" : "Home;Contact"}]</prop>

Additional prop keys needed for supporting Salesforce Sales. The convention is to use the prefix sf-prod or sfdc- to indicate that the prop key is specific to Salesforce Sales.

Code snippet

<prop key="auth-param-prefix">sf-prod</prop>
<prop key="auth-datatable-param-prefix">sf-prod-</prop>
<prop key="auth-datatable-schema-url">https://apps.mobileforcesoftware.com/adapters/sf-php-oauth-v2/service/describe.php#Contact</prop>
<prop key="auth-datatable-service-email">service-email</prop>
<prop key="oauth-service-override-mobile-sf-prod-">nnnn</prop>
<prop key="login-oauth-button-sf-prod-">Login with Salesforce Credentials</prop>
<prop key="auth-redirecturl">https://apps.mobileforcesoftware.com/adlwebui/service/finishLogin.php</prop>
<prop key="auth-service-login-param-prefix">sf-prod-</prop>
<prop key="sf-prod-tables">Contact,Account,Opportunity,Account,Lead,Task,Note,OpportunityLineItem,Product2,Event,Attachment,Pricebook2,PricebookEntry,Order,ContentDocument,ContentDocumentLink,ContentVersion</prop>
<prop key="sf-prod-types">folder,document</prop>
<prop key="sf-prod-features">update,comments</prop>
<prop key="sf-prod-online-edit">1</prop>
<prop key="sf-prod-all-filters">{"Task" : " USING SCOPE mine WHERE Status != 'Completed'|My Open Tasks| USING SCOPE mine WHERE Status = 'Completed'|My Closed Tasks| USING SCOPE mine |My Tasks||All Tasks"}</prop>
<prop key="sf-prod-resolve-by">value</prop>
<prop key="sf-prod-generate-filters">dynamic</prop>
<prop key="sf-prod-go-service">http://localhost:9090</prop>
<prop key="sf-prod-filter-field-validation">salesforce</prop>
<prop key="sf-prod-enable-user-filters">1</prop>
<prop key="sf-prod-show-all-related-tables">1</prop>

Authentication Settings

Mobileforce CPQ uses SSO with Salesforce authentication, thus obviating the need for a separate set of credentials. This is configured as follows. Note that you'll obtain the client-id and client-secret for the Mobileforce CPQ app from your Salesforce developer account by registering the Mobileforce CPQ App (see steps below).

Code snippet

<prop key="sf-prod-oauth-version">2.0</prop>
<prop key="sf-prod-oauth-clientid">your-client-id</prop>
<prop key="sf-prod-oauth-clientsecret">your-client-secret</prop>
<prop key="sf-prod-oauth-scope"/>
<prop key="sf-prod-oauth-authurl">https://login.salesforce.com/services/oauth2/authorize</prop>
<prop key="sf-prod-oauth-accesstokenurl">https://login.salesforce.com/services/oauth2/token</prop>
<prop key="sf-prod-oauth-redirecturi">https://apps.mobileforcesoftware.com/oauth2callback</prop>
<prop key="sf-prod-oauth-accessmethod">header</prop>
<prop key="sf-prod-oauth-clientauthmethod">requestparams</prop>
<prop key="sf-prod-datatable-url">https://apps.mobileforcesoftware.com/adapters/sf-php-oauth-v2/service/describe.php</prop>
<prop key="sf-prod-datatable-Opportunity-url">https://apps.mobileforcesoftware.com/adapters/sf-php-oauth-v2/service/describe.php#Opportunity</prop>
<prop key="sf-prod-datatable-Account-url">https://apps.mobileforcesoftware.com/adapters/sf-php-oauth-v2/service/describe.php#Account</prop>
<prop key="sf-prod-datatable-Contact-url">https://apps.mobileforcesoftware.com/adapters/sf-php-oauth-v2/service/describe.php#Contact</prop>

Warning:
Whichever Salesforce admin user configured the Salesforce Sales is the user who can see the configuration changes. For any other users to be able to see these configuration changes, additional steps need to be taken. Please contact Mobileforce Support.

Note:
Mobileforce Settings can sometimes encounter an issue to do with caching, where the "logoff" action doesn't work for users, which prevents the user from being changed. To overcome this, the administrator user has to clear the cache (of the Mobileforce DBMS and the fmouth database) for the following tables relating to your account and app: ( AdlSession, AdlSessionVar, OAuthState, OAuthToken). Please contact Mobileforce Support.

Configuring Salesforce Instance

You have to register the Mobileforce App in your Salesforce instance and obtain its OAuth credentials.

The steps to follow are roughly described here.

Login to your Salesforce developer instance and in "Quick Find" type "App Manager" --> Select "New Connected App".

Fill in the fields indicated in the screenshot, specifically: the call-back URL, and oauth scopes. Make sure to select the necessary check-boxes (again: see the screenshot below).

Now, obtain your client-id and client-secret from this connected app as follows.

Alternatively, you can also access your registered apps via Salesforce login: use your developer credentials.

  1. Type "Apps" in Quick Find
  2. Click on Build --> Create --> Apps

This will bring you to the Apps quick find menu from where you can click "new" to register the Mobileforce CPQ app, or if already registered, you will see the Mobileforce CPQ app.