Actions OpenCart

Finding products, obtaining data and creating OpenCart orders with ChatRex.

Before adding actions connect OpenCart and make sure the store is displayed in Integrations.

Setting up the bot

  1. Open the right bot.
  2. Go to Integrations and actions.
  3. Add the necessary OpenCart steps.
  4. Choose a connected store.
  5. For Create an order, specify the payment and delivery method codes configured in OpenCart.
  6. Describe in the bot instructions when you need to search for goods, receive an order and create a new order.
  7. Save the action and changes of the bot.

For example, the payment method code can be cod and the delivery method code can be flat.flat. Use the values configured in your store.

Find the goods.

Looking for goods at the request of the customer. The search shall be carried out by:

  • title;
  • models;
  • SKU article;
  • The value of the option.

In response, the bot receives the goods found and their identifiers. Use product_id of the selected product for the next action.

Example: A customer asks for a white T-shirt. The bot searches and offers only products found in OpenCart.

Get the goods

Returns current information about the selected product:

  • name and description;
  • model and article;
  • price and balance;
  • Options and options.

To perform the action, you need the product_id obtained during the search.

Get an order.

Finds an existing order by number and returns available information about it. To do this, you need order_id.

Example: The customer provides the order number. The bot checks the order in OpenCart and responds only based on the data received.

Create an order

Creates a new order after the customer has confirmed its composition and conditions. Before calling an action, the bot must collect:

  • goods, quantity and selected options;
  • the name and surname of the client;
  • email and telephone;
  • payment address;
  • delivery address;
  • country and region;
  • method of payment;
  • delivery method;
  • A comment if you need one.

Before saving, OpenCart re-checks goods, prices and balances. A repeated technical request with the same identifier does not create a duplicate order.

  1. Find the product at the request of the customer.
  2. Get his card and specify the option, price and availability.
  3. Collect contact details, address, payment method and delivery method.
  4. Show the customer the composition of the order, the number and conditions of registration.
  5. Get clear confirmation.
  6. Make an order.
  7. Report successful registration only after a confirmed OpenCart response.

Add to the bot's instruction the rule:

Do not create an order until the customer has clearly confirmed the composition of the order, the number of goods, the address and the method of delivery. Do not report that an order has been created until the OpenCart action has returned a successful result.

How the bot receives data

The directory is not copied to ChatRex. With each action call, the bot receives relevant data directly from the connected OpenCart store.