Q-assign Assignment API


Introduction

Q-assign exposes its Assignment API that allows users to perform various operations and retrieve information related to the assignment module. The exposed API functions are documented as follows.

 

Entry Point to the API

A global class called QassignAPI_Assignment is shipped with the Q-assign package. It exposes methods that allow users (third-party code/apps) to perform assignment related operations.

 

1. Method: Constructor for QassignAPI_Assignment

 

a. Description

  • Creates an instance of QassignAPI_Assignment and initializes internal data for the object. If object initialization is successful, then any of its global methods can be called. If initialization fails for any reason, an exception of type QassignAPI_AssignmentException is thrown with details about the error.

b. Parameters

  • (none)

c. Return type

  • (none)

 

2. Method: getMatchingMembersForAssignmentGroup_v1

 

a. Description

This function takes a Record (parameter: RecordId), an Assignment Group Id (parameter: AssignmentGroupId) or Assignment Group Name (parameter: AssignmentGroupName). It performs pre-conditions below and if any of that fails, it returns an exception of type QassignAPI_AssignmentException.

  • RecordId is a valid ID
  • Either AssignmentGroupId or AssignmentGroupName is provided but not both
  • AssignmentGroupId or AssignmentGroupName refer to an existing Assignment Group
  • Record ID is for a record that is the target object of the identified Assignment Group
  • Assignment Group is enabled

Once pre-conditions are satisfied, it runs Member Matching Rules (if any). The resultant user set from Member Matching Rules is then used as input to perform assignment logic based on selected Assignment Method (Round Robin, Load Balanced etc.).

 

The returned contains only user Ids that are available AND match the record. This means if the Assignment Group had Member Matching rules then it will only return a list of users that match the record and if Assignment Group doesn’t have any matching rules then it will return all available users.

 

Available users are those who have been assigned a license, available for Q-assign, enabled in the group and logged in (if AG is set to assign to Logged in users only); it also filters outs all users who have met the Assignment Cap or their Quota for the selected period.

 

The returned list is ordered by the preference i.e. the user who is most eligible to receive the record (depending on selected Assignment Method) is first on the list and the user who is least eligible to receive the record is at the end of the list.

 

This method ignores the Business Hours associated to the group i.e. if Assignment Group is enabled but not active due to being out of Business Hours, the API will still return the users as if the group was active at the moment.

 

b. Parameters

  • RecordId: ID (required) - Id of the record to get the available user for.

  • AssignmentGroupId: ID - Id of the assignment group to run and get a list of matching users of that group.
  • AssignmentGroupName: String - Name of the assignment group to run and get a list of matching users of that group.

 

c. Returns

  • List<Id> containing Ids of users who match the criteria based on the lead passed to the method.

 

3. Method: getMatchingMembersForAssignmentGroup_v1

 

a. Description

This function takes a Record (parameter: RecordId), an Assignment Group Id or Name (parameter: AssignmentGroupIdOrName). It performs pre-conditions below and if any of that fails, it returns an exception of type QassignAPI_AssignmentException.

  • RecordId is a valid ID
  • AssignmentGroupIdOrName contains a valid Id or non-empty string
  • AssignmentGroupIdOrName refer to an existing Assignment Group
  • Record ID is for a record that is the target object of the identified Assignment Group
  • Assignment Group is enabled

Once pre-conditions are satisfied, it runs Member Matching Rules (if any). The resultant user set from Member Matching Rules is then used as input to perform assignment logic based on selected Assignment Method (Round Robin, Load Balanced etc.).

 

The returned contains only user Ids that are available AND match the record. This means if the Assignment Group had Member Matching rules then it will only return a list of users that match the record and if Assignment Group doesn’t have any matching rules then it will return all available users.

 

Available users are those who have been assigned a license, available for Q-assign, enabled in the group and logged in (if AG is set to assign to Logged in users only); it also filters outs all users who have met the Assignment Cap or their Quota for the selected period.

 

The returned list is ordered by the preference i.e. the user who is most eligible to receive the record (depending on selected Assignment Method) is first on the list and the user who is least eligible to receive the record is at the end of the list.

 

This method ignores the Business Hours associated to the group i.e. if Assignment Group is enabled but not active due to being out of Business Hours, the API will still return the users as if the group were active at the moment.

 

b. Parameters

  • RecordId: ID (required) - Id of the record to get an available user for.
  • AssignmentGroupIdOrName: ID - Id of the assignment group to run and get a list of matching users of that group.

c. Returns

  • List<Id> containing Ids of users who match the criteria based on the lead passed to the method.

 

Please contact us at support@ortooapps.com for any questions.

Was this information helpful?