Salesforce CPQ provides two options to set the Order Start Date :
- Quote Start Date
- Today's Date
What if you want to populate the Start Date of the Order to a specific date from Quote, admin or developer will
- Create a Process Builder to populate from Quote
- Before Trigger on Order to populate the Start Date
The disadvantages of the above approach are an extra update on the Order and its custom build. This approach is likely to conflict with CPQ automation and validation. By default, CPQ will set the Order Start Date according to the package setting. When Order Start Date is set, managed Apex Triggers set Order Product Start Dates and End Dates, preserving the overall term length.
What are the options available out of the box from Salesforce CPQ?
What are the options available out of the box from Salesforce CPQ?
Order Management Plugin :
- Is used to set the Start Date of the Order, Salesforce CPQ automatically calls the plugin code to populate the Start Date of the Order.
- When the Start Date of the Order is set, Order Lines Start Date and End Date is adjusted accordingly.
- Order Management Plugin is just used to populated the Start Date of Order but not any other fields on Order
- The advantage of the plugin is you can also check any business logic in the apex class. Based on the Quote type you can set the Start Date. Say for example amendment Quote Start Date will be always Order Start Date this will ensure Subscription End Date doesn't cross the End Date of Contract.
Setup :
- Create a field on Quote object called Order_Start_Date__c this can be a formula date field or date field.
- Create a new apex class that implements SBQQ.OrderManagementPlugin
- The name of the Apex class for the Order Management Plugin(i.e CPQ_OrderPlugin) goes in the field Order Management Plugin in the Plugins tab of the CPQ Package Settings.
- Go to the Order tab in the CPQ package settings and set Default Order Start Date to "-- None --". If any other value is populated here, it overrides the plugin.
Code :
- You can find the plugin code in GitHub code: https://github.com/laxmanrao564sf/OrderPluginSalesforceCPQ
Conclusion :
- First preference is always to use out of the box configuration feature from CPQ
- Second preference is to check if there are any APIs/Plugins provided by CPQ
- Go for a custom build.
Thank you for sharing wonderful information
ReplyDeleteSalesforce CPQ Online Training Hyderabad
Salesforce CPQ Online Training India