
modRetailCRM
Description
Component for integrating RetailCRM with MODX.
It targets miniShop2 but can run without it in manual mode, using the full RetailCRM API.
Contents
- Plugin that listens for specific events
- System settings
- icml snippet for basic catalog export to RetailCRM
Out of the box
- Track new user registration (including hidden registration on miniShop2 order) and create users in RetailCRM
- Track new miniShop2 orders and send order data to RetailCRM
- Track order status changes in the store and sync them to RetailCRM
- Track order status changes in RetailCRM and update store order statuses (requires RetailCRM-side setup)
- Work with forms and send data (requires snippet preparation)
User data sent to RetailCRM
- Phone
- First name
- MODX user ID
Order data sent to RetailCRM
- Order number
- Order items (price, name, quantity, product ID for catalog link)
- Product modifications (msOptionsPrice2 and options)
- Delivery cost and method
- Payment method
- Discount (msPromoCode)
- Delivery address
- Total order weight
Plugin events
- OnUserSave — new users; data sent to RetailCRM
- msOnCreateOrder — new orders; data sent to RetailCRM
- msOnChangeOrderStatus — order status change; updated order sent to RetailCRM
- OnMODXInit — add fields to Payment, Delivery, Order status
- msOnManagerCustomCssJs — add fields to Payment, Delivery, Order status
- OnHandleRequest — receive data from RetailCRM (e.g. triggers) and apply to site objects (e.g. order status)
modRetailCRM system settings
| Key | Description |
|---|---|
| modretailcrm_apiKey | API key from RetailCRM (Administration / Integration / API keys) |
| modretailcrm_siteCode | Site code from RetailCRM (Administration / Stores / Your store) |
| modretailcrm_url | Your CRM URL (from the address bar) |
| modretailcrm_log | Log all requests (for debugging) |
| modretailcrm_sync_statuses | Comma-separated order status IDs to sync (e.g. 2, 4) |
| modretailcrm_custom_customers_class | Custom customer module class |
| modretailcrm_custom_orders_class | Custom order module class |
| modretailcrm_allow_msoptionsprice | Use msOptionsPrice2 |
Presetup
- Have a RetailCRM account.
- In site system settings (modretailcrm) set: API key, CRM URL, site code.
- Delivery: In miniShop2 delivery methods add the RetailCRM code field and fill it from RetailCRM delivery catalog.
- Payment: Same for payment methods (RetailCRM Administration / Dictionaries).
- Order statuses: Map store statuses to RetailCRM order statuses (RetailCRM Administration / Statuses).
- Then configure product upload, user upload, and order upload (see docs). Not required for basic operation but improves reports.
