Namespace: DirectScale.Disco.Extension.Hooks.Commissions
GetSplitPayments
Split commissions between multiple accounts.
Basic Implementation
public class GetSplitPayments : IHook<GetSplitPaymentsHookRequest, GetSplitPaymentsHookResponse>
{
public GetSplitPayments() { }
public GetSplitPaymentsHookResponse Invoke(GetSplitPaymentsHookRequest request, Func<GetSplitPaymentsHookRequest, GetSplitPaymentsHookResponse> func)
{
return func(request);
}
}
Register Hook
services.AddTransient<IHook<GetSplitPaymentsHookRequest, GetSplitPaymentsHookResponse>, GetSplitPayments>();
Request Model
{}
Response Model
{
"SplitPayments": [
{
"FromAssociateId": 0,
"ToAssociateId": 0,
"Percent": 0.0,
"Comment": "string"
}
]
}
GetCommissionBonusDetails
Hook for displaying Commission Details to CloudSpark.
Basic Implementation
public class GetCommissionBonusDetails : IHook<GetCommissionBonusDetailsHookRequest, GetCommissionBonusDetailsHookResponse>
{
public GetCommissionBonusDetails() { }
public GetCommissionBonusDetailsHookResponse Invoke(GetCommissionBonusDetailsHookRequest request, Func<GetCommissionBonusDetailsHookRequest, GetCommissionBonusDetailsHookResponse> func)
{
return func(request);
}
}
Register Hook
services.AddTransient<IHook<GetCommissionBonusDetailsHookRequest, GetCommissionBonusDetailsHookResponse>, GetCommissionBonusDetails>();
Request Model
{
"AssociateId": 0,
"PeriodId": 0,
"BonusId": "string"
}
Response Model
{
"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.
Basic Implementation
public class GetCommissionBonusDetailsAfter : IHook<AfterCommissionBonusDetailsHookModel, AfterCommissionBonusDetailsHookModel>
{
public GetCommissionBonusDetailsAfter() { }
public AfterCommissionBonusDetailsHookModel Invoke(AfterCommissionBonusDetailsHookModel request, Func<AfterCommissionBonusDetailsHookModel, AfterCommissionBonusDetailsHookModel> func)
{
return func(request);
}
}
Register Hook
services.AddTransient<IHook<AfterCommissionBonusDetailsHookModel, AfterCommissionBonusDetailsHookModel>, GetCommissionBonusDetailsAfter>();
Request Model
{
"Detail": [
{
"AssociateId": 0,
"PeriodId": 0,
"BonusId": "string",
"BonusDescription": "string",
"Amount": 0.0,
"Columns": null
}
],
"TotalRecordCount": 0,
"PageRecordCount": 0
}
Response Model
{
"Detail": [
{
"AssociateId": 0,
"PeriodId": 0,
"BonusId": "string",
"BonusDescription": "string",
"Amount": 0.0,
"Columns": null
}
],
"TotalRecordCount": 0,
"PageRecordCount": 0
}
GetCommissionDetails
Display summarized Commission Detail.
Basic Implementation
public class GetCommissionDetails : IHook<GetCommissionDetailsHookRequest, GetCommissionDetailsHookResponse>
{
public GetCommissionDetails() { }
public GetCommissionDetailsHookResponse Invoke(GetCommissionDetailsHookRequest request, Func<GetCommissionDetailsHookRequest, GetCommissionDetailsHookResponse> func)
{
return func(request);
}
}
Register Hook
services.AddTransient<IHook<GetCommissionDetailsHookRequest, GetCommissionDetailsHookResponse>, GetCommissionDetails>();
Request Model
{
"AssociateId": 0,
"Periodtypeid": 0,
"PeriodId": 0
}
Response Model
{
"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
Basic Implementation
public class GetBonusDetailData : IHook<GetBonusDetailDataHookRequest, GetBonusDetailDataHookResponse>
{
public GetBonusDetailData() { }
public GetBonusDetailDataHookResponse Invoke(GetBonusDetailDataHookRequest request, Func<GetBonusDetailDataHookRequest, GetBonusDetailDataHookResponse> func)
{
return func(request);
}
}
Register Hook
services.AddTransient<IHook<GetBonusDetailDataHookRequest, GetBonusDetailDataHookResponse>, GetBonusDetailData>();
Request Model
{
"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
}
]
}
Response Model
{
"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.
Basic Implementation
public class MatchesRuleForVisualTree : IHook<MatchRuleForVisualTreeHookRequest, MatchRuleForVisualTreeHookResponse>
{
public GetMatchesRuleForVisualTree() { }
public MatchRuleForVisualTreeHookResponse Invoke(MatchRuleForVisualTreeHookRequest request, Func<MatchRuleForVisualTreeHookRequest, MatchRuleForVisualTreeHookResponse> func)
{
return func(request);
}
}
Register Hook
services.AddTransient<IHook<MatchRuleForVisualTreeHookRequest, MatchRuleForVisualTreeHookResponse>, GetMatchRuleForVisualTree>();
Request Model
{
"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
}
}
Response Model
{
"IsMatch": false
}
CanViewDownlineNode
A way to block an Associate from seeing certain Associates in their downline.
Basic Implementation
public class CanViewDownlineNode : IHook<CanViewDownlineNodeHookRequest, CanViewDownlineNodeHookResponse>
{
public CanViewDownlineNode() { }
public CanViewDownlineNodeHookResponse Invoke(CanViewDownlineNodeHookRequest request, Func<CanViewDownlineNodeHookRequest, CanViewDownlineNodeHookResponse> func)
{
return func(request);
}
}
Register Hook
services.AddTransient<IHook<CanViewDownlineNodeHookRequest, CanViewDownlineNodeHookResponse>, CanViewDownlineNode>();
Request Model
{
"CallingNodeId": {
"AssociateId": 0,
"TreeIndex": 0
},
"ChildNodeId": {
"AssociateId": 0,
"TreeIndex": 0
}
}
Response Model
{
"CanViewNode": false
}
CanPlaceAssociate
Gets all Associates that you can move in a given Tree.
Basic Implementation
public class CanPlaceAssociate : IHook<CanPlaceAssociateHookRequest, CanPlaceAssociateHookResponse>
{
public CanPlaceAssociate() { }
public CanPlaceAssociateHookResponse Invoke(CanPlaceAssociateHookRequest request, Func<CanPlaceAssociateHookRequest, CanPlaceAssociateHookResponse> func)
{
return func(request);
}
}
Register Hook
services.AddTransient<IHook<CanPlaceAssociateHookRequest, CanPlaceAssociateHookResponse>, CanPlaceAssociate>();
Request Model
{
"AssociateId": 0,
"Tree": 0
}
Response Model
{
"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.
Basic Implementation
public class GetPlaceToAssociates : IHook<GetPlaceToAssociatesHookRequest, GetPlaceToAssociatesHookResponse>
{
public GetPlaceToAssociates() { }
public GetPlaceToAssociatesHookResponse Invoke(GetPlaceToAssociatesHookRequest request, Func<GetPlaceToAssociatesHookRequest, GetPlaceToAssociatesHookResponse> func)
{
return func(request);
}
}
Register Hook
services.AddTransient<IHook<GetPlaceToAssociatesHookRequest, GetPlaceToAssociatesHookResponse>, GetPlaceToAssociates>();
Request Model
{
"AssociateId": 0,
"Tree": 0
}
Response Model
{
"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.
Basic Implementation
public class LogRealtimeRankAdvance : IHook<LogRealtimeRankAdvanceHookRequest, LogRealtimeRankAdvanceHookResponse>
{
public LogRealtimeRankAdvance() { }
public LogRealtimeRankAdvanceHookResponse Invoke(LogRealtimeRankAdvanceHookRequest request, Func<LogRealtimeRankAdvanceHookRequest, LogRealtimeRankAdvanceHookResponse> func)
{
return func(request);
}
}
Register Hook
services.AddTransient<IHook<LogRealtimeRankAdvanceHookRequest, LogRealtimeRankAdvanceHookResponse>, LogRealtimeRankAdvance>();
Request Model
{
"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"
}
Response Model
{}
GetPlacementExpirationDates
Basic Implementation
public class GetPlacementExpirationDates : IHook<GetPlacementExpirationDatesHookRequest, GetPlacementExpirationDatesHookResponse>
{
public GetPlacementExpirationDates() { }
public GetPlacementExpirationDatesHookResponse Invoke(GetPlacementExpirationDatesHookRequest request, Func<GetPlacementExpirationDatesHookRequest, GetPlacementExpirationDatesHookResponse> func)
{
return func(request);
}
}
Register Hook
services.AddTransient<IHook<GetPlacementExpirationDatesHookRequest, GetPlacementExpirationDatesHookResponse>, GetPlacementExpirationDates>();
Request Model
{
"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
}
Response Model
{
"ExpirationDates": null
}
Comments
Please sign in to leave a comment.