User Activity - rezolved/rezolve_sdk_sampleapp_android GitHub Wiki

In order to present information about user's activities throughout the app, you will need to use the Activity Manager. It provides insights on purchase history, shipping method, delivery address, total product pricing, and other useful details. Your search criteria depends entirely on providing a Date object, so you can get history items based on specific timeframes.

User Acitivity Manager

The following features are available:

  • Get transaction history items for a time period.

â„šī¸ After the session has been established SDK related Managers like UserActivityManager are already initialised for the developer and available at RezolveSession.getUserActivityManager()

Get transaction history items for a time period

To fetch the list of orders from the server, call the getOrdersV3 function.

  • Parameters
    • userActivityInterface: A callback when the task is completed.
    • from: Optional date in yyyy-MM-dd format for getting data from that date.
    • to: Optional date in yyyy-MM-dd format for getting data to that date.

Result will be an OrderHistoryObject in case of success, or an error if it failed. Use method getOrders() from OrderHistoryObject to get order details in format of List<OrderDetails>.

userActivityManager.getOrdersV3(new UserActivityCallback() {
    @Override
    public void onGetOrdersSuccess(OrderHistoryObject orderHistoryObject) {
        orderHistoryObject.getOrders();
    }

    @Override
    public void onError(@NonNull RezolveError error) {
        // Error handling
    }
}, from, to);

OrderDetails fields:

  • timestamp: Order placement timestamp
  • status: Order's status. Available order statuses:
    • COMPLETED
    • SUBMITTED
    • CANCELED
    • PROCESSING
    • PENDING
    • PRE_CANCELED
    • UNKNOWN
  • shippingMethod: Order's shipping method.
  • shippingAddressDetails: Order's shipping address.
  • pickupAddressDetails: Order's pickup address.
  • storeDetails: Order's store details.
  • price: Order's price.
  • phone: Client's phone.
  • partnerId: Partner's Id.
  • orderId: Order's id.
  • merchantPhone: Merchant's phone.
  • merchantName: Merchant's name.
  • merchantId: Merchant's id.
  • merchantEmail: Merchant's email.
  • firstName: Client's first name.
  • lastName: Client's last name.
  • items:
  • email: Client's email.
  • billingAddressDetails: Client's billing address.
  • paymentMethod: Payment method used at order placement.
  • customPayload: Additional data.