The Cart Lifecycle Callback in CPQ on Platform is utilized during cart creation to populate fields that cannot be written as formula fields. It enables the execution of more complex logic, similar to actions performed in triggers before before the cart is finalized.

To use the Cart Lifecycle Callback you must create a custom C# that implements the ICartLifecycleCallback interface and register the custom C# with Cart Lifecycle Callback Class. You must write your custom logic in the custom C#.

The following method is available in the ICartLifecycleCallback interface:

MethodSignatureDescription
BeforeCartCreationAsyncBeforeCartCreationAsync(IProductConfiguration cart)You can use this method to enable or disable an action button. User has to mention the desired action button.


Example

using Conga.Revenue.Common.Callback.Entities;
using Conga.Revenue.Common.Callback.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Conga.Revenue.Common.Callback
{
    /// <summary>
    /// This interface will be used to update product configuration via callback.
    /// </summary>
    public interface ICartLifecycleCallback
    {
        /// <summary>
        /// Used to update product configuration
        /// </summary>
        /// <param name="cart"></param>
        /// <returns></returns>
        public Task BeforeCartCreationAsync(IProductConfiguration cart);
    }
}
CODE