csc.AutoAllocateServiceglobal with sharing class AutoAllocateService Used to auto-allocate resources to the playbooks and success plans. Exposes the API for mass allocation of resources on the playbook and success plan. Methods
autoAllocateglobal static List<csc.AutoAllocateResponse> autoAllocate(final List<csc.AutoAllocateRequest> requests) Used to auto-allocate playbooks using a list of requests. Input Parameters
Return ValueList<AutoAllocateResponse> Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. // Make a list of requests to call the API with. final List<csc.AutoAllocateRequest> requests = new List<csc.AutoAllocateRequest>(); // Provide the ID of the playbook that you want to auto-allocate. final Id playbookId1 = 'a2f53000000Fy8TAAS'; // Instantiate a request by providing a playbook ID. final csc.AutoAllocateRequest request1 = new csc.AutoAllocateRequest(playbookId1); // Add request1 to the list of requests. requests.add(request1); // Prepare parameters for the additional AutoAllocateRequest instance to be created. final Id playbookId2 = 'a2f53456000Fy8XTYS'; // Instantiate an additional request by providing a playbook ID. final csc.AutoAllocateRequest request2 = new csc.AutoAllocateRequest(playbookId2); // Add request2 to the list of requests. requests.add(request2); // Call the auto-allocate service with the list of requests. final List<csc.AutoAllocateResponse> responses = csc.AutoAllocateService.autoAllocate(requests); autoAllocateSuccessPlanglobal static List<csc.AutoAllocateSuccessPlanResponse> autoAllocateSuccessPlan(final List<csc.AutoAllocateSuccessPlanRequest> requests) Used to auto-allocate success plans using a list of requests. Input Parameters
Return ValueList<AutoAllocateSuccessPlanResponse> Sample Code
//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.
// Make a list of requests to call the API with.
final List<csc.AutoAllocateSuccessPlanRequest> requests = new List<csc.AutoAllocateSuccessPlanRequest>();
// Provide the ID of the success plan that you want to auto-allocate.
final Id successPlanId1 = 'a1MDR000001fnI52AI';
// Instantiate a request by providing a Success Plan ID.
final csc.AutoAllocateSuccessPlanRequest request1 = new csc.AutoAllocateSuccessPlanRequest(
successPlanId1
);
// Add request1 to the list of requests.
requests.add(request1);
// Prepare parameters for the additional AutoAllocateSuccessPlanRequest instance to be created.
final Id successPlanId2 = 'a1MDR000001fnRL2AY';
// Instantiate an additional request by providing a Success Plan ID.
final csc.AutoAllocateSuccessPlanRequest request2 = new csc.AutoAllocateSuccessPlanRequest(
successPlanId2
);
// Add request2 to the list of requests.
requests.add(request2);
// Call the auto-allocate service with the list of requests.
final List<csc.AutoAllocateSuccessPlanResponse> responses = csc.AutoAllocateService.autoAllocateSuccessPlan(
requests
);
|