Using Mobileforce CPQ with Sugar CRM
Using Mobileforce CPQ with Sugar CRM
Updated on Nov 15, 2023
Published on Jul 8, 2022
12 minute(s) read
Mobileforce CPQ seamlessly integrates with your CRM, so you can easily access the CPQ module from the SugarCRM User Interface as well as creating a proposal from the SugarCRM Opportunities module. Additional benefits include:
Same Credentials:
Mobileforce CPQ uses SugarCRM's user credentials when requesting access, removing the need for separate Mobileforce credentials.
Embedded User Interface:
The Mobileforce CPQ user interface is embedded and accessible directly from the SugarCRM interface and has the same look and feel (font, color scheme, and user experience) as any SugarCRM table.
Access Control:
Mobileforce CPQ supports access control of CPQ screens and operations using Mobileforce expressions in conjunction with SugarCRM roles.
Example:
You can use a Quote UI Layout to restrict access to a column in the Line Items table from users who do not satisfy the role "is_ibs_opportunity". This role is itself computed using Mobileforce expressions.
Video Overview
Mobileforce CX CPQ Overview+SugarCRMDemo - YouTube
Mobileforce CX CPQ Overview+SugarCRMDemo
Implementation of Mobileforce CPQ for Sugar CRM
Mobileforce CPQ is a cloud-hosted product, which can be directly implemented to your cloud-hosted SugarCRM platform.
For now, please use the direct method to install Mobileforce apps (CPQ and FSM) onto your Sugar instance from Install & Configure Mobileforce in a Sugar Instance (Direct Method).
In future, to use Mobileforce CPQ with your existing SugarCRM platform, you must implement and configure the solution from the Sugar CRM Marketplace. The new SugarCRM Marketplace is "Sugar Outfitters" which will eventually enable direct installation of Mobileforce Apps onto your Sugar instance from the marketplace.
Sugar Outfitters: https://www.sugaroutfitters.com/addons/mobileforce-cx-cpq
Note:
This task can only be performed by a Sugar CRM user with admin capabilities.
Launching Mobileforce CPQ from SugarCRM
Once you have implemented the Mobileforce CPQ solution with your SugarCRM platform, you can launch the Mobileforce CPQ application directly as a module from the SugarCRM platform using one of the following methods:
- Creating a Mobileforce CPQ proposal/quote directly from an existing SugarCRM Opportunity, allowing Mobileforce to populate the quote with the applicable Opportunity data.
- Launching the Mobileforce CPQ application as a module directly from the SugarCRM Navigation Bar. From the Mobileforce CPQ application, you can create new proposals, associating it with existing CRM opportunity and customer information.
Opening the Mobileforce CPQ Application
When Mobileforce CPQ is installed, you can directly access the Mobileforce CPQ module from the navigation pane on the left side of the screen,. The CPQ module will be the last module by default (highlighted in yellow).
Update the navigation bar
If you want to configure the SugarCRM navigation bar to better prioritize the CPQ module, you can configure it using your user preferences, where you can select which modules you want to display, as well as the order they appear in the navigation bar. For more information, refer to the SugarCRM Getting Started documentation.
Viewing the CPQ Module
When you click the CPQ button, the CPQ main menu is displayed.
Note:
You can click the button to expand the Mobileforce menu to navigate it, and click again to collapse the menu when finished.
From here you can do the following actions:
- Sellers can create proposals and quotes,
- Approvers can approve existing proposals and quotes.
- Admins can use CPQ Setup to configure the module to suit their needs.
Creating a Mobileforce CPQ Proposal from an Opportunity
SugarCRM allows you to create a proposal directly from one of its existing (native) module/objects: Opportunities.
Click the CPQ button and select Create.
Mobileforce CPQ populates the Customer Info section with the applicable information from the SugarCRM Opportunity. For more detailed information, see How does Mobileforce CPQ Interact with SugarCRM.
You can then update the proposal as needed. For more information, see Creating a Proposal.
Writing CPQ output back to SugarCRM
Once you have completed your proposal/quote in Mobileforce CPQ, you save the quote back to the associated SugarCRM Quote Table, at which point, Mobileforce CPQ updates the SugarCRM Opportunity object as well as the SugarCRM Quote Table as follows:
- The Likely amount in the Opportunity is updated with the Adjusted Total amount from the Quote tab.
- The quote and the line items are added to the associated SugarCRM Quote Table and the Quoted Line Items Table, where they can be processed. In effect, a new Quote object is created within SugarCRM, and it is made the primary quote.
- Under this newly created SugarCRM Quote object, a product is created for each line item in the Mobileforce Quote.
- In addition, optionally, Mobileforce can create a Revenue Line Item in the opportunity object for each CPQ line item.
- The Latest generated CPQ quote document is also uploaded to the SugarCRM Opportunity object.
- The status of the deal or opportunity advances to the next stage (for example, the status changing from In Progress to Quote Sent to Customer.
Additionally your organization can create custom actions that Mobileforce CPQ will invoke when the proposal is saved to SugarCRM. These actions can only be completed by a user with admin privileges.
How does Mobileforce CPQ interact with SugarCRM
This section provides greater detail about the interfacing between Mobileforce CPQ and SugarCRM. This information is primarily useful for SugarCRM admins who want to know the specifics of how Mobileforce CPQ is interacting with the SugarCRM database.
- SugarCRM has the following relations (tables) that are central to CPQ: Opportunity, Revenue Line Items, Quote, and Quoted Line Items.
- Note that each Opportunity contains one or more Revenue Line Items, and similarly, each Quote contains one or more Quote Line Items.
- Mobileforce CPQ directly manipulates two objects related to the tables:
- Quote Line Item (QLI): A child of the Quote table.
- Revenue Line Item (RLI): A child of the Opportunity table.
The above SugarCRM Tables are typically updated using pricing fields in the quote which are mostly predefined default system fields. However, some quotes may customize the default pricing computations for one or more line item tables. For such quotes, we need some means to override the pricing fields used.
Mobileforce lets you customize the generation of SugarCRM Revenue Line Items and Quote Products for a line item table by adding custom attributes to that table. This is done by adding these attributes to the 'Custom Attributes' section of the line item table in the Quote UI Layout. By convention, all custom attribute names used by the 'Save to CRM' action start with 'crm-'.
Most custom attributes are field attributes. Field attributes identify which fields in the CPQ form should be read to fetch the relevant data needed to generate the SugarCRM entries. By convention, the names of field attributes start with 'crm-field-'.
Note:
For more information about field attributes, please contact Mobileforce Customer Success.
Proposal/Quote creation
At the beginning of the CPQ process, when a proposal/quote is created, Mobileforce CPQ extracts information from the SugarCRM Opportunity table (for example: Account, Contact, and Close Date) for use throughout the CPQ process.
Saving a Proposal/Quote back to SugarCRM
At the completion of the CPQ process, where the seller saves a Mobileforce CPQ quote to SugarCRM, Mobileforce adds a new Quote object to the Quote relation, and writes each line item in the quote as a Quote Line Item in Sugar CRM.
Note:
Each time that a quote is saved, a new Quote object and the corresponding Quote Line Items are created. Mobileforce never overwrites previously created Quotes or Quote Line Items in SugarCRM.
This enables the user to view history of all quotes and their associated QLIs.
SugarCRM does not provide access for Mobileforce CPQ to update the Amount field in the SugarCRM Opportunity table, so Mobileforce CPQ creates a Revenue Line Item object in SugarCRM for each line item in the proposal, creating a 1-to-1 relationship between them. In addition, you can use automation from SugarCRM to update the Amount field in an Opportunity object based on the values of the Revenue Line Items.
Note:
Each time that a quote is saved, a Mobileforce overwrites the existing Revenue Line Items with new information to reflect the latest version of the Mobileforce Proposal/Quote.
SugarCRM Admin Tasks
SugarCRM admins can add trigger rules to update the Amount field in the SugarCRM Opportunity table whenever Mobileforce CPQ creates a new RLI object. This can only be performed by a SugarCRM Admin, and is outside the scope of Mobileforce CPQ.
Mobileforce CPQ Admin: Saving CPQ data to SugarCRM
Save To CRM Action
CPQ data is saved into a SugarCRM Opportunity via a 'Save To CRM' action added to the quote UI layout.
This action is typically configured as follows:
Code snippet
<action id="save_quote_to_opportunity" name="Save to CRM" url="https://apps.mobileforcesoftware.com/somepath/update.php" validate="1" postsave="1" postsavecomment="Successfully saved Quote to CRM Opportunity" hidden="1"/>
This action performs the following:
- Create a new Quote object and make it the primary quote.
- Create a product under the Quote object for each line item.
- If enabled, create Revenue Line Items in the opportunity for each CPQ line item. This can be enabled by either setting ADL property cpq-update-rli to 1 or setting a CPQ form parameter update_rli to a non-empty value.
- Upload the latest generated CPQ document
Configuration
This section describes how the 'Save to CRM' action is configured and customized.
Line-Item Table Attributes
The 'Save to CRM' action generates the relevant SugarCRM Revenue Line Items and Quote Products from pricing fields in the quote. Most of the time, these values are read from predefined system fields. But some quotes may customize the default pricing computations for one or more line item tables. For such quotes, we need some means to override the pricing fields used.
One can customize the generation of SugarCRM Revenue Line Items and Quote Products for a line item table by adding custom attributes to that table. This is done by adding these attributes to the 'Custom Attributes' section of the line item table in the Quote UI Layout. By convention, all custom attribute names used by the 'Save to CRM' action start with 'crm-'.
Field Attributes
The table below describes each field attribute and their purpose.
| Attribute Name | Default Field | Description of field value |
|---|---|---|
| crm-field-name | cpq_name | Name of the product. |
| crm-field-code | cpq_code | Product code. |
| crm-field-desc | cpq_desc | Product description. |
| crm-field-quantity | cpq_quantity | Product quantity. |
| crm-field-unit-price | Product unit price. If the quote uses tiered or volume pricing, it is not recommended that you set this field. It is better to set crm-field-list-total-price instead. The unit price would be computed by dividing the list total price by the quantity. | |
| crm-field-list-total-price | cpq_list_total_price | Price after taking quantity into account but before applying any discounts. |
| crm-field-user-discount-type | cpq_user_discount_type | Type of the user discount. Should be 'percent' or 'amount'. |
| crm-field-user-discount | cpq_user_discount | Amount of the user discount. |
| crm-field-net-total-price | cpq_net_total_price | Total price after discounts. For recurring products, this is the price for a single billing cycle. |
| crm-field-duration-unit | cpq_price_recurrence | For recurring products this specifies the billing interval. For SugarCRM, only 'OneTime', 'Daily', 'Monthly', and 'Yearly' are supported. |
| crm-field-duration-value | number_of_months | Total number of months that a recurring product will be charged for. |
| crm-field-term-start-date | term_start_date | Date that which billing starts for a recurring product. |
| crm-field-table-net-subtotal | {line_items}_cpq_net_subtotal | Sum of the prices of all line items, after quantity, discounts, and duration is taken into account. |
| crm-field-table-system-total | {line_items}_cpq_system_total | Sum of the prices of all line items, after quantity, discounts, and global adjustments. |
Other attributes
Other attributes is a grab bag of non-field attributes.
| Attribute Name | Default Value | Description |
|---|---|---|
| crm-recurring | 0 | If 1, then all products in the line item table will be treated as recurring products, (e.g., services or licenses), even if the product is configured to be non-recurring. |
| crm-duration-unit-default | Yearly or '' | Default billing interval to use if the product has no billing interval field. |
ADL Properties
The 'Save to CRM' action also accepts some ADL properties
| Property Name | Default Value | Description |
|---|---|---|
| cpq-update-crm-fields | If specified, this is a JSON object that describes how to update any SugarCRM table. Details of this field is described later. | |
| cpq-update-crm-fields-{quote} | Similar to 'cpq-update-crm-fields', except that it applies only to the named quote. | |
| cpq-update-rli | 0 | If 1, also generate SugarCRM Revenue Line Items. |
| cpq-quote-id-mapping | If specified, this specifies the field name in a SugarCRM quote that contains the MobileForce quote ID. | |
| sugarcrm-sales-stage-proposal | Proposal/Price Quote | Name of the SugarCRM QUote Proposal Stage to use in created Revenue Line Items. |
Updating external CRM fields
The 'Save To CRM' action also supports the updating of any field of any SugarCRM table with values taken from the quote.
This is enabled by setting either the 'cpq-update-crm-fields' or 'cpq-update-crm-fields-{quote}' ADL properties. The value of these properties are a JSON document describing in detail which fields in which tables need updating.
JSON document schema
The JSON document must be an array of JSON objects, where each object describes how to update a particular SugarCRM table. The attributes of this object are:
| Attribute Name | Required? | Description |
|---|---|---|
| table | Yes | Name of the SugarCRM table to update |
| id | Yes | ID of the row in the table to update. The value of this field is a form-expression that will be evaluated to determine the row ID. This form-expression can reference fields in the quote. |
| action | No | Update action to perform. Can be 'update' or 'create'. By default, it is 'update'. (Note: the 'create' action is experimental.) |
| scope | No | Name of the line-item table to use as a context for evaluating form expressions. The table update action will be run for each line item. Useful, if you wish to update separate table rows based on the line-items. (Note: This feature is experimental.) |
| fields | Yes | Associative array whose keys are the SugarCRM fields to update and whose values are form-expressions that specify the values to set these fields to. These form-expressions can reference fields in the quote. |
Note that experimental attributes have not been fully tested and are not officially released.
Example
This example will update the 'description' field in the SugarCRM 'Opportunities' table with the CPQ quote field 'company_name'.
The ID of the opportunity to update is determined from the CPQ quote field 'opportunity'.
Code snippet
<prop key="cpq-update-crm-fields">
[
{
"table": "Opportunities",
"id": "opportunity",
"fields": {
"description": "company_name"
}
}
]
</prop>
Was this article helpful?
Yes No