Recommendation Callback Class in Config boosts product recommendations beyond the constraints defined by recommendation type rules. When recommendation callback class is executed based on the custom code, users 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