PurchaseFlow

public final class PurchaseFlow extends CustomFlow

This class is responsible for tracking app performance during purchase flows.

This class is thread-safe.

Functions

Link copied to clipboard
public boolean addToCartComplete(String momentId)
public boolean addToCartComplete(String momentId, Map<String, Object> properties)
Ends a particular add-to-cart moment instance and generates an info log message that indicates that adding to the cart completed.
Link copied to clipboard
public boolean addToCartFail(String momentId, String msg)
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.
Link copied to clipboard
public String addToCartStart(    String itemId,     Number quantity,     Number price,     Map<String, Object> properties)
Starts an add-to-cart app moment.
Link copied to clipboard
public boolean momentComplete(String momentName)
Completes all started instances of the specified custom moment.
public boolean momentComplete(String momentName, String momentId)
public boolean momentComplete(    String momentName,     String momentId,     Map<String, Object> properties)
Completes a started instance of the custom moment specified by the moment identifier.
Link copied to clipboard
public boolean momentFail(String momentName, String msg)
Fails all started instances of the specified custom moment and generates an error log message for each failed moment instance.
public boolean momentFail(    String momentName,     String momentId,     String msg)
public boolean momentFail(    String momentName,     String momentId,     String msg,     Map<String, Object> properties)
Fails a started instance of the custom moment specified by the moment identifier and sends an error log message for the failed moment instance.
Link copied to clipboard
public String momentStart(    String momentName,     boolean doesAllowScreenshot,     Map<String, Object> properties)
Starts a custom moment.
Link copied to clipboard
public boolean purchaseComplete()
public boolean purchaseComplete(Map<String, Object> properties)
Ends the purchase moment and generates an info log message that indicates that the purchase completed.
Link copied to clipboard
public boolean purchaseFail(String msg)
public boolean purchaseFail(String msg, Map<String, Object> properties)
Ends the purchase moment and generates an error log message that indicates that the purchase failed.
Link copied to clipboard
public boolean purchaseStart(    String orderId,     Number numItems,     Number amount,     String paymentType,     Map<String, Object> properties)
Starts a purchase moment.