Update Reseller Level Coefficients API

Configure the scoring coefficients that determine how various metrics contribute to reseller scores

Score Configuration

Update Level Coefficients API

Fine-tune the reseller scoring algorithm by adjusting coefficients for credit, sales, subscriptions, and membership duration. Control how each metric impacts reseller levels.

Custom Weights

Adjust how each metric contributes to the total score.

Score Caps

Set maximum contributions for each scoring category.

Balanced Scoring

Create fair scoring that rewards diverse performance.


Endpoint Overview

MUTATION/graphql

Update the coefficients that determine how various metrics (credit, sales, subscriptions, membership) contribute to reseller scores.

Authentication:Bearer Token
Required scopes:admin

Coefficient Categories

Credit Metrics

Monthly credit usage and current credit balance contributions.

Sales Metrics

Total sales volume and monthly sales performance.

Subscription Metrics

Active subscription count as a scoring factor.

Duration Metrics

Membership duration and deposit interval rewards.


Request Parameters

monthCreditPercentFloat

Percentage weight for monthly credit usage in score calculation.

monthCreditMaxFloat

Maximum score contribution from monthly credit metric.

currentCreditPercentFloat

Percentage weight for current credit balance in score calculation.

currentCreditMaxFloat

Maximum score contribution from current credit balance.

activeSubscriptionPercentFloat

Percentage weight for active subscription count.

activeSubscriptionMaxFloat

Maximum score contribution from active subscriptions.

membershipDurationPercentFloat

Percentage weight for membership duration.

membershipDurationMaxFloat

Maximum score contribution from membership duration.

depositIntervalManualDaysInt

Number of days for deposit interval calculation.

depositIntervalMaxFloat

Maximum score contribution from deposit interval.

totalSalePercentFloat

Percentage weight for total historical sales.

totalSaleMaxFloat

Maximum score contribution from total sales.

monthSalePercentFloat

Percentage weight for current month sales.

monthSaleMaxFloat

Maximum score contribution from monthly sales.


GraphQL Mutation

mutation updateResellerLevelCoefficients(
  $levelCoefficients: ResellerLevelCoefficientsEdit
) {
  updateResellerLevelCoefficients(levelCoefficients: $levelCoefficients) {
    monthCreditPercent
    monthCreditMax
    currentCreditPercent
    currentCreditMax
    activeSubscriptionPercent
    activeSubscriptionMax
    membershipDurationPercent
    membershipDurationMax
    depositIntervalManualDays
    depositIntervalMax
    totalSalePercent
    totalSaleMax
    monthSalePercent
    monthSaleMax
  }
}

Variables:

{
  "levelCoefficients": {
    "monthCreditPercent": 0.15,
    "monthCreditMax": 2000,
    "currentCreditPercent": 0.10,
    "currentCreditMax": 1500,
    "activeSubscriptionPercent": 0.20,
    "activeSubscriptionMax": 3000,
    "membershipDurationPercent": 0.10,
    "membershipDurationMax": 1000,
    "depositIntervalManualDays": 30,
    "depositIntervalMax": 500,
    "totalSalePercent": 0.25,
    "totalSaleMax": 4000,
    "monthSalePercent": 0.20,
    "monthSaleMax": 3000
  }
}

Response

200Coefficients Updated Successfully
{
  "data": {
    "updateResellerLevelCoefficients": {
      "monthCreditPercent": 0.15,
      "monthCreditMax": 2000,
      "currentCreditPercent": 0.10,
      "currentCreditMax": 1500,
      "activeSubscriptionPercent": 0.20,
      "activeSubscriptionMax": 3000,
      "membershipDurationPercent": 0.10,
      "membershipDurationMax": 1000,
      "depositIntervalManualDays": 30,
      "depositIntervalMax": 500,
      "totalSalePercent": 0.25,
      "totalSaleMax": 4000,
      "monthSalePercent": 0.20,
      "monthSaleMax": 3000
    }
  }
}
400Invalid Coefficients
{
  "errors": [
    {
      "message": "Total percentages must equal 100%",
      "path": ["updateResellerLevelCoefficients"],
      "extensions": {
        "code": "INVALID_COEFFICIENTS"
      }
    }
  ],
  "data": null
}

Score Calculation Example

Total Score =
  (Monthly Credit × monthCreditPercent, max: monthCreditMax) +
  (Current Credit × currentCreditPercent, max: currentCreditMax) +
  (Active Subs × activeSubscriptionPercent, max: activeSubscriptionMax) +
  (Membership Days × membershipDurationPercent, max: membershipDurationMax) +
  (Total Sales × totalSalePercent, max: totalSaleMax) +
  (Month Sales × monthSalePercent, max: monthSaleMax)

Example Calculation:

  • Monthly Credit: $5,000 × 0.15 = 750 (capped at 2000)
  • Active Subscriptions: 50 × 0.20 × 100 = 1000 (capped at 3000)
  • Total Sales: $50,000 × 0.25 = 12,500 → capped at 4000
  • Total Score: 5,750

Best Practices

Balance Percentages

Ensure coefficient percentages sum to 100% for meaningful scores.

Set Realistic Caps

Maximum values should be achievable but challenging for top performers.

Reward Consistency

Weight recurring metrics (monthly) to encourage sustained performance.

Test Changes

Calculate scores for sample resellers before deploying coefficient changes.



Impact on Resellers

Changing coefficients affects all reseller scores. Consider the impact on current level placements before making significant changes.

Calculate Updated Scores

After updating coefficients, use the Calculate Score API to see how changes affect individual reseller scores.

Calculate Reseller Score