Shopify

Create products, manage orders, and update inventory in your Shopify store.

E-commerceAPI key27 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (27)
  4. create_order
  5. create_product
  6. update_order
  7. adjust_inventory_level
  8. cancel_order
  9. close_order
  10. create_collect
  11. create_customer
  12. create_draft_order
  13. create_fulfillment_event
  14. create_transaction
  15. custom_api_call
  16. get_asset
  17. get_customer
  18. get_customer_orders
  19. get_customers
  20. get_fulfillment
  21. get_fulfillments
  22. get_locations
  23. get_product
  24. get_product_variant
  25. get_products
  26. get_transaction
  27. get_transactions
  28. update_customer
  29. update_product
  30. upload_product_image
  31. 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("shopify", action, input) resolves with the provider's answer and rejects when Shopify 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: "shopify"} says whether yours can call it.

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

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

Actions

create_order

Create Order. Create a new order.

InputTypeDescription
productIdoptionalnumberThe ID of the product to create the order with.
variantIdoptionalnumberThe ID of the variant to create the order with.
titleoptionaltextTitle
quantityoptionalnumberQuantity
priceoptionaltextPrice
customerIdoptionaltextThe ID of the customer to use.
emailoptionaltextEmail
sendReceiptoptionalbooleanSend Receipt
sendFulfillmentReceiptoptionalbooleanSend Fulfillment Receipt
tagsoptionaltextA string of comma-separated tags for filtering and search

create_product

Create Product. Create a new product.

InputTypeDescription
titlerequiredtextTitle
bodyHtmloptionallong textProduct description (supports HTML)
productTypeoptionaltextA categorization for the product used for filtering and searching products
productImageoptionalfileThe public URL or the base64 image to use
statusrequiredone of "active" | "draft" | "archived"Status
vendoroptionaltextVendor
tagsoptionaltextA string of comma-separated tags for filtering and search

update_order

Update Order. Update an existing order.

InputTypeDescription
idrequiredtextThe ID of the order.
emailoptionaltextEmail
phoneNumberoptionaltextPhone Number
tagsoptionaltextA string of comma-separated tags for filtering and search
noteoptionaltextNote

adjust_inventory_level

Adjust Inventory Level. Adjust inventory level of an item at a location.

InputTypeDescription
idrequirednumberThe ID of the inventory item.
locationIdrequirednumberThe ID of the location.
adjustmentrequirednumberPositive values increase inventory, negative values decrease it.

cancel_order

Cancel Order. Cancel an order.

InputTypeDescription
orderIdrequirednumberThe ID of the order.

close_order

Close Order. Close an order.

InputTypeDescription
orderIdrequirednumberThe ID of the order.

create_collect

Create Collect. Add a product to a collection.

InputTypeDescription
idrequirednumberThe ID of the product.
collectionIdrequirednumberThe ID of the collection.

create_customer

Create Customer. Create a new customer.

InputTypeDescription
emailoptionaltextEmail
verifiedEmailoptionalbooleanWhether the customer has verified their email.
sendEmailInviteoptionalbooleanSend Email Invite
firstNameoptionaltextFirst Name
lastNameoptionaltextLast Name
phoneNumberoptionaltextPhone Number
tagsoptionaltextA string of comma-separated tags for filtering and search
acceptsMarketingoptionalbooleanAccepts Marketing ?

create_draft_order

Create Draft Order. Create a new draft order.

InputTypeDescription
productIdoptionalnumberThe ID of the product to create the order with.
variantIdoptionalnumberThe ID of the variant to create the order with.
titleoptionaltextTitle
quantityoptionalnumberQuantity
priceoptionaltextPrice
customerIdoptionaltextThe ID of the customer to use.

create_fulfillment_event

Create Fulfillment Event. Create a new fulfillment event.

InputTypeDescription
orderIdrequirednumberThe ID of the order.
fulfillmentIdrequirednumberThe ID of the fulfillment.
statusrequiredid (picked from your account)Status
messageoptionaltextMessage

create_transaction

Create Transaction. Create a new transaction.

InputTypeDescription
orderIdrequirednumberThe ID of the order to create a transaction for.
kindrequiredid (picked from your account)Type
currencyoptionaltextCurrency
amountoptionaltextAmount
authorizationoptionaltextAuthorization Key
parentIdoptionalnumberThe ID of an associated transaction.
sourceoptionaltextAn optional origin of the transaction. Set to external to import a cash transaction for the associated order.
testoptionalbooleanWhether the transaction is a test transaction.

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_asset

Get Asset. Get a theme's asset.

InputTypeDescription
keyrequiredtextAsset Key
themeIdrequiredtextThe ID of the theme.

get_customer

Get Customer. Get an existing customer's information.

InputTypeDescription
customerIdrequiredtextCustomer ID

get_customer_orders

Get Customer Orders. Get an existing customer's orders.

InputTypeDescription
customerIdrequiredtextCustomer ID

get_customers

Get Customers. Get an existing customers.

No input.

get_fulfillment

Get Fulfillment. Get a fulfillment.

InputTypeDescription
orderIdrequirednumberThe ID of the order.
fulfillmentIdrequirednumberThe ID of the fulfillment.

get_fulfillments

Get Fulfillments. Get an order's fulfillments.

InputTypeDescription
orderIdrequirednumberThe ID of the order.

get_locations

Get Locations. Get locations.

No input.

get_product

Get Product. Get existing product.

InputTypeDescription
idrequiredtextThe ID of the product.

get_product_variant

Get Product Variant. Get a product variant.

InputTypeDescription
idrequiredtextThe ID of the product variant.

get_products

Get Products. Get existing products by title.

InputTypeDescription
titleoptionaltextTitle

get_transaction

Get Transaction. Get an existing transaction's information.

InputTypeDescription
orderIdrequirednumberThe ID of the order.
transactionIdrequirednumberThe ID of the transaction

get_transactions

Get Order Transactions. Get an order's transactions.

InputTypeDescription
orderIdrequirednumberThe ID of the order.

update_customer

Update Customer. Update an existing customer.

InputTypeDescription
customerIdrequiredtextCustomer ID
emailoptionaltextEmail
verifiedEmailoptionalbooleanWhether the customer has verified their email.
sendEmailInviteoptionalbooleanSend Email Invite
firstNameoptionaltextFirst Name
lastNameoptionaltextLast Name
phoneNumberoptionaltextPhone Number
tagsoptionaltextA string of comma-separated tags for filtering and search
acceptsMarketingoptionalbooleanAccepts Marketing ?

update_product

Update Product. Update an existing product.

InputTypeDescription
idrequiredtextThe ID of the product.
titleoptionaltextTitle
bodyHtmloptionallong textProduct description (supports HTML)
productTypeoptionaltextA categorization for the product used for filtering and searching products
productImageoptionalfileThe public URL or the base64 image to use
statusrequiredone of "active" | "draft" | "archived"Status
vendoroptionaltextVendor
tagsoptionaltextA string of comma-separated tags for filtering and search

upload_product_image

Upload Product Image. Upload a new product image.

InputTypeDescription
idrequiredtextThe ID of the product.
imagerequiredfileThe public URL or the base64 image to use
positionoptionalnumber1 makes it the main image.

Details

Id
shopify
Category
E-commerce
Tags
store, products, orders, inventory, shop
Package
@activepieces/piece-shopify@0.2.4
Runs
Through the integration runner