Documentation
Feedback
Guides
App Development

App Development
Services
Clients

Learn more about VTEX IO Clients and their advantages.

Clients serve as intermediaries that initiate and maintain interactions with both external and internal services. Whether interfacing with VTEX IO Services, VTEX Core Commerce APIs, or external APIs, Clients are crucial in enabling seamless communication and data exchange. This guide will explore the concept of Clients and provide a list of native Clients available in VTEX IO.

Understanding Clients

Clients are essentially configurations implemented within the VTEX IO platform to abstract and streamline communication with various services. They simplify the process of sending requests and receiving responses, acting as intermediaries between an app and the other services it relies on.

In simpler terms, think of Clients as the messengers of an app, responsible for reaching out to other services, gathering information, and returning it to your application.

Advantages of using Clients

Clients offer various advantages when it comes to managing interactions and data exchange between your app and other services. They ensure that your app functions effectively by handling the complexity of communication with other services.

When developing VTEX IO apps, using Clients can help you manage and streamline complexity. Clients centralize communication logic, making it easier to maintain and scale your codebase. VTEX IO Clients come equipped with several built-in features that enhance the functionality and performance of your applications:

  • Cache: Clients incorporate caching mechanisms to store and retrieve data efficiently, reducing the load on services and improving response times.
  • Native metrics support: Clients integrate with performance monitoring and analytics tools, providing insights into service usage and performance.
  • Retry and timeout options: Clients offer configurable retry and timeout settings, ensuring robustness and resilience in the face of network issues or service unavailability.
  • Billing tracking: Clients can track usage and resource consumption, aiding in billing and cost optimization.

List of native Clients

VTEX offers some native Clients, allowing developers to save time and effort when interacting with services such as VTEX Core Commerce APIs and other internal services.

@vtex/clients

The @vtex/clients package provides the following clients for IO apps using the node Builder:

ClientDescriptionMethods
affiliateHandles affiliate-related operations.registerAffiliate, changeNotification, createSeller, getSellerList
catalogHandles catalog-related tasks such as retrieving product and SKU information.getProductsAndSkus, getSkuById, changeNotification, createSeller, getSellerList, getSellerById, getSkuContext, getCategoryById, getBrandById
checkoutDeals with order form configurations and custom Checkout data.getOrderFormConfiguration, setOrderFormConfiguration, setSingleCustomData
logisticsManages logistics and inventory-related tasks.getDockById, pickupById, listPickupPoints, nearPickupPoints, shipping, listInventoryBySku
OMSHandles order management operations.listOrders, userLastOrder, order, orderNotification, cancelOrder
omsApiProxyActs as a proxy for OMS API operations.orders, orderFormId, customData, register
ratesAndBenefitsHandles Rates and Benefits data.getAllBenefits, getPromotionById, createOrUpdatePromotion, createMultipleSkuPromotion, updateMultipleSkuPromotion
suggestionsHandles product suggestions and versions.getAllSuggestions, getSuggestionById, sendSkuSuggestion, deleteSkuSuggestion, getAllVersions, getVersionById
FactoryDescriptionMethods
masterDataInteracts with Master Data services.get, save, update, saveOrUpdate, saveOrUpdatePartial, delete, search, searchRaw, scroll
vbaseInteracts with VBase services.get, getRaw, getWithMetadata, save, trySaveIfhashMatches

@vtex/api

The @vtex/api package provides the following clients for IO apps using the node Builder:

NameDescriptionMethods
idHandles identity management and authentication.getTemporaryToken, sendCodeToEmail, getEmailCodeAuthenticationToken, getPasswordAuthenticationToken
licenseManagerInteracts with License Manager services.getAccountData, getTopbarData, canAccessResource
masterdataInteracts with Master Data services.getSchema, createOrUpdateSchema, getPublicSchema, getDocument, createDocument, createOrUpdateEntireDocument, createOrUpdatePartialDocument, updateEntireDocument, updatePartialDocument, searchDocuments, searchDocumentsWithPaginationInfo, scrollDocuments, deleteDocument
messagesGraphQLHandles internationalization messages.translateV2, translate, translateWithDependencies, saveV2, userTranslations
catalogGraphQLInteracts with the catalog management system using GraphQL.sku, category, brand, product
paymentProviderInteracts with payment service providers.callback, inbound

Developing Clients

Consider developing your own clients if you require integration with other services not covered by VTEX native clients. Custom clients extend VTEX IO native Clients, leveraging caching and versioning functionalities.

Note that direct communication with APIs is generally discouraged in favor of implementing a dedicated Client.

Learn how to create Clients of your own by accessing the Developing Clients guide.

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page