Config Callback Class boosts product recommendations beyond the constraints defined by recommendation type rules. When config callback class is executed based on the custom code, you can see a refined list of recommended products in the Recommendation Thumbs up icon. Recommended products will be displayed if the Show Recommended Products Cart View setting is enabled in Config Select Products Settings.

This feature is part of ConfigCallback which implements the IConfigCallback interface. This interface facilitates customization and extension of the configuration rules execution process.

The following method is available in the IConfigCallback interface and custom logic should be written inside this method:

MethodSignatureDescription

BeforeConfigRulesExecutionAsync

BeforeConfigRulesExecutionAsync(IConfigCartRequest configCartRequest)

This extension point is called before config rules execution.

AfterConfigRulesExecutionAsync

AfterConfigRulesExecutionAsync(IConfigCartRequest configCartRequest)

This extension point is called after config rules execution.

Example

The given code example implements the method of IConfigCallback interface. 

using Conga.Revenue.Common.Callback.Messages;
using System.Threading.Tasks;


namespace Conga.Revenue.Common.Callback
{
    /// <summary>
    /// IConfigCallback
    /// </summary>
    public interface IConfigCallback
    {
        /// <summary>
        /// This extension point is called before config rules execution
        /// </summary>
        /// <param name="configCartRequest">Cart and all line item of cart</param>
        public Task BeforeConfigRulesExecutionAsync(IConfigCartRequest configCartRequest);

        /// <summary>
        /// This extension point is called after config rules execution
        /// </summary>
        /// <param name="configCartRequest">Cart and all line item of cart</param>
        public Task AfterConfigRulesExecutionAsync(IConfigCartRequest configCartRequest);
    }
}
CODE

Action Callback


Action Callback can be achieved with Config Callback using its method.

Action Callback provides you a mechanism to apply custom actions on different actions available on the cart. For example, you can apply custom action before deleting or copying a bundle, finalizing a cart, submitting a cart for approval. You can directly use methods of the callback to apply the custom action or use Web Services to implement the callback.

Example:

Base product Name: “Cisco UCS”

When the base product is cloned 3 times, the name of the cloned product can be “Cisco UCS-1”, “Cisco UCS-2”, “Cisco UCS-3” etc…

Expose two interface methods, "before clone" and "after clone," for implementing as callbacks.


To use the Action Callback you must create a custom C# class that implements one of the following interfaces and you must register the custom class with Action Callback Class. You must write your custom logic in the custom C# class.

The following method is available in the IConfigCallback interface:

Method

Signature

Description

BeforeConfigRulesExecutionAsyncBeforeConfigRulesExecutionAsync(IConfigCartRequest configCartRequest)

This extension point is called before config rules execution.