Skip to content
FlexiPedia logo

Shopify Native Actions - Ecommerce Actions

Flexito's OmniAI offers a range of eCommerce actions that streamline the shopping experience for both businesses and customers. These features allow for efficient cart management, from adding and removing items to creating draft orders, ensuring a seamless and user-friendly inter

Flexito OmniAI
Beginnerv4
Read in:

Listen to an audio overview

A short, AI-generated podcast-style summary of this article.

Flexito's OmniAI offers a range of eCommerce actions that streamline the shopping experience for both businesses and customers. These features allow for efficient cart management, from adding and removing items to creating draft orders, ensuring a seamless and user-friendly interaction.

This section covers the eCommerce actions supported by Flexito's OmniAI for customer interactions.

  • Add to Cart

  • Remove from Cart

  • Empty Cart

  • Get Cart Items

  • Create Draft Order From Cart

Let's explore each of these actions in detail.

Add to Cart

Use this action to add a product to a user's cart by employing the bot user's NS and the product's variant ID.

Input

Response Payload

{
"variant_id": ,
"product_id": ,
"quantity": 2,
"previous_quantity": 1
}

Remove from Cart

This action removes an item from the cart using the user's NS and variant ID.

Input

Response Payload

{
"variant_id": ,
"product_id": ,
"quantity": 1,
"previous_quantity": 2
}

Empty Cart

This action completely empties a user's cart using their user NS.

Input

Response Payload

{
"status": "ok"
}

Get Cart Items

This action retrieves cart details for a bot user using their user NS.

Input

Response Payload

{
"note": "f12372u",
"taxes_included": false,
"currency": "AUD",
"tax_exempt": false,
"name": "#D131",
"line_items": [
{
"id": ,
"variant_id": ,
"product_id": ,
"title": "2 in 1 Gold MacBook Riser & Stand",
"variant_title": "silver",
"sku": "-silver",
"vendor": "hapans",
"quantity": 3,
"requires_shipping": true,
"taxable": false,
"gift_card": false,
"fulfillment_service": "manual",
"grams": 0,
"tax_lines": [...], // 0 items
"applied_discount": null,
"name": "2 in 1 Gold MacBook Riser & Stand - silver",
"properties": [...], // 0 items
"custom": false,
"price": "47.99",
"admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/"
}
],
"tax_lines": [
],
"total_price": "143.97",
"subtotal_price": "143.97",
"total_tax": "0.00"
}

Create Draft Order From Cart

This action creates a draft order using the line items present in the cart.

Input

Response Payload

{
"draft_order": {
"id": ,
"note": "f12372u",
"email": null,
"taxes_included": false,
"currency": "AUD",
"invoice_sent_at": null,
"created_at": "T05:13:45-04:00",
"updated_at": "T05:13:45-04:00",
"tax_exempt": false,
"completed_at": null,
"name": "#D132",
"status": "open",
"line_items": [
{...} // 20 keys
],
"shipping_address": null,
"billing_address": null,
"invoice_url": " ",
"applied_discount": null,
"order_id": null,
"shipping_line": null,
"tax_lines": [
],
"tags": "",
"note_attributes": [
],
"total_price": "143.97",
"subtotal_price": "143.97",
"total_tax": "0.00",
"payment_terms": null,
"admin_graphql_api_id": "gid://shopify/DraftOrder/"
}
}

  • Input (#ShopifyNativeActions-EcommerceActions-Input.1)

  • Response Payload (#ShopifyNativeActions-EcommerceActions-ResponsePayload.1)

  • Input (#ShopifyNativeActions-EcommerceActions-Input.2)

  • Response Payload (#ShopifyNativeActions-EcommerceActions-ResponsePayload.2)

  • Input (#ShopifyNativeActions-EcommerceActions-Input.3)

  • Response Payload (#ShopifyNativeActions-EcommerceActions-ResponsePayload.3)

  • Input (#ShopifyNativeActions-EcommerceActions-Input.4)

  • Response Payload (#ShopifyNativeActions-EcommerceActions-ResponsePayload.4)