A data point provider is a named entity that handles data points within Corporate Admin.
The following is a list of the currently supported data point providers.
- Associate
- Order
- AutoShip
- Associate Stats
- Service
- System (only use with non-Associate-based data points, such as:
Today
or Now
)
The following are the data points called by a specific data point provider.
DataPoint | Data Type | Aggregate? | Description |
---|
Name | Text | No | The full name of the Associate. |
DisplayFirstName | Text | No | The display first name of the Associate. |
DisplayLastName | Text | No | The display last name of the Associate. |
SignUpDate | Date/Time | No | The enrollment date of the Associate. |
StatusId | Number | No | The Associate's account status (Active, Inactive, Disabled, etc.). |
DataPoint | Data Type | Aggregate? | Description |
---|
CV | Number | No | The CV of the Associate. |
QV | Number | No | The QV of the Associate. |
KitLevels | Number | No | The Associates current kit level. |
PeriodKitLevels | Number Array | No | The kit numbers the Associate has purchased. |
GroupVolume | Number | No | The volume of the Associate's downline. |
PlaceTreeStrongLeg | Text | No | Leg name for Associates current strong leg. |
PlaceTreeWeakLeg | Text | No | Leg name for Associates current weak leg. |
Rank | Number | No | The rank of the Associate. |
LastRank | Number | No | The previous rank of the Associate. |
HighestRank | Number | No | The highest rank the Associate has achieved. |
Active | Yes/No | No | The Associate Active status according to the compensation plan, not the manually set Associate status. |
CommissionAmount | Number | No | |
RankOptions | Complex Object | No | What the Associates has done relating to what is required for each rank. |
DataPoint | Data Type | Aggregate? | Description |
---|
NextProcessedDate | Date/Time | No | The date the Associate's AutoShip processes. |
DataPoint | Data Type | Aggregate? | Description |
---|
ServiceId | Number | No | The numeric ID of the service (defines the type of service). |
ServiceExpirationDate | Date/Time | No | The date the specified service discontinues/expires. |
ServiceExpirationDate | Date/Time | Yes | The Associate's services expiration date. |
DataPoint | Data Type | Aggregate? | Description |
---|
CommissionDate | Date/Time | No | The date commissions were paid for the associated order. |
HasPayedAnyOrder | Yes/No | Yes | Indicates whether any of the Associate's orders have been paid. |
StatusName | String | No | String value of the Order Status. |
TypeId | Int | No | Int value of the Order Type. |
TypeName | String | No | String value of Order Type. |
DataPoint | Data Type | Aggregate? | Description |
---|
Today | Date/Time | No | Tracks today's date. Used mostly for system data point tasks. |
If your data point isn't available in an existing provider, the you can create a new data point provider:
public DataPointValue[] GetDataPointValues(IEnumerable<DataPoint> requestedPoints)
{
var statsDataPoints = new List<DataPointValue>;
if (requestedPoints.Any())
{
// Validating that the passed-in DataPointIds are valid
try
{
DataPointsUtilities.ValidateDataPointIds(this, requestedPoints.Select(x => x.Id));
}
catch (Exception ex)
{
_loggingServices.LogError(ex.Message, ex);
throw;
}
var associateIds = new HashSet<int>(requestedPoints.Select(x => x.AssociateId)).ToArray();
var commissionStats = _statsService.GetAssociateStats(associateIds, DateTime.Today) ?? new Dictionary<int, CommissionStats>();
foreach (var dataPoint in requestedPoints)
{
if (commissionStats.TryGetValue(dataPoint.AssociateId, out var associateStats) && associateStats != null)
{
statsDataPoints.Add(AssignAssociateStatsDataPoints(associateStats, dataPoint));
}
else
{
statsDataPoints.Add(new DataPointValue)
{
DataPoint = dataPoint,
Value = null
});
}
}
}
return statsDataPoints.ToArray();
}