VTEX

List products and create orders in your VTEX commerce platform.

E-commerceAPI key17 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (17)
  4. create-brand
  5. create-product
  6. create-sku
  7. create-sku-file
  8. delete-brand
  9. get-brand-by-id
  10. custom_api_call
  11. get-brand-list
  12. get-category-by-id
  13. get-client-by-id
  14. get-client-list
  15. get-order-by-id
  16. get-order-list
  17. get-product-by-id
  18. get-sku-by-product-id
  19. update-brand
  20. Update-product
  21. Details

Connect

Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("vtex", action, input) resolves with the provider's answer and rejects when VTEX isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "vtex"} says whether yours can call it.

Workflow
// workflows/notify.ts: call VTEX when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellVtex = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when VTEX isn't connected.
  const output = await step.run("VTEX", () =>
    step.ctx.integrations.invoke("vtex", "create-brand", {
      "Name": "<name>"
    }),
  );
  step.ctx.log("VTEX answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "vtex",
    "piece_action": "create-brand",
    "input": {
      "Name": "<name>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/vtex/create-brand" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"Name":"<name>"}}'

Actions

create-brand

Create new Brand. Create a new Brand to your catalog

InputTypeDescription
NamerequiredtextName
SiteTitleoptionaltextSite Title
LinkIdoptionaltextLink ID
IdoptionalnumberSet the brand ID
TextoptionaltextText
MenuHomeoptionalbooleanMenu Home
KeywordsoptionaltextSimilar words
ActiveoptionalbooleanActive
ScoreoptionalnumberScore

create-product

Create New Product. Create a new product in your catalog

InputTypeDescription
NamerequiredtextName
TitlerequiredtextTitle
DescriptionrequiredtextDescription
BrandIdrequirednumberBrand ID
CategoryIdrequirednumberCategory ID
LinkIdoptionaltextLink ID
RefIdoptionaltextRef ID
IdoptionalnumberSet the product ID
IsVisibleoptionalbooleanIs Visible
DescriptionShortoptionaltextShort Description
ReleaseDateoptionaltextRelease Date
KeyWordsoptionaltextSimilar words
IsActiveoptionalbooleanIs Active
TaxCodeoptionaltextTax Code
MetaTagDescriptionoptionaltextMetatag description
ShowWithoutStockoptionalbooleanShow Without Stock
ScoreoptionalnumberScore

create-sku

Create New Sku. Create a new SKU to your catalog

InputTypeDescription
ProductIdrequirednumberID of the product to be associated with this SKU
NamerequiredtextName the variation of the product
PackagedHeightrequirednumberPackage Height
PackagedLengthrequirednumberPackage Length
PackagedWidthrequirednumberPackage Width
PackagedWeightKgrequirednumberPackage Weight (Kg)
IsActiveoptionalbooleanIs Active
IsKitoptionalbooleanIs Kit
IdoptionalnumberSet the Sku ID

create-sku-file

Create New Sku File. Create a new SKU File to your catalog

InputTypeDescription
SkuIdrequirednumberSet the Sku ID
UrlrequiredtextImage Url
NamerequiredtextImage Name
IsMainrequiredbooleanIs Main Image
LabeloptionaltextImage Label
TextoptionaltextGeneral text of the image

delete-brand

Delete Brand. Delete a Brand in your catalog by it's id

InputTypeDescription
brandIdrequirednumberThe Brand ID

get-brand-by-id

Get Brand By ID. Find a Brand in your catalog by it's id

InputTypeDescription
BrandIdrequirednumberThe Brand ID

custom_api_call

Custom API Call. Make a custom API call to a specific endpoint

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

get-brand-list

Get Brand List. Find all Brands in your catalog

No input.

get-category-by-id

Get Category. Find a Category in your catalog by it's id

InputTypeDescription
categoryIdoptionalnumberThe Category ID

get-client-by-id

Get Client By ID. Find a Client by Id

InputTypeDescription
clientIdrequirednumberThe Client ID

get-client-list

Get Client List. Find all Clients

No input.

get-order-by-id

Get Order By ID. Find a Order by Id

InputTypeDescription
OrderIdrequirednumberThe Order ID

get-order-list

Get Orders List. Find Orders

InputTypeDescription
fromYearrequirednumberFrom (Year)
toYearrequiredtextTo (Year)
fromMonthoptionaltextFrom (Month)
toMonthoptionaltextTo (Month)
fromDayoptionaltextFrom (Day)
toDayoptionaltextTo (Day)

get-product-by-id

Get Product By ID. Find a product in your catalog by it's id

InputTypeDescription
productIdrequirednumberThe product ID

get-sku-by-product-id

Get SKU By Product ID. Find a Sku in your catalog by a Product id

InputTypeDescription
productIdrequirednumberThe Product ID

update-brand

Update Brand. Update a Brand in your catalog

InputTypeDescription
IdrequirednumberSet the brand ID
NamerequiredtextName
SiteTitlerequiredtextSite Title
LinkIdrequiredtextLink ID
TextrequiredtextText
MenuHomerequiredbooleanMenu Home
KeywordsrequiredtextSimilar words
ActiverequiredbooleanActive
ScorerequirednumberScore

Update-product

Update a Product. Update a product in your catalog

InputTypeDescription
productIdrequirednumberSet the product ID
NamerequiredtextName
TitlerequiredtextTitle
DescriptionrequiredtextDescription
BrandIdrequirednumberBrand ID
CategoryIdrequirednumberCategory ID
DepartmentIdrequirednumberDepartmentId
LinkIdoptionaltextLink ID
RefIdoptionaltextRef ID
BrandNameoptionaltextBrand Name
IsVisibleoptionalbooleanIs Visible
DescriptionShortoptionaltextShort Description
ReleaseDateoptionaltextRelease Date
KeyWordsoptionaltextSimilar words
IsActiveoptionalbooleanIs Active
TaxCodeoptionaltextTax Code
MetaTagDescriptionoptionaltextMetatag description
ShowWithoutStockoptionalbooleanShow Without Stock
ScoreoptionalnumberScore

Details

Id
vtex
Category
E-commerce
Tags
commerce, marketplace, orders, products
Package
@activepieces/piece-vtex@0.2.4
Runs
Through the integration runner