cleverly.datasets.win_back_then_ship#

cleverly.datasets.win_back_then_ship(engaged: Any) → Any[source]#

Return the win-back-then-ship offer: the discount if not engaged, else free shipping.

Parameters:
engagedarray_like of int

Engagement this week, 1 for engaged and 0 for not engaged.

Returns:
ndarray of str

"discount" where engaged is 0 and "shipping" elsewhere.

See also

win_back

The same rule with no offer for engaged customers.

OFFER_PLANS

All five plans of the offers tutorial.

Examples

>>> from cleverly.datasets import win_back_then_ship
>>> win_back_then_ship([0, 1, 0]).tolist()
['discount', 'shipping', 'discount']