Commissions
using DirectScale.Disco.Extension.Hooks.Commissions;
GetSplitPayments
Split commissions between multiple accounts.
public class GetSplitPayments : IHook<GetSplitPaymentsHookRequest, GetSplitPaymentsHookResponse>
{
public GetSplitPayments() { }
public GetSplitPaymentsHookResponse Invoke(GetSplitPaymentsHookRequest request, Func<GetSplitPaymentsHookRequest, GetSplitPaymentsHookResponse> func)
{
return func(request);
}
}
services.AddTransient<IHook<GetSplitPaymentsHookRequest, GetSplitPaymentsHookResponse>, GetSplitPayments>();
{}
{
"SplitPayments": [
{
"FromAssociateId": 0,
"ToAssociateId": 0,
"Percent": 0.0,
"Comment": "string"
}
]
}
GetCommissionBonusDetails
Hook for displaying Commission Details to CloudSpark
public class GetCommissionBonusDetails : IHook<GetCommissionBonusDetailsHookRequest, GetCommissionBonusDetailsHookResponse>
{
public GetCommissionBonusDetails() { }
public GetCommissionBonusDetailsHookResponse Invoke(GetCommissionBonusDetailsHookRequest request, Func<GetCommissionBonusDetailsHookRequest, GetCommissionBonusDetailsHookResponse> func)
{
return func(request);
}
}
services.AddTransient<IHook<GetCommissionBonusDetailsHookRequest, GetCommissionBonusDetailsHookResponse>, GetCommissionBonusDetails>();
{
"AssociateId": 0,
"PeriodId": 0,
"BonusId": "string"
}
{
"HistoryDetails": [
{
"AssociateId": 0,
"CommissionPeriodId": 0,
"PaymentGroup": "string",
"Amount": 0.0,
"Comment": "string",
"EarnedFromName": "string",
"EarnedFromId": 0,
"SubGroup": "string",
"Status": 0,
"Contributors": null
}
]
}
GetCommissionBonusDetailsAfter
Hook for displaying Commission Details to CloudSpark.
public class GetCommissionBonusDetailsAfter : IHook<AfterCommissionBonusDetailsHookModel, AfterCommissionBonusDetailsHookModel>
{
public GetCommissionBonusDetailsAfter() { }
public AfterCommissionBonusDetailsHookModel Invoke(AfterCommissionBonusDetailsHookModel request, Func<AfterCommissionBonusDetailsHookModel, AfterCommissionBonusDetailsHookModel> func)
{
return func(request);
}
}
services.AddTransient<IHook<AfterCommissionBonusDetailsHookModel, AfterCommissionBonusDetailsHookModel>, GetCommissionBonusDetailsAfter>();
{
"Detail": [
{
"AssociateId": 0,
"PeriodId": 0,
"BonusId": "string",
"BonusDescription": "string",
"Amount": 0.0,
"Columns": null
}
],
"TotalRecordCount": 0,
"PageRecordCount": 0
}
{
"Detail": [
{
"AssociateId": 0,
"PeriodId": 0,
"BonusId": "string",
"BonusDescription": "string",
"Amount": 0.0,
"Columns": null
}
],
"TotalRecordCount": 0,
"PageRecordCount": 0
}
GetCommissionDetails
Display summarized Commission Detail.
public class GetCommissionDetails : IHook<GetCommissionDetailsHookRequest, GetCommissionDetailsHookResponse>
{
public GetCommissionDetails() { }
public GetCommissionDetailsHookResponse Invoke(GetCommissionDetailsHookRequest request, Func<GetCommissionDetailsHookRequest, GetCommissionDetailsHookResponse> func)
{
return func(request);
}
}
services.AddTransient<IHook<GetCommissionDetailsHookRequest, GetCommissionDetailsHookResponse>, GetCommissionDetails>();
{
"AssociateId": 0,
"Periodtypeid": 0,
"PeriodId": 0
}
{
"PaidRank": 0,
"PaidRankDescription": "string",
"PaidDate": "0001-01-01T00:00:00",
"Bonuses": [
{
"AssociateId": 0,
"PeriodId": 0,
"BonusId": "string",
"BonusDescription": "string",
"Amount": 0.0,
"Columns": null
}
],
"Details": {
"PeriodId": 0,
"PeriodDescription": "string",
"PeriodTypeId": 0,
"StartDate": "0001-01-01T00:00:00",
"EndDate": "0001-01-01T00:00:00",
"Total": 0.0,
"Earnings": 0.0,
"PreviousBalance": 0.0,
"Fee": 0.0,
"PaidAsRank": 0,
"PaidAsRankDescription": "string"
}
}
GetBonusDetailData
Hook for displaying Commission Details to CloudSpark
public class GetBonusDetailData : IHook<GetBonusDetailDataHookRequest, GetBonusDetailDataHookResponse>
{
public GetBonusDetailData() { }
public GetBonusDetailDataHookResponse Invoke(GetBonusDetailDataHookRequest request, Func<GetBonusDetailDataHookRequest, GetBonusDetailDataHookResponse> func)
{
return func(request);
}
}
services.AddTransient<IHook<GetBonusDetailDataHookRequest, GetBonusDetailDataHookResponse>, GetBonusDetailData>();
{
"AssociateId": 0,
"PeriodId": 0,
"BonusId": "string",
"Details": [
{
"AssociateId": 0,
"CommissionPeriodId": 0,
"PaymentGroup": "string",
"Amount": 0.0,
"Comment": "string",
"EarnedFromName": "string",
"EarnedFromId": 0,
"SubGroup": "string",
"Status": 0,
"Contributors": null
}
]
}
{
"BonusDetail": [
{
"AssociateId": 0,
"PeriodId": 0,
"BonusId": "string",
"BonusDescription": "string",
"Amount": 0.0,
"Columns": null
}
]
}
GetMatchesRuleForVisualTree
Enables the Visual Tree in the Web Office to change Associates color if this returns true for them.
public class MatchesRuleForVisualTree : IHook<MatchRuleForVisualTreeHookRequest, MatchRuleForVisualTreeHookResponse>
{
public GetMatchesRuleForVisualTree() { }
public MatchRuleForVisualTreeHookResponse Invoke(MatchRuleForVisualTreeHookRequest request, Func<MatchRuleForVisualTreeHookRequest, MatchRuleForVisualTreeHookResponse> func)
{
return func(request);
}
}
services.AddTransient<IHook<MatchRuleForVisualTreeHookRequest, MatchRuleForVisualTreeHookResponse>, GetMatchRuleForVisualTree>();
{
"Stats": {
"AssociateID": 0,
"AssociateName": "string",
"Period": {
"PeriodId": null,
"TemplateName": "string",
"TemplateRevision": "string",
"Begin": "0001-01-01T00:00:00",
"End": "0001-01-01T00:00:00",
"PeriodType": 0,
"Details": {
"TotalGv": null,
"TotalPaid": null,
"PercentPaid": null,
"TotalAssociates": null,
"TotalActive": null
},
"IsLocked": false,
"IsCommitted": false,
"Name": "string",
"TotalGv": 0.0,
"TotalPaid": 0.0,
"PercentPaid": 0.0,
"TotalAssociates": 0,
"TotalActive": 0
},
"Kpis": null,
"Ranks": [
{
"RankId": 0,
"Groups": [
{
"Details": [
{
"RankId": 0,
"Description": "string",
"MeetsCondition": false,
"Min": 0.0,
"Max": 0.0,
"Value": 0.0,
"RankRuleId": "string",
"Tree": 0,
"IsGvCondition": false,
"MaxPerLeg": 0.0,
"ConditionId": "string",
"PercentComplete": 0.0,
"IsBool": false
}
]
}
]
}
],
"PeriodKitLevels": null,
"KitLevels": null,
"KpiDetail": null
}
}
{
"IsMatch": false
}
CanViewDownlineNode
A way to block an Associate from seeing certain Associates in their downline.
public class CanViewDownlineNode : IHook<CanViewDownlineNodeHookRequest, CanViewDownlineNodeHookResponse>
{
public CanViewDownlineNode() { }
public CanViewDownlineNodeHookResponse Invoke(CanViewDownlineNodeHookRequest request, Func<CanViewDownlineNodeHookRequest, CanViewDownlineNodeHookResponse> func)
{
return func(request);
}
}
services.AddTransient<IHook<CanViewDownlineNodeHookRequest, CanViewDownlineNodeHookResponse>, CanViewDownlineNode>();
{
"CallingNodeId": {
"AssociateId": 0,
"TreeIndex": 0
},
"ChildNodeId": {
"AssociateId": 0,
"TreeIndex": 0
}
}
{
"CanViewNode": false
}
CanPlaceAssociate
Gets all Associates that you can move in a given Tree.
public class CanPlaceAssociate : IHook<CanPlaceAssociateHookRequest, CanPlaceAssociateHookResponse>
{
public CanPlaceAssociate() { }
public CanPlaceAssociateHookResponse Invoke(CanPlaceAssociateHookRequest request, Func<CanPlaceAssociateHookRequest, CanPlaceAssociateHookResponse> func)
{
return func(request);
}
}
services.AddTransient<IHook<CanPlaceAssociateHookRequest, CanPlaceAssociateHookResponse>, CanPlaceAssociate>();
{
"AssociateId": 0,
"Tree": 0
}
{
"CanPlaceAssociate": false
}
GetPlaceToAssociates
Get all Associates that the Sponsor can place someone under. Requests the PlacementDetails
for where AssociateId
can be placed. Returns the Associates in AssociateId's
Tree downline who can have new Associates placed under them from the Holding tank or Placement Suite.
public class GetPlaceToAssociates : IHook<GetPlaceToAssociatesHookRequest, GetPlaceToAssociatesHookResponse>
{
public GetPlaceToAssociates() { }
public GetPlaceToAssociatesHookResponse Invoke(GetPlaceToAssociatesHookRequest request, Func<GetPlaceToAssociatesHookRequest, GetPlaceToAssociatesHookResponse> func)
{
return func(request);
}
}
services.AddTransient<IHook<GetPlaceToAssociatesHookRequest, GetPlaceToAssociatesHookResponse>, GetPlaceToAssociates>();
{
"AssociateId": 0,
"Tree": 0
}
{
"PlaceToAssociates": [
0
],
"PlacementDetails": [
{
"AssociateId": 0,
"LegsAvailable": null
}
]
}
LogRealtimeRankAdvance
Turns on real-time rank advancement. By default, it adds a record to CRM_CommissionRealtimeRankAdvancement so you know when an Associate hits that rank throughout the period.
public class LogRealtimeRankAdvance : IHook<LogRealtimeRankAdvanceHookRequest, LogRealtimeRankAdvanceHookResponse>
{
public LogRealtimeRankAdvance() { }
public LogRealtimeRankAdvanceHookResponse Invoke(LogRealtimeRankAdvanceHookRequest request, Func<LogRealtimeRankAdvanceHookRequest, LogRealtimeRankAdvanceHookResponse> func)
{
return func(request);
}
}
services.AddTransient<IHook<LogRealtimeRankAdvanceHookRequest, LogRealtimeRankAdvanceHookResponse>, LogRealtimeRankAdvance>();
{
"Period": {
"PeriodId": null,
"TemplateName": "string",
"TemplateRevision": "string",
"Begin": "0001-01-01T00:00:00",
"End": "0001-01-01T00:00:00",
"PeriodType": 0,
"Details": {
"TotalGv": null,
"TotalPaid": null,
"PercentPaid": null,
"TotalAssociates": null,
"TotalActive": null
},
"IsLocked": false,
"IsCommitted": false,
"Name": "string",
"TotalGv": 0.0,
"TotalPaid": 0.0,
"PercentPaid": 0.0,
"TotalAssociates": 0,
"TotalActive": 0
},
"Kpis": null,
"AssociateId": 0,
"OldRank": 0,
"NewRank": 0,
"Date": "0001-01-01T00:00:00"
}
{}
GetPlacementExpirationDates
public class GetPlacementExpirationDates : IHook<GetPlacementExpirationDatesHookRequest, GetPlacementExpirationDatesHookResponse>
{
public GetPlacementExpirationDates() { }
public GetPlacementExpirationDatesHookResponse Invoke(GetPlacementExpirationDatesHookRequest request, Func<GetPlacementExpirationDatesHookRequest, GetPlacementExpirationDatesHookResponse> func)
{
return func(request);
}
}
services.AddTransient<IHook<GetPlacementExpirationDatesHookRequest, GetPlacementExpirationDatesHookResponse>, GetPlacementExpirationDates>();
{
"Associates": [
{
"AssociateId": 0,
"ShipAddress": {
"Id": 0,
"AddressLine1": "string",
"AddressLine2": "string",
"AddressLine3": "string",
"City": "string",
"State": "string",
"PostalCode": "string",
"CountryCode": "string"
},
"Address": {
"Id": 0,
"AddressLine1": "string",
"AddressLine2": "string",
"AddressLine3": "string",
"City": "string",
"State": "string",
"PostalCode": "string",
"CountryCode": "string"
},
"AcceptTerms": false,
"AssociateBaseType": 0,
"AssociateType": 0,
"PriceGroup": 0,
"AssociateTypeName": "string",
"BackOfficeId": "string",
"BirthDate": "0001-01-01T00:00:00",
"CompanyName": "string",
"DormantDate": "0001-01-01T00:00:00",
"EmailAddress": "string",
"Name": "string string",
"DisplayFirstName": "string",
"DisplayLastName": "string",
"LegalFirstName": "string",
"LegalLastName": "string",
"RomanizedFirstName": "string",
"RomanizedLastName": "string",
"PrimaryPhone": "string",
"SecondaryPhone": "string",
"LanguageCode": "string",
"ShipAttention": "string",
"ShipPhone": "string",
"SignupDate": "0001-01-01T00:00:00",
"UpgradeDate": "0001-01-01T00:00:00",
"SignupMethod": "string",
"TaxExempt": false,
"TaxId": "string",
"TaxResaleNo": "string",
"TeamId": 0,
"TextNumber": "string",
"ExternalId": "string",
"StatusId": 0,
"Void": false,
"Custom": {
"Field1": "string",
"Field2": "string",
"Field3": "string",
"Field4": "string",
"Field5": "string"
}
}
],
"Tree": 0
}
{
"ExpirationDates": null
}
Updated over 3 years ago