Managing Cart Status Messages in Conga Advantage Platform
Overview
In the Conga Advantage Platform, your callback code can push Error, Warning, and Information messages into the cart. These messages appear in the cart status response. You are responsible for adding and removing them explicitly because the system does not auto-clear these messages.
Error Messages
You can set different types of error messages, and each type has its own set and remove methods. If you add an error using a specific method, you must remove it using the matching remove method.
The error types include:
- Standard Error: Use SetErrorDetails(I18NMessageModel errorMessage) and remove with
RemoveErrorDetails(). - Transient Error: Use SetTransientError(string errorMsg, object[] msgParams = null) and remove with RemoveTransientError().
- Validation Error: Use SetValidationError(string message, object[] msgParams = null) and remove with and remove with RemoveValidationError().
- Error with Pricing Status Update: Use SetErrorDetailsAndUpdateStatusToError(string msg, params object[] args) or its overload SetErrorDetailsAndUpdateStatusToError(Exception ex). These methods also update the pricing status to "Error."
Important:SetErrorDetails(I18NMessageModel errorMessage)
Warnings
To set or clear a warning, use SetWarning(string message, object[] msgParams = null). To remove a warning, call the same method with message = null.
Information Messages
Information messages follow the same pattern as warnings. Use SetInformation(string message, object[] msgParams = null) to set or clear the message. To remove it, call the method with message = null.
Summary Table
| Message Type | Set Method | Remove Method |
|---|---|---|
| Error | SetErrorDetails() | RemoveErrorDetails() |
| Transient Error | SetTransientError() | RemoveTransientError() |
| Validation Error | SetValidationError() | RemoveValidationError() |
| Warning | SetWarning() | SetWarning(null) |
| Information | SetInformation() | SetInformation(null) |
