| 37651 |
vikas |
1 |
package com.spice.profitmandi.service.lms.meta;
|
|
|
2 |
|
|
|
3 |
import com.spice.profitmandi.dao.enumuration.dtr.MetaLeadOutcome;
|
|
|
4 |
|
|
|
5 |
/**
|
|
|
6 |
* One evaluated row of a Meta export: what it would become, and what will actually happen to it.
|
|
|
7 |
*
|
|
|
8 |
* <p>Produced identically by preview and by commit, so what the user approves on screen is exactly
|
|
|
9 |
* what gets written. A preview that runs different logic from the commit is worse than no preview.
|
|
|
10 |
*/
|
|
|
11 |
public class MetaLeadRow {
|
|
|
12 |
|
|
|
13 |
/** 1-based line number in the spreadsheet, header included — what the user sees in Excel. */
|
|
|
14 |
public int rowNumber;
|
|
|
15 |
|
|
|
16 |
public String metaLeadId;
|
|
|
17 |
public String name;
|
|
|
18 |
public String mobile;
|
|
|
19 |
public String outletName;
|
|
|
20 |
public String city;
|
|
|
21 |
public String state;
|
|
|
22 |
public String email;
|
|
|
23 |
public double potential;
|
|
|
24 |
/** The business-value band exactly as answered, kept because the number above is lossy. */
|
|
|
25 |
public String businessValueBand;
|
|
|
26 |
|
|
|
27 |
public Integer regionId;
|
|
|
28 |
public String regionCode;
|
|
|
29 |
public String regionName;
|
|
|
30 |
|
|
|
31 |
public String campaignName;
|
|
|
32 |
public String formName;
|
|
|
33 |
public String platform;
|
|
|
34 |
public String metaCreatedTime;
|
|
|
35 |
|
|
|
36 |
/** Verbatim answers to the form's qualifying questions, for the trail. */
|
|
|
37 |
public String qualifiers;
|
|
|
38 |
|
|
|
39 |
/**
|
|
|
40 |
* Set when text had to be changed to fit the latin1 columns of {@code user.lead} — names the
|
|
|
41 |
* fields affected so the preview can show it rather than silently mangling a retailer's name.
|
|
|
42 |
*/
|
|
|
43 |
public String sanitisedNote;
|
|
|
44 |
|
|
|
45 |
public MetaLeadOutcome outcome;
|
|
|
46 |
public String reason;
|
|
|
47 |
|
|
|
48 |
/** Set on DUPLICATE (the lead already present) and on CREATED (the lead just made). */
|
|
|
49 |
public Integer leadId;
|
|
|
50 |
|
|
|
51 |
/** Raw row as JSON, stored so a mapping bug can be replayed. */
|
|
|
52 |
public String rawJson;
|
|
|
53 |
|
|
|
54 |
/**
|
|
|
55 |
* This Meta lead already has a {@code user.meta_lead} row from an earlier upload, so the commit
|
|
|
56 |
* must not write a second one — {@code meta_lead_id} is unique, and inserting again fails the
|
|
|
57 |
* whole import. One Meta lead id, one audit row, ever.
|
|
|
58 |
*/
|
|
|
59 |
public boolean alreadyRecorded;
|
|
|
60 |
|
|
|
61 |
/** The Call Center agent this lead will be given to. Null when imported unassigned. */
|
|
|
62 |
public Integer assignedToAuthId;
|
|
|
63 |
|
|
|
64 |
public boolean willCreate() {
|
|
|
65 |
return outcome == MetaLeadOutcome.CREATED;
|
|
|
66 |
}
|
|
|
67 |
}
|