Skip to main content

Integration with Sella

  1. Sella Integration Overview
    The dropshipping platform integrates directly with Sella via API calls, enabling seamless product synchronization, order management, and vendor interactions. Vendors must install the dropshipping app from the Sella app store and link their store to the dropshipping platform by entering their Sella API keys.

  2. Product Synchronization
    Products available on the dropshipping platform are synchronized with the Sella store. Vendors can choose from a catalog of products made available by the admin, and they can add these products to their store by setting them to is_visible and ensuring the product quantity is greater than zero. Once a product is added to their store, any future changes to the product details (such as price, description, etc.) are reflected in the vendor's Sella store.

  3. Order Processing and Inventory Management
    When a customer places an order on the vendor's Sella store, the order is sent to the dropshipping platform, where it is initially marked as Pending. The vendor logs in to the dropshipping website and changes the order status to Processing. At this point, the platform will automatically adjust the inventory and deduct the appropriate amount from the vendor's wallet to reflect the order.

  4. Return Process and Product Restocking
    If a customer returns a product, the vendor can initiate the return request through the platform. The admin reviews the return request, sets it to Out for Pickup or Refused, and once the product is returned, the return status is set to Processing and then to either Approved or Refused. If the return is approved, the product quantity is restored to the inventory, and the vendor is refunded the amount to their wallet.

  5. Subscription and Token Management
    The vendor's subscription to the dropshipping app is handled by Sella as the OAuth provider. Once a vendor’s subscription expires, the API token allowing access between the Sella store and the dropshipping platform becomes invalid, and the vendor will need to renew their subscription to regain access. The platform does not directly manage subscription renewals, but it must handle API token validation to ensure only active vendors can access the system.

Notifications & Alerts System

  1. Types of Notifications
    The notification system ensures that vendors and admins are notified of relevant actions and updates, including but not limited to:

    • Order Status Updates: Notifications are sent to vendors and admins when the status of an order changes (e.g., from Pending to Processing, Shipped, or Delivered).
    • Product and Price Changes: Vendors are notified when a product they added to their store experiences a price change, or when new products are available for listing.
    • Return and Refund Updates: Vendors are notified when a return is created or canceled, and when a return is approved or refused.
    • Financial Transactions: Notifications are sent to vendors when their wallet is funded and when transactions occur.
  2. Filament Notification System
    Filament’s notification system is used to handle a variety of notification types, such as:

    • Success and Failure Alerts: For any failed or successful actions like wallet funding, product updates, or order processing.
    • Custom Notifications: For specific events like order cancellations, product deletions, or return updates.
    • Push and Database Notifications: Both push and database notifications are used to inform admins of critical actions (e.g., new user registration, updates to orders or returns, etc.) while ensuring that related vendors are kept in the loop.
  3. Email & Push Notifications
    The system may also integrate email notifications or push notifications to keep users informed, ensuring timely actions on critical platform events such as payment confirmations, price updates, or failed API calls.

Error Handling and Logging

  1. Error Logging in API Calls
    The platform utilizes error logging through Laravel’s default logging system. Key functions that interact with the Sella API, like updating product quantities or refreshing API tokens, log errors when the API call fails.
    Specific jobs like UpdateSallaProductQuantities will log errors if API requests fail, ensuring that administrators can track issues and address them promptly. The system also logs the body of the API responses to aid debugging.

  2. Retry Mechanism and Error Handling
    Although error logging is in place, there is no robust retry mechanism in place for failed API calls at the moment. This can be further improved to handle retries or to gracefully recover from temporary failures, especially for critical processes like inventory updates or wallet funding.

  3. Planned Improvements
    Future plans include better error handling strategies, possibly implementing retry mechanisms for key operations, and providing detailed error notifications to both admins and vendors in case of failures.