Modify the Algorithm to Include the New Milestone and Threshold Columns

Here's how you can modify the algorithm to include the new milestone and threshold columns you created:

  1. On the Subscription Configuration page, click Dynamic Matrix Configuration > Manage Algorithms.

    The Manage Algorithms page is displayed.

    Note: If you're using Service Contracts, then you navigate to this page by clicking Navigator > Contract Management > Contracts > Tasks > Manage Algorithms.
  2. Select the Get Subscription Entitlements (or Contracts Get Service Entitlements) row, with the algorithm version 1 and status Published.

  3. Select Actions > Create Version. A new version of the algorithm is created, with the status In Progress.

  4. Select the new version of the algorithm. The Edit Algorithm page is displayed.

  5. On the Algorithm tab, select Look up matching Entitlement Rule.

  6. In the First Row Actions section, click in the Actions field.

  7. Copy the existing algorithm and append it. For example:

    if(Matrix.hasProperty("NextResponseMetricCode")){
    rule= EntitlementResults.insert([EntitlementResultId: getNextId()])
    rule.EntitlementId=Entitlement.EntitlementId
    rule.ScheduleId=Matrix.CalendarCode
    rule.ResultName= 'NextResponseMetricCode'
    rule.ResultValue= Matrix.NextResponseMetricCode
    rule.ResultThresholdValue=Matrix.NextResponseWarningMetricCode
    }
    Note: If you're using Service Contracts, use rule.CalendarId=Matrix.CalendarCode instead of rule.ScheduleId=Matrix.CalendarCode.
  8. Replace the Source Code Name values with the values of the administrator-defined metric and its corresponding warning threshold you saved in the previous procedure for adding the result columns to the matrix class.

    In this example, NextResponseMetricCode and NextResponseWarningMetricCode are the names defined in the matrix classes.

  9. Click Save and Close.

  10. Navigate to the Manage Algorithms page.

  11. Select the modified version of the algorithm, and click Actions > Publish. The Status of the algorithm is updated to Published.