developers.vtex.com
Open in
urlscan Pro
2606:4700::6812:d238
Public Scan
Submitted URL: https://help.vtex.com/pt/tutorial/entendendo-o-funcionamento-das-consultas-no-master-data--tutorials_4629
Effective URL: https://developers.vtex.com/vtex-rest-api/docs/how-the-queries-in-master-data-v1-work
Submission: On September 01 via manual from CO — Scanned from DE
Effective URL: https://developers.vtex.com/vtex-rest-api/docs/how-the-queries-in-master-data-v1-work
Submission: On September 01 via manual from CO — Scanned from DE
Form analysis
0 forms found in the DOMText Content
Jump to Content APP STOREBECOME A PARTNERRELEASESHELP CENTERLEARNING CENTERFEEDBACKCOMMUNITY API GuidesAPI Reference -------------------------------------------------------------------------------- APP STOREBECOME A PARTNERRELEASESHELP CENTERLEARNING CENTERFEEDBACKCOMMUNITYLog In API Guides Log In API GuidesAPI Reference Search CTRL-K Getting StartedIntroductionPlatform overviewList of REST APIsAuthenticationMaking your first requestCatalogCreate a categoryHow to activate an SKUHow to create a specificationUpdating SKU Specifications with Catalog APICheckoutUsing Checkout API to set a discountCreating customizable fields in the cart with Checkout APIUsing APIs to place a regular orderCheckout customization guideEnabling Manual Price in my storeSave user data opt-in on CheckoutHow to configure the Region feature for SKUWhy are the UTMs not being applied to the cart?Identifying whether marketing UTMs are being sent to CheckoutEnabling an Observation field on the Checkout pageCustomizing the Checkout Confirmation pagesSetting up the Global CheckoutChanging the names of payment methods at the CheckoutHow to add and handle custom information in the orderSSL/TLS Security Protocols and Ciphers at CheckoutOrdersSubscriptionsSubscriptions v3 migration guideEnabling Manual Prices for Subscriptions v3PromotionsUsing Policy Engine API on Promotion AlertsCreating and managing coupons with Promotions APISearchPaymentsPricingScheduling prices for a range of hoursAccount managementChecking which user is currently authenticatedIntegration GuidesAPI GuidesSetting up DKIM for transactional emailsSetting up the SPFBack office (ERP/PIM/WMS)Set up catalogImport productsImport pricesImport inventoryImport customer dataSet up order integrationSet up order processingChange sellerChange orderUpdating / deleting informationFAQ: ERP IntegrationWebservice (deprecated)External MarketplaceMarketplace / Seller architectureStore setup for VTEX SellerCreating an integration app from a TemplateCatalog IntegrationCatalog logsGet product list for an initial loadHow to get a new product to offer in the marketplaceHow to get product updatesProduct and Category MappingsHow to keep prices updatedHow to keep stock updatedOrder Integration overviewRecommendationsNew Order IntegrationUpdate Order StatusHow to validate if items are available for deliverySending invoice and tracking code to the marketplaceHow to update a canceled order’s status in VTEXExternal SellerMarketplace / Seller architectureStore setup for VTEX MarketplaceExternal seller processing paymentsExternal seller connectorCatalog management for VTEX MarketplaceGift CardGift Card system architectureLogin (SSO)Admin (SAML 2.0)Webstore (OAuth 2.0)Offer Management Integration GuideOffer Management SDKPaymentsPayment Provider ProtocolPCI - DSS CompliancePayment MethodsPurchase FlowsImplementing a Payment ProviderPayment Provider HomologationPix: Instant Payments in BrazilInstalling Affirm Payment AppPayment AppSplit Payouts on Payment Provider ProtocolCustom Auto Capture FeatureLayout Development Guide for payment methods in Smart Checkout VTEXSecure ProxyPayment Provider FrameworkSearch ProtocolOverviewSpecificationRecipeReference ImplementationsSession ManagerSession data aggregation: create and transform callsSession data available from VTEX appsAdding telesales impersonated email using the Session ManagerTax ServiceOverviewSpecificationRecipeReference ImplementationsPricing HubVTEX Shipping NetworkGetting started with VTEX IO for VTEX Shipping NetworkIntegration flowNotificationTrackingVTEX TrackingIntegrating external orders via API to be used with VTEX TrackingreCAPTCHAApplicable casesImplementing reCAPTCHA in integrationsCatalogCategoriesBrandsProductsSpecificationsProduct specificationsSKU specificationsSKUsImagesAlternative API requestsHow to implement product color variationMaster DataIntroductionHow it worksComponentsArchitectureAPIConsistency LevelSchema LifecycleVTableGetting startedMaster Data v2 basicsStarting to work on Master Data v2 with JSON SchemasSetting up triggers in Master Data v2Avoiding CORS in your MasterData requestsv2 GuidesUse v2 triggers to interact with ordersCreating relationships between data entities using APISetting up an A/B test with Master Data v2 triggerSending emails with triggers in Master Data v2Dynamic expressions in Master Data v2Search by geocoordinatesSetting up alternate keysMaster Data v2 document saving flowv1 GuidesHow the queries in Master Data v1 workPaymentsConfiguration GuidesSetting up the type of interest rateSetting up Merchant ID in Apple PayCardholder document configurationOrdersActions in ordersFetching marketplace information with the Orders APIFetching payment details from a Mercado Libre order with Orders APIFormatting order invoicing time via APIAdding a second address for invoicing an orderFeed v3VTEX inStoreHow to customize inStoreCustomize inStore login optionsChange inStore languageHide anonymous customer optionDefine payment methods displayed on inStoreEnable the Observation field in the order screenEnable the sales associate codeEnable cart transfer and capture between devicesEnable order filter by sales associateForce stock availabilitySet up the order summary printingAdd extra text to the order summary printHide Print order and Reprint receipt buttonsEnable partial cancellation for Debit or Credit Direct salesHide cancellation buttonsAllow manual prices on inStoreHow to manage inStore dataCreate and manage physical stores and sales associates in Master DataGet invoiced orders placed in inStoreUI CustomizationMy AccountMy Authenticationportal-pluginsvtex.jsvtex.js for Checkoutvtex.js for CatalogMessage CenterTemplatesHow to set up functions in the Message Center templatesInfrastructureStore availabilityHow to load test a storeConversational CommerceCreate Zendesk integration All API Guides Reference Release Notes Pages START TYPING TO SEARCH… GETTING STARTED * Introduction * Platform overview * List of REST APIs * Authentication * Making your first request * Catalog * Create a category * How to activate an SKU * How to create a specification * Updating SKU Specifications with Catalog API * Checkout * Using Checkout API to set a discount * Creating customizable fields in the cart with Checkout API * Using APIs to place a regular order * Checkout customization guide * Enabling Manual Price in my store * Save user data opt-in on Checkout * How to configure the Region feature for SKU * Why are the UTMs not being applied to the cart? * Identifying whether marketing UTMs are being sent to Checkout * Enabling an Observation field on the Checkout page * Customizing the Checkout Confirmation pages * Setting up the Global Checkout * Changing the names of payment methods at the Checkout * How to add and handle custom information in the order * SSL/TLS Security Protocols and Ciphers at Checkout * Orders * Subscriptions * Subscriptions v3 migration guide * Enabling Manual Prices for Subscriptions v3 * Promotions * Using Policy Engine API on Promotion Alerts * Creating and managing coupons with Promotions API * Search * Payments * Pricing * Scheduling prices for a range of hours * Account management * Checking which user is currently authenticated INTEGRATION GUIDES * API Guides * Setting up DKIM for transactional emails * Setting up the SPF * Back office (ERP/PIM/WMS) * Set up catalog * Import products * Import prices * Import inventory * Import customer data * Set up order integration * Set up order processing * Change seller * Change order * Updating / deleting information * FAQ: ERP Integration * Webservice (deprecated) * External Marketplace * Marketplace / Seller architecture * Store setup for VTEX Seller * Creating an integration app from a Template * Catalog Integration * Catalog logs * Get product list for an initial load * How to get a new product to offer in the marketplace * How to get product updates * Product and Category Mappings * How to keep prices updated * How to keep stock updated * Order Integration overview * Recommendations * New Order Integration * Update Order Status * How to validate if items are available for delivery * Sending invoice and tracking code to the marketplace * How to update a canceled order’s status in VTEX * External Seller * Marketplace / Seller architecture * Store setup for VTEX Marketplace * External seller processing payments * External seller connector * Catalog management for VTEX Marketplace * Gift Card * Gift Card system architecture * Login (SSO) * Admin (SAML 2.0) * Webstore (OAuth 2.0) * Offer Management Integration Guide * Offer Management SDK * Payments * Payment Provider Protocol * PCI - DSS Compliance * Payment Methods * Purchase Flows * Implementing a Payment Provider * Payment Provider Homologation * Pix: Instant Payments in Brazil * Installing Affirm Payment App * Payment App * Split Payouts on Payment Provider Protocol * Custom Auto Capture Feature * Layout Development Guide for payment methods in Smart Checkout VTEX * Secure Proxy * Payment Provider Framework * Search Protocol * Overview * Specification * Recipe * Reference Implementations * Session Manager * Session data aggregation: create and transform calls * Session data available from VTEX apps * Adding telesales impersonated email using the Session Manager * Tax Service * Overview * Specification * Recipe * Reference Implementations * Pricing Hub * VTEX Shipping Network * Getting started with VTEX IO for VTEX Shipping Network * Integration flow * Notification * Tracking * VTEX Tracking * Integrating external orders via API to be used with VTEX Tracking * reCAPTCHA * Applicable cases * Implementing reCAPTCHA in integrations * Catalog * Categories * Brands * Products * Specifications * Product specifications * SKU specifications * SKUs * Images * Alternative API requests * How to implement product color variation MASTER DATA * Introduction * How it works * Components * Architecture * API * Consistency Level * Schema Lifecycle * VTable * Getting started * Master Data v2 basics * Starting to work on Master Data v2 with JSON Schemas * Setting up triggers in Master Data v2 * Avoiding CORS in your MasterData requests * v2 Guides * Use v2 triggers to interact with orders * Creating relationships between data entities using API * Setting up an A/B test with Master Data v2 trigger * Sending emails with triggers in Master Data v2 * Dynamic expressions in Master Data v2 * Search by geocoordinates * Setting up alternate keys * Master Data v2 document saving flow * v1 Guides * How the queries in Master Data v1 work PAYMENTS * Configuration Guides * Setting up the type of interest rate * Setting up Merchant ID in Apple Pay * Cardholder document configuration ORDERS * Actions in orders * Fetching marketplace information with the Orders API * Fetching payment details from a Mercado Libre order with Orders API * Formatting order invoicing time via API * Adding a second address for invoicing an order * Feed v3 VTEX INSTORE * How to customize inStore * Customize inStore login options * Change inStore language * Hide anonymous customer option * Define payment methods displayed on inStore * Enable the Observation field in the order screen * Enable the sales associate code * Enable cart transfer and capture between devices * Enable order filter by sales associate * Force stock availability * Set up the order summary printing * Add extra text to the order summary print * Hide Print order and Reprint receipt buttons * Enable partial cancellation for Debit or Credit Direct sales * Hide cancellation buttons * Allow manual prices on inStore * How to manage inStore data * Create and manage physical stores and sales associates in Master Data * Get invoiced orders placed in inStore UI CUSTOMIZATION * My Account * My Authentication * portal-plugins * vtex.js * vtex.js for Checkout * vtex.js for Catalog MESSAGE CENTER * Templates * How to set up functions in the Message Center templates INFRASTRUCTURE * Store availability * How to load test a store CONVERSATIONAL COMMERCE * Create Zendesk integration HOW THE QUERIES IN MASTER DATA V1 WORK Suggest Edits The VTEX Master Data can be extended to configure fields such as Buscável or Filtro. But what do these settings mean? The purpose of this article is to answer this question. First we will describe the flow of searches. There are two types: 1. Query by the ID; 2. Query a collection of documents. QUERY BY THE ID This type of query is the quickest way of recovering data. The ID is the most efficient reference to give us the exact storage address. We suggest you always use the attribute id. It will always be quicker than any other method of querying the VTEX Master Data. QUERY A COLLECTION OF DOCUMENTS In this type of search the fields marked Buscável or Filtro are important. But they are not the only ones you should use. The índices are also part of this process. The best way of understanding the flow of this type of search is to look at an example. In our example, we have the data entity Cliente, code CL. It is configured as follows: Nome do campoTipoé filtroé buscávelEmailEmailSimSimNomeVarchar 100nãosimIdadeIntegersimnãoTamanhoRoupaVarchar 10nãonão É FILTRO The attribute é filtro indicates that we can use a filter via a specific field or fields. In our example, we can filter through the fields Email and Idade. In the API, we can make the following query using the search path: 1. /dataentities/CL/search?Email=meuemail@provider.com 2. /dataentities/CL/search?Idade=18 If a filter is used in the Nome, field, which is not marked as a filter, the answer will be Bad Request indicating that the Nome field is not configured for a filter. É BUSCÁVEL The attribute é buscável indicates that we can search via the _keyword attribute in the search. path. The _keyword is used in the follow circumstances: “I want all the documents containing the value maria.” The API call, in this case will be: /dataentities/CL/search?_keyword=maria The asterisks are indicators for a partial query. In other words, documents with the exact value maria, will not be searched for, but only those showing this group of characters somewhere. The result of this query would give documents with values such as the following in the attributes Nome and Email: Nome=Maria Joaquina | Email=maria@provider.com. QUERY BY INDEXES The index is a feature of VTEX Master Data which works as a shortcut to find documents. It does not use the search engine (technology used for queries with filters, fulltext search and aggregation). Using this feature, the query is quicker than with a normal filter. However, the greater the number of indexes, the more slowly documents are written. Always make sure that the writing and reading process in your model is as efficient as possible in resolving problems. Queries by indexes are made via the search. path. In the search flow, when the VTEX Master Data is interpreting a query, it asks the following question: Esse filtro compõe um índice? If the answer is yes (the filter is part of an index), the search is done through the index. REINDEXING Reindexing is a background process that works as follows: 1. It reads the configurations of fields marked as Filtro and Buscável; 2. It updates the search engine with the new fields; 3. It searches all stored documents and updates the values in the search engine. When the fields of a document are written in the search engine, we say that this document is indexed. This is why we talk about “reindexing”. Note that this feature only works in cases where fields marked as é filtro or é buscável are changed. Updated 23 days ago -------------------------------------------------------------------------------- v1 Guides Configuration Guides Did this page help you? Yes No * Table of Contents * * Query by the ID * Query a collection of documents * É filtro * É buscável * Query by indexes * Reindexing