Creating a quote from Salesforce.com
A quote is a document that allows a prospective customer to see a predetermined set of items and quantities at a predetermined price, to be delivered on a specific date, which is created by a sales representative.
A sales representative must be able to create quotes that can be used to store all the information that is required during the quoting process, including customer details, information about the items and their price adjustments, and the payment and shipment terms that will be used if the quote is converted to an order.
When using Sterling™ Field Sales from Salesforce.com, a quote can be created only if an opportunity already exists to which a new quote can be linked. New quotes are created from the Opportunity Detail screen in Salesforce.com.
Notes:
- In a multicurrency Salesforce.com organization, all quotes associated with an opportunity must have the same currency as the opportunity.
- IBM® has created a trigger,
CurrencySciQuoteCheckTrigger, which prevents a multicurrency organization from changing an opportunity's currency if one of more quotes exist for the opportunity. - The value of a Quote line does not get reflected in the Expected Revenue of the Opportunity in Salesforce.com. If you want the quote value to be added to the expected revenue of the opportunity, then it is recommended that you create relevant customization.
IBM has created a custom Quotes (SciQuote) object, which has a Master-Detail relationship to the Salesforce.com Opportunity object. The object stores summary information about a quote in Sterling Field Sales; a record is created when a quote is created in Sterling Field Sales, and the record is updated when the quote is updated in Sterling Field Sales. Because of the Master-Detail relationship, Quotes can appear as a Related List on the Opportunity Detail page.
The Quotes related list contains a create quote button, New Quote. When this button is clicked, a Sterling Visualforce page, VisualforceSCIQuoteAdd, is displayed in Salesforce.com. Depending on how you have integrated Sterling Field Sales, the Visualforce page has an iFrame or a native quote management application, which contains a source URL that points to the Sterling Field Sales application. The processing of the URL in Sterling Field Sales invokes a strut that executes the SFS_CreateQuoteFromSFDC_1.1 service. When the service has completed executing, the Sterling Field Sales screen is displayed within the Visualforce page.
The SFS_CreateQuoteFromSFDC_1.1 service uses the SessionID to connect to Salesforce.com and retrieve the details of the opportunity, account, and customer for the new quote. The service then calls the following sequence of API calls to ensure that a corresponding customer and opportunity exist in Sterling Field Sales:
- The getCustomerList API is called to verify if a customer exists in Sterling Field Sales with the same ID as the CustomerID and CustomerContactID in Salesforce.com.
- If a matching customer ID does not exist in Sterling Field Sales, the manageCustomer API is called to create a
customer. This customer creation is used only to complete the quote creation. Only the required
fields are copied from Salesforce.com; the complete customer information is not populated. Refer to
the detailed comments provided in the
com.sterlingcommerce.integration.sfdc.customapi.CreateQuotesWithDataFromSFDCsample class to understand how this code is implemented.You must implement customer data synchronization between Sterling Field Sales and Salesforce.com to get the complete and updated customer data in the quotes.
Note: The time zone on a user's records must be the same in both Sterling Field Sales and Salesforce.com. - The getOpportunityList API is called to verify if the opportunity exists in Sterling Field Sales.
- If the opportunity does not exist in Sterling Field Sales, the manageOpportunity API is called to create an opportunity.
- Finally, the createOrder API is called to create the new quote and link the quote to the opportunity.
If you have integrated Sterling Field Sales as an iFrame, and when a new quote is successfully created, the Sterling Field Sales user interface is invoked and the quote that was created is displayed in the Customer tab of the Quote details screen. This screen differs slightly when accessing it from Salesforce.com as opposed to accessing it directly from Sterling Field Sales. When the screen is accessed from Salesforce.com, the screen is automatically pre-populated with the customer's data. The only customer data that can be modified from this screen is the contact. Note, however, that a new contact cannot be created from this screen. At this point, the sales representative can enter or change the name of the quote. Additionally, the sales representative can mark the quote as the primary quote for the opportunity by clicking the Mark as Primary related task in the Quote details screen.
If an error occurs during quote creation, an error page will be displayed in Sterling Field Sales, and the error message will explain why the quote could not be created.
For a graphical overview of how data flows between Sterling Field Sales and Salesforce.com, refer to “Overview of Sterling Field Sales for Integration with Salesforce.com”.