Allows to modify followup messages before sending.


Input (passed by reference)

$params array Followup parameters.
$params['followups'] array Followups-related data from 'shop_followup' table.
$params['followups'][]['id'] int Followup ID.
$params['followups'][]['name'] string Followup name from store settings.
$params['followups'][]['delay'] int Delay in seconds between order status change and the allowed followup sending time.
$params['followups'][]['first_order_only'] bool Whether a followup must be sent only for a customer’s first order.
$params['followups'][]['same_state_id'] bool Whether a followup must be sent only if an order status has changed.
$params['followups'][]['subject'] string Followup message subject.
$params['followups'][]['body'] string Followup message text.
$params['followups'][]['last_cron_time'] string Followup’s last sending time in SQL DATETIME format.
$params['followups'][]['from'] string Sender address. If empty, default followup sender is used.
$params['followups'][]['source'] string Order source name; empty value means to send a followup for orders from any sources; value 'backend' means to send a followup only for orders manualy created in the backend; a storefront’s address as a value means to send a followu ponly for orders placed via that storefront.
$params['followups'][]['status'] bool Followup status.
$params['followups'][]['transport'] string Sending transport—'email' or 'sms'.
$params['followups'][]['state_id'] string ID of an order status a change to which must trigger the sending of a followup after the expiration of time specified in 'delay' field.
… your plugin code …



Plugin code example


public function startFollowupCli(&$params)