Id[] recommendedProductIds = new Id[0];
for(ProductRecommendation__c recommendation : recommendations) {
recommendedProductIds.add(recommendation.RecommendedProduct2Id__c);
}
System.debug('>>>>>>>>>>>'+recommendedProductIds);
// Query the price book entries of the above recommended products
PricebookEntry[] priceBookEntries = [
SELECT Id, UnitPrice, Pricebook2Id, Product2Id, Product2.Name, Product2.ProductCode
FROM PricebookEntry
WHERE Product2Id IN :recommendedProductIds AND Pricebook2Id = :pricebookId AND
CurrencyIsoCode=:quoteCurrency];
return priceBookEntries;
}
}
External Configurator Plugins
EDITIONS
Available in: Salesforce CPQ
Winter ’16 and later
Enable sales reps to create quotes that incorporate your product's unique attributes, bundle
configuration, and other information. A CPQ external configurator replaces the CPQ product
configurator for the specified products, while still allowing you to use other Salesforce CPQ features
such as price calculations and product rules.
You can develop your configurator in a Visualforce page or host it in an external web application.
Salesforce sends the product information payload to your external configurator, where you can
create and modify its attributes, configure bundles, and perform other tasks specific to your organization’s needs. Then, you send the
updated payload back to Salesforce CPQ so it can build a quote line for the product with the attributes you’ve configured. If the sales
rep reconfigures the product, the payload is sent back to your custom configurator.
Set Up an External Configurator to Launch from a Custom Action
Create a custom action that launches a non-Salesforce CPQ configurator.
Create an External Configurator
Host your configurator in Salesforce using Visualforce pages, or in an external web application such as Heroku. Use the easyXDM
library to transfer data between your configurator and Salesforce CPQ.
Configure Salesforce CPQ to Use the External Configurator
Configure the Salesforce CPQ package to launch your custom configurator from the quote line editor. Indicate which products are
configured externally by setting the product’s Externally Configurable field to true.
Set Up an External Configurator to Launch from a Custom Action
EDITIONS
Available in: Salesforce CPQ
Winter ’16 and later
Create a custom action that launches a non-Salesforce CPQ configurator.
You may have to add the following layouts and values.
•
Add the Page and URL Target fields to the custom action page layout.
•
Add the Popup value to the custom action’s URL Target field.
•
Add a label that represents your external configurator’s name to the custom action’s Label field.
1. From your Custom Actions tab, click New.
32
External Configurator PluginsSalesforce CPQ Plugins