IActionCallback2 Interface
IActionCallback2 class provides a mechanism to apply custom actions on cart finalization, submission for approval using the below Web Services.
- ActionInvokerWebService.invokeAfterFinalizeCart
- ActionInvokerWebService.invokeSyncCart
- ActionInvokerWebService.invokeSyncCartAsync
- ActionInvokerWebService.invokeFinalizeCart
- ActionInvokerWebService.invokeFinalizeCartAsync
- ActionInvokerWebService.invokeAfterSyncCart
- ActionInvokerWebService.invokeAfterSyncCartAsync
- ActionInvokerWebService.invokeAfterFinalizeCartAsync
- ActionInvokerWebService.invokeSubmitApproval
- ActionInvokerWebService.invokeGenerateDoc
Action callback executes the custom logic from Web Services on the following aspects of CPQ: ​
- Finalizing the cart
- Synchronizing the cart
- Submitting the cart for approval
- Generating documents
The following methods are available in the Apttus_Config2.CustomClass.IActionCallback2 interface:
Method |
Signature |
Description |
---|---|---|
afterFinalizeCart() |
Boolean afterFinalizeCart(Id) |
You can use this method to perform post-finalization tasks on the cart. This method is invoked when you execute the following Web Services:
|
finalizeCart() |
Boolean finalizeCart(Id) |
You can use this method to finalize the cart. This method is invoked when you execute the following Web Services:
|
generateDoc() |
Id generateDoc(Id, Apttus_Config2.CustomClass.ActionParams) |
You can use this method to generate documents for the given cart. This method is invoked when you generate documented the following Web Service:
|
submitApproval() |
Boolean submitApproval(Id, Apttus_Config2.CustomClass.ActionParams) |
You can use this method to submit the cart for approval. This method is invoked when you submit the cart for approval using following the Web Service:
|
afterSyncCart() |
Boolean afterSyncCart(Id) |
You can use this method to perform post-synchronization tasks on the cart. This method is invoked when the cart is synchronized using the below Web Services:
|
syncCart() |
Boolean syncCart(Id) |
You can use this method to perform to synchronize the cart. This method is invoked when the cart is synchronized synchronously or asynchronously using the below Web Services.
|
The following table lists the response parameters of the Apttus_Config2.CustomClass.IActionParamsCallback.
Response Parameters:Apttus_Config2.CustomClass.ActionParams | ||
---|---|---|
Name |
Type |
Description |
AccountId |
|
The ID of the Account. |
AccountIds |
|
The set of Account ID you want to use to filter the result. CPQ ignores the AccountId field if this field is used. |
ActionName |
|
The name of the action. |
ActivateOrder |
|
Indicates whether to activate the order or not. |
ApprovalCtxType |
|
The Context Type of Approval. |
ApprovalMode |
|
The Mode of Approval |
ApprovalReason |
|
The reason of Approval. |
ApprovalType |
|
The type of Approval. |
AssetLineItems |
|
The list of asset line items |
BundleId |
|
The IDs of the bundle product. |
CartIds |
|
The list of cart IDs. |
CartSyncMode |
|
The Sync Mode of the cart. For example, enum SyncMode {SYNC, FINALIZE}. |
ConfigurationId |
|
The ID of the configuration in the proposal. |
CurrentState |
|
The current state |
CustomParams |
|
The custom parameter that you have defined. |
FinalizeClass |
|
The callback class that is executed when you finalize the cart. |
Flow |
|
The flow used in the configuration |
IsAngular |
|
Indicates whether the user interface is Angular. |
IsDraft |
|
Indicated whether the proposal is in draft stage. |
LaunchState |
|
The launch state. |
LineItemIds |
|
The set of line item IDs. |
LineNumber |
|
The line number of the products. |
LocationIds |
|
The set of location IDs. |
Method |
|
The method of configuration. |
Mode |
|
The mode of the configuration. |
OrderLineItems |
|
The list of order line items. |
OriginalOrderSO |
|
The Original Order SObject |
OutputFormat |
|
The output format of the generated document. You can use the following values:
|
ProductIDs |
|
The list of product IDs. |
ProtectionLevel |
|
The protection level for the parameters you created. |
RequestId |
|
The request ID of the configuration. |
ReturnId |
|
The record ID of the business object. |
ReturnPage |
|
The return page of the business object. |
SessionId |
|
The ID of the session. |
SessionUrl |
|
The URL of the session. |
TemplateName |
|
The name of the template in the proposal. |
Example
The sample code below enables you to send out the status of the cart to the proposal owner as callback action after finalizing the cart. You can perform post-finalization by calling the Web Service Apttus_Config2. ActionInvokerWebService.invokeAfterFinalizeCart() passing the custom callback class name and the cart ID as parameters.