Automation - Ikas JavaScript SDK Functions and Abandoned Cart Reminder

1-) Ikas Integration and JS SDK Functions

This section covers the SDK functions added to the JavaScript block (Run JavaScript) in the Supsis Ai Automation module for the Ikas e-commerce integration, as well as the implementation of abandoned cart reminder scenarios. Thanks to these functions, you can detect customers who left products in their carts in your automation flows, fetch cart details, and send automated reminder messages via WhatsApp, SMS, or Email channels.

1.a – Prerequisite: Ikas Channel Connection

To use these functions in automation, the Ikas integration must be completed and your channel must be active.

  • Ikas Channel Settings: Make sure your Ikas channel is connected under Settings > Integrations. In your code, the connected Ikas channel ID can be queried automatically via supsis.channel.getByType("ikas").

1.b – Listing Ikas Abandoned Carts (abandonedCart.list)

Used to fetch products added to the cart but not purchased by customers on your e-commerce site, along with customer contact details.

  • supsis.ikas.abandonedCart.list Usage: await supsis.ikas.abandonedCart.list(ikasChannelId, { page: 1, limit: 50, sort: "-lastActivityDate" })
  • Returned Data Structure:
  • item.cart: Item count in cart (itemCount), total price (totalPrice), item list (items), and variant details (variant.name).
  • item.customer: Customer first name (firstName), last name (lastName), email, and phone number (phone).

1.c – Automation Flow and Messaging

Abandoned carts in your Ikas store are queried periodically by automation. An automated reminder message is sent via WhatsApp or SMS to customers who left items in their carts.

  • Personalized Message: The names of items left in the cart, item count, and total price are dynamically added to the message payload as attributes.
  • Customer Contact Details: Deliveries are made directly through the relevant communication channel using customer phone numbers and email data fetched via Ikas.

1.d – Key Advantages and Safeguards

  • Spam Prevention and Cache Control: Thanks to the caching mechanism, sending repetitive reminder messages to the same customer within specified time intervals is prevented.
  • Automatic Channel Detection: Connected Ikas and WhatsApp/SMS channels are automatically detected in the automation flow, ensuring seamless integration.
  • Dynamic Product and Price Mapping: Inserting product names and cart totals dynamically into the message boosts e-commerce conversion rates.