Shopify
Create products, manage orders, and update inventory in your Shopify store.
On this page
- Connect
- Call it from a workflow
- Actions (27)
- create_order
- create_product
- update_order
- adjust_inventory_level
- cancel_order
- close_order
- create_collect
- create_customer
- create_draft_order
- create_fulfillment_event
- create_transaction
- custom_api_call
- get_asset
- get_customer
- get_customer_orders
- get_customers
- get_fulfillment
- get_fulfillments
- get_locations
- get_product
- get_product_variant
- get_products
- get_transaction
- get_transactions
- update_customer
- update_product
- upload_product_image
- 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.
// 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);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "shopify",
"piece_action": "create_order",
"input": {},
"env": "dev"
}
}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.
| Input | Type | Description |
|---|---|---|
productIdoptional | number | The ID of the product to create the order with. |
variantIdoptional | number | The ID of the variant to create the order with. |
titleoptional | text | Title |
quantityoptional | number | Quantity |
priceoptional | text | Price |
customerIdoptional | text | The ID of the customer to use. |
emailoptional | text | |
sendReceiptoptional | boolean | Send Receipt |
sendFulfillmentReceiptoptional | boolean | Send Fulfillment Receipt |
tagsoptional | text | A string of comma-separated tags for filtering and search |
create_product
Create Product. Create a new product.
| Input | Type | Description |
|---|---|---|
titlerequired | text | Title |
bodyHtmloptional | long text | Product description (supports HTML) |
productTypeoptional | text | A categorization for the product used for filtering and searching products |
productImageoptional | file | The public URL or the base64 image to use |
statusrequired | one of "active" | "draft" | "archived" | Status |
vendoroptional | text | Vendor |
tagsoptional | text | A string of comma-separated tags for filtering and search |
update_order
Update Order. Update an existing order.
| Input | Type | Description |
|---|---|---|
idrequired | text | The ID of the order. |
emailoptional | text | |
phoneNumberoptional | text | Phone Number |
tagsoptional | text | A string of comma-separated tags for filtering and search |
noteoptional | text | Note |
adjust_inventory_level
Adjust Inventory Level. Adjust inventory level of an item at a location.
| Input | Type | Description |
|---|---|---|
idrequired | number | The ID of the inventory item. |
locationIdrequired | number | The ID of the location. |
adjustmentrequired | number | Positive values increase inventory, negative values decrease it. |
cancel_order
Cancel Order. Cancel an order.
| Input | Type | Description |
|---|---|---|
orderIdrequired | number | The ID of the order. |
close_order
Close Order. Close an order.
| Input | Type | Description |
|---|---|---|
orderIdrequired | number | The ID of the order. |
create_collect
Create Collect. Add a product to a collection.
| Input | Type | Description |
|---|---|---|
idrequired | number | The ID of the product. |
collectionIdrequired | number | The ID of the collection. |
create_customer
Create Customer. Create a new customer.
| Input | Type | Description |
|---|---|---|
emailoptional | text | |
verifiedEmailoptional | boolean | Whether the customer has verified their email. |
sendEmailInviteoptional | boolean | Send Email Invite |
firstNameoptional | text | First Name |
lastNameoptional | text | Last Name |
phoneNumberoptional | text | Phone Number |
tagsoptional | text | A string of comma-separated tags for filtering and search |
acceptsMarketingoptional | boolean | Accepts Marketing ? |
create_draft_order
Create Draft Order. Create a new draft order.
| Input | Type | Description |
|---|---|---|
productIdoptional | number | The ID of the product to create the order with. |
variantIdoptional | number | The ID of the variant to create the order with. |
titleoptional | text | Title |
quantityoptional | number | Quantity |
priceoptional | text | Price |
customerIdoptional | text | The ID of the customer to use. |
create_fulfillment_event
Create Fulfillment Event. Create a new fulfillment event.
| Input | Type | Description |
|---|---|---|
orderIdrequired | number | The ID of the order. |
fulfillmentIdrequired | number | The ID of the fulfillment. |
statusrequired | id (picked from your account) | Status |
messageoptional | text | Message |
create_transaction
Create Transaction. Create a new transaction.
| Input | Type | Description |
|---|---|---|
orderIdrequired | number | The ID of the order to create a transaction for. |
kindrequired | id (picked from your account) | Type |
currencyoptional | text | Currency |
amountoptional | text | Amount |
authorizationoptional | text | Authorization Key |
parentIdoptional | number | The ID of an associated transaction. |
sourceoptional | text | An optional origin of the transaction. Set to external to import a cash transaction for the associated order. |
testoptional | boolean | Whether the transaction is a test transaction. |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
get_asset
Get Asset. Get a theme's asset.
| Input | Type | Description |
|---|---|---|
keyrequired | text | Asset Key |
themeIdrequired | text | The ID of the theme. |
get_customer
Get Customer. Get an existing customer's information.
| Input | Type | Description |
|---|---|---|
customerIdrequired | text | Customer ID |
get_customer_orders
Get Customer Orders. Get an existing customer's orders.
| Input | Type | Description |
|---|---|---|
customerIdrequired | text | Customer ID |
get_customers
Get Customers. Get an existing customers.
No input.
get_fulfillment
Get Fulfillment. Get a fulfillment.
| Input | Type | Description |
|---|---|---|
orderIdrequired | number | The ID of the order. |
fulfillmentIdrequired | number | The ID of the fulfillment. |
get_fulfillments
Get Fulfillments. Get an order's fulfillments.
| Input | Type | Description |
|---|---|---|
orderIdrequired | number | The ID of the order. |
get_locations
Get Locations. Get locations.
No input.
get_product
Get Product. Get existing product.
| Input | Type | Description |
|---|---|---|
idrequired | text | The ID of the product. |
get_product_variant
Get Product Variant. Get a product variant.
| Input | Type | Description |
|---|---|---|
idrequired | text | The ID of the product variant. |
get_products
Get Products. Get existing products by title.
| Input | Type | Description |
|---|---|---|
titleoptional | text | Title |
get_transaction
Get Transaction. Get an existing transaction's information.
| Input | Type | Description |
|---|---|---|
orderIdrequired | number | The ID of the order. |
transactionIdrequired | number | The ID of the transaction |
get_transactions
Get Order Transactions. Get an order's transactions.
| Input | Type | Description |
|---|---|---|
orderIdrequired | number | The ID of the order. |
update_customer
Update Customer. Update an existing customer.
| Input | Type | Description |
|---|---|---|
customerIdrequired | text | Customer ID |
emailoptional | text | |
verifiedEmailoptional | boolean | Whether the customer has verified their email. |
sendEmailInviteoptional | boolean | Send Email Invite |
firstNameoptional | text | First Name |
lastNameoptional | text | Last Name |
phoneNumberoptional | text | Phone Number |
tagsoptional | text | A string of comma-separated tags for filtering and search |
acceptsMarketingoptional | boolean | Accepts Marketing ? |
update_product
Update Product. Update an existing product.
| Input | Type | Description |
|---|---|---|
idrequired | text | The ID of the product. |
titleoptional | text | Title |
bodyHtmloptional | long text | Product description (supports HTML) |
productTypeoptional | text | A categorization for the product used for filtering and searching products |
productImageoptional | file | The public URL or the base64 image to use |
statusrequired | one of "active" | "draft" | "archived" | Status |
vendoroptional | text | Vendor |
tagsoptional | text | A string of comma-separated tags for filtering and search |
upload_product_image
Upload Product Image. Upload a new product image.
| Input | Type | Description |
|---|---|---|
idrequired | text | The ID of the product. |
imagerequired | file | The public URL or the base64 image to use |
positionoptional | number | 1 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