cleverly.datasets.win_back#

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

Return the win-back offer: the discount for a customer who is not engaged, else nothing.

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 "none" elsewhere.

See also

win_back_then_ship

The same rule with free shipping for engaged customers.

OFFER_PLANS

All five plans of the offers tutorial.

Examples

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