Interface QuoteFacade

All Known Implementing Classes:
DefaultQuoteFacade

public interface QuoteFacade
Facade interface providing an API for performing various quote management operations.
  • Method Details

    • initiateQuote

      QuoteData initiateQuote()
      Creates a new Quote for the current user, based on what is on the session.
      Returns:
      the newly created quote
    • submitQuote

      void submitQuote(String quoteCode)
      Submits an existing quote.
      Parameters:
      quoteCode - the code of the quote to process
    • getQuoteRequestThreshold

      double getQuoteRequestThreshold(String quoteCode)
      Gets quote threshold configured for the initial request, and the quote requires threshold validation.
      Parameters:
      quoteCode -
      Returns:
      The (positive) threshold value; 0, if none configured; or a negative number, if quote does not need threshold validation.
    • approveQuote

      void approveQuote(String quoteCode)
      Approve an existing quote.
      Parameters:
      quoteCode - the code of the quote to process
    • rejectQuote

      void rejectQuote(String quoteCode)
      Reject an existing quote.
      Parameters:
      quoteCode - the code of the quote to process
    • acceptAndPrepareCheckout

      void acceptAndPrepareCheckout(String quoteCode)
      Prepare a quote to make checkout.
      Parameters:
      quoteCode - the code of the quote to process
    • getPagedQuotes

      SearchPageData<QuoteData> getPagedQuotes(PageableData pageableData)
      Retrieves the paged list of quotes for the current user and the current base store.
      Parameters:
      pageableData - paging information
      Returns:
      the paged search results
    • createCartFromQuote

      CartData createCartFromQuote(String quoteCode)
      Creates a new cart data from an existing quote. Cart is linked to the quote.
      Parameters:
      quoteCode - the code of the quote that will generate the cart
      Returns:
      the newly created cart
    • enableQuoteEdit

      void enableQuoteEdit(String quoteCode)
      Activate quote and set it to edit mode.
      Parameters:
      quoteCode - the code of the quote to process
    • newCart

      QuoteData newCart()
      Sync quote and close edit mode.
      Returns:
      the updated QuoteData object
    • addComment

      void addComment(String text)
      Adds a comment to the session cart.
      Parameters:
      text - the comment to be added to the quote
    • addEntryComment

      void addEntryComment(long entryNumber, String comment)
      Method for adding a comment to a quote entry
      Parameters:
      entryNumber - the entry number
      comment - the comment to be added to the order entry
    • getAllowedActions

      Set<QuoteAction> getAllowedActions(String quoteCode)
      Gets the set of allowed actions for the given quote.
      Parameters:
      quoteCode - the code of the quote
      Returns:
      the set of actions allowed for the quote. Empty set will be returned if none of the action is allowed.
    • applyQuoteDiscount

      void applyQuoteDiscount(Double discountRate, String discountTypeCode)
      Applies the discount to the session cart given the discount and it's type.
      Parameters:
      discountRate - the discount rate to be applied
      discountTypeCode - the code of the discount type to be applied
    • getDiscountTypes

      @Deprecated(since="6.4", forRemoval=true) List<DiscountTypeData> getDiscountTypes()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 6.4 This method is not used anywhere
      Get discount types ready to be applied for discount.
      Returns:
      the list of discount types to be applied for quote. Empty list will be returned if nothing can be applied.
    • cancelQuote

      void cancelQuote(String quoteCode)
      Cancels a quote. The version of the quote visible to the user will have the state set to canceled.
      Parameters:
      quoteCode - the code of the quote to cancel
    • getQuotesCountForCurrentUser

      Integer getQuotesCountForCurrentUser()
      Gets the number of quotes for the current user
      Returns:
      the number of quotes
    • isQuoteSessionCartValidForCheckout

      boolean isQuoteSessionCartValidForCheckout()
      Validates if the session quote cart can be checked-out or not
      Returns:
      true if it's valid for checkout, false otherwise
    • removeQuoteCart

      void removeQuoteCart(String quoteCode)
      Removes the cart related to the given quote
      Parameters:
      quoteCode - code of the quote to detach cart from
    • getQuoteForCode

      QuoteData getQuoteForCode(String quoteCode)
      Retrieve the latest snapshot (version) of a quote by its code, for the current user and current base store.
      Parameters:
      quoteCode - The code of the quote
      Returns:
      the latest snapshot of the quote
    • requote

      QuoteData requote(String quoteCode)
      Re-quote from the existing quote to create a new quote
      Parameters:
      quoteCode - The code of the quote to be re-quoted
      Returns:
      the new quote