Rejection API

The DE Apex API includes methods to call the DE rejection functionality programmatically.

Reject Assignment

global static void n2de.GlobalAPIReject.rejectAssignment(Id recordId, String reason)

Perform a single rejection with given reason.

Example

n2de.RejectRequestDTO rejectRequest = new n2de.RejectRequestDTO(theId, 'The reason')

 

Reject Assignments

global static void n2de.GlobalAPIReject.rejectAssignments(List<n2de.RejectRequestDTO> rejectRequests)

Perform multiple rejections with given reasons.

Example

n2de.RejectRequestDTO rejectRequest = new n2de.RejectRequestDTO()

 

When rejecting one or more assignments the following needs to be considered:

  • The recordId and reason are always required
  • If reject reason options have been defined in Distribution Settings, the reason must be in that list, unless 'allow custom reasons' has also been selected
  • When rejecting multiple records a maximum of 500 can be provided in one call
  • The recordId must point to a valid record and the associated distribution log must exist
  • If configured, the user must be within their rejection request limit

How did we do?

System API

Contact