Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.enumuration.dtr;

/**
 * What happened to one row of a Meta lead-ads import.
 *
 * <p>Every row lands on exactly one of these, and every row is recorded — a file of 60 must always
 * account for 60. Silently dropping a row is the failure mode this enum exists to prevent: these
 * are paid-for leads, and "it didn't import" needs a reason attached to it.
 */
public enum MetaLeadOutcome {

    /** A new lead was created. */
    CREATED,

    /**
     * The retailer is already a lead, so no second record was made. The existing lead gets a trail
     * entry noting they responded to an ad again — that re-engagement is useful context for whoever
     * works the lead, and is lost if the row is merely skipped.
     */
    DUPLICATE,

    /**
     * The number is on the do-not-call register. No lead, deliberately: importing it would put a
     * retailer who asked not to be contacted back in front of an agent with a working dialer.
     */
    BLOCKED_DND,

    /** The row could not be used — unusable phone, missing name, unparseable. {@code reason} says why. */
    REJECTED;

    /** Did this row put a lead into the system? */
    public boolean createdLead() {
        return this == CREATED;
    }
}