Build with

Help a customer correct an address or cancel a permitted order using Shopify. Check the merchant’s policy and the current order, then execute only the action the customer explicitly confirms.

For other stores, WooCommerce and Wix Stores document their own confirmed address/cancellation paths and effects. A Squarespace order read supports merchant review; it is not an address-change or refund action.

Before you begin

  • A dedicated test project and a verified Shopify connection for connector examples. Use your actual store values instead of the fictional Northstar examples.
  • An application-owned customer/order access check for personal data or changes. Search values and tool Triggers are not authorization.
  • A merchant-approved test order and an authorized customer-to-order association.
  • For an address update, the complete confirmed new address and any existing fields you must preserve. The order lookup does not return a complete shipping address.
  • For cancellation, explicit confirmation of the order, refund request and restock choice. The connector sends refund: true.

Studio

Open the test project in Agent studio.

Code

Use a Voiceflow bearer credential with access to your test project and Environment. Keep it on your backend or development machine. Set:

Use a current Voiceflow CLI if you choose CLI. API and CLI examples use the Environment’s saved Draft. Standalone execution does not attach a tool, compile an agent or publish a release.

Confirm the requested change

1

Read and authorize the current order

Complete Check an order and verify the returned ID against your application mapping. Keep the authorized lookup values application-owned through execution; a model-written Trigger cannot enforce customer access.

2

Confirm the exact action

Repeat the exact action to the customer:

  • Address change: confirm all supplied address fields.
  • Cancellation: state the order, refund request and restock choice.

Recheck merchant policy and fulfillment constraints. Continue on a separate confirmed path; send ambiguous requests to support.

Change the address or note

The current action requires shippingAddress, including for a note-only change. Supply the complete verified existing address when preserving it; Get order’s display address is incomplete. A supplied note replaces its prior contents.

1

Apply the confirmed update

Studio

Place Shopify → Update order on the confirmed-change Workflow path. Set the verified lookup values, complete shippingAddress and optional replacement note. Run once with the test order.

Supply the complete confirmed change on the authorized order path. Photo:

Code

Require success: true, error: null and truncated: false before using output.data. An HTTP 200 alone does not establish a successful action.

2

Verify the saved fields

Require an empty orderUpdate.userErrors and the expected orderUpdate.order.id within the returned data. Check the full address and note in Shopify; the returned display address omits street fields.

An order update does not establish that an existing shipment was rerouted.

Cancel the confirmed order

This action sends refund: true and reason CUSTOMER; restock defaults to true. Confirm these effects with the customer before execution.

1

Run the confirmed cancellation once

Studio

Configure Shopify → Cancel order on the confirmed cancellation path. Set the authorized order lookup and explicit restock choice. Run it once, then inspect its job and read the order again.

Set the restock choice before the confirmed cancellation. Photo:

Code

Require success: true, error: null and truncated: false before using output.data. An HTTP 200 alone does not establish a successful action.

2

Inspect the cancellation outcome

The action has no caller-supplied idempotency key. A completed job is not proof that funds reached the customer.

Verify and tell the customer

  • Address/note update: confirm the intended fields persisted before reporting success.
  • Cancellation: verify the order state and separate refund outcome before reporting funds returned.
  • Rejected update or business error: explain that the change was not confirmed and offer support.
  • Unknown cancellation outcome: preserve the uncertainty and investigate before retrying.

Test each case with your dedicated test records. Keep the customer response tied to the state you verified.

Shopify’s manual owns the detailed input contract. For return assessment rather than order cancellation, use Assess a return request.

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close the search.