addToCartFail

public boolean addToCartFail(    String momentId,     String msg,     Map<String, Object> properties)

Ends a particular add-to-cart moment instance and generates an error log message that indicates that adding to the cart failed.

This method should be called when it has been determined that the item could not be added to the cart.

Return

True if the operation was successful; false otherwise.

Parameters

momentId

The moment identifier returned by the `PurchaseFlow.addToCartStart` method. This moment identifier must be an identifier produced by this particular PurchaseFlow instance and must not have already been marked as completed or failed.

msg

A message that explains the reason for why this operation failed. This value is optional and, if provided, will associate the value as a property of the error log message.

properties

Custom properties to pass in as part of the add to cart failure.


public boolean addToCartFail(String momentId, String msg)

Ends a particular add-to-cart moment instance and generates an error log message that indicates that adding to the cart failed.

This method should be called when it has been determined that the item could not be added to the cart.

Return

True if the operation was successful; false otherwise.

Parameters

momentId

The moment identifier returned by the `PurchaseFlow.addToCartStart` method. This moment identifier must be an identifier produced by this particular PurchaseFlow instance and must not have already been marked as completed or failed.

msg

A message that explains the reason for why this operation failed. This value is optional and, if provided, will associate the value as a property of the error log message.