CREATE ORDER

When your chatbot user clicks the “Check out” button, you can use the “Create order” chatbot block to push the shopping cart data into your Shopify or WooCommerce backend and convert it into an actual order.

Please make sure that you set up block properties correctly to avoid errors and provide a smooth e-commerce experience to your chatbot users. The settings for this block are slightly different for Shopify and WooCommerce integrations, so let’s review common settings first and get to platform-specific settings later.

Basic settings for “Create order” chatbot block

Usually, you will want to collect this data from your chatbot user (with TEXT and LISTEN blocks) and store it as user attributes to be re-used on consecutive orders.

Basic settings for the "Create order" chatbot block
Basic settings for the “Create order” chatbot block
  • First name – customer’s first name
  • Last name – customer’s last name
  • Email – customer’s email
  • Phone – customer’s phone number
  • Address 1 & 2 – customer’s address (line 1 and 2)
  • City – customer’s city
  • State – customer’s state
  • Postcode – customer’s ZIP or postal code
  • Country – customer’s country

WooCommerce-specific block settings

These settings are crucial for correct placement of customer’s orders to WooCommerce backend.

"Create order" block settings for WooCommerce
“Create order” block settings for WooCommerce
  • Payment – Payment method to use for that order. Should be one of the payment methods listed in the WooCommerce integration settings under “Payments” (use the value from the ID column). Failing to choose the correct payment method will cause an error upon block execution.
  • Shipping – Shipping method for the order. Should be one of the shipping methods listed in the WooCommerce integration settings under “Shipping” (use the value from the ID column). Failing to choose the correct shipping method will cause an error upon block execution.
  • Shipping total – total shipping cost for the order.
  • Order status – choose one of the standard order statuses in WooCommerce (“Pending”, “Processing”, “On hold”, “Completed”, “Cancelled”, “Refunded” or “Failed” depending on your e-commerce backend logic).
  • Create customer – enable this option to create new customers (WordPress users) in your WooCommerce backend. Otherwise, the order will be created in the “guest” mode.
  • Rewrite customer – if the “Create customer” option is enabled, you can choose this option to overwrite customer’s data in WooCommerce backend with new values for name and address.

Shopify-specific “Create order” chatbot block settings

As with WooCommerce, these settings are crucial for correct placement of customer’s orders into Shopify backend.

Shopify-specific settings for the "Create order" block
Shopify-specific settings for the “Create order” block
  • Order status – choose either “Draft” or regular order.
  • Rewrite customer – enable this if you want to update customer’s data with the new address.
  • Send invoice – when enabled, this will automatically send the order invoice to the customer’s email from the Shopify backend.

Sending the payment link and order number

Once the “Create order” chatbot block is successfully executed, you can use system attributes to send the payment link to your customer right from the chatbot conversation (or with the EMAIL block):

  • $_order_number – the number of order returned by the e-commerce store backend. It can be used for reference purposes.
  • $_order_status_url – contains a link to the order status page in your WooCommerce store (available for WooCommerce integration only)
  • $_order_payment_url – contains a link to the payment page (both Shopify and WooCommerce)

You can use these attributes to redirect your chatbot user to the payment page. Here’s a simple example from our WooCommerce chatbot template:

Sending order data and payment links
Sending order data and payment links
Was this article helpful to you? Yes 2 No 2

How can we help?