Services Estimator API Developer Reference

ffscpq.CreateScopingSessionService

global with sharing class CreateScopingSessionService

A service that provides functionality related to creating scoping sessions.

Methods

createScopingSession

global static ffscpq.CreateScopingSessionService.CreateScopingSessionResponse createScopingSession(ffscpq.CreateScopingSessionService.CreateScopingSessionRequest request)

A method that creates a scoping session.

Input Parameters

Name Type Description
request ffscpq.CreateScopingSessionService.CreateScopingSessionRequest CreateScopingSessionRequest.

Return Value

This service returns a CreateScopingSessionResponse.

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.

// Add opportunity ID to populate lookup on the created scoping session.
Id opportunityId = '006DR00000KhTNYYA3';

// Build request
ffscpq.CreateScopingSessionService.CreateScopingSessionRequest request = new ffscpq.CreateScopingSessionService.CreateScopingSessionRequest(
    opportunityId
);

// Optionally add a list of estimate product IDs to add to the created scoping session.
request.EstimateProductIds = new List<Id>{ 'a5FDR000001Qpxt2AC' };

// Optionally add a name to the created scoping session.
request.Name = 'Scoping Session created using global service';

// Call the global service with the previously created request list.
ffscpq.CreateScopingSessionService.CreateScopingSessionResponse response = ffscpq.CreateScopingSessionService.createScopingSession(
    request
);

// Extract the response data.
System.debug('Created Scoping session ID: ' + response.ScopingSession);
System.debug(
    'Created Scoping Session Estimate Product IDs: ' + response.ScopingSessionEstimateProductIds
);

createScopingSessions

global static List<ffscpq.CreateScopingSessionService.CreateScopingSessionResponse> createScopingSessions(List<ffscpq.CreateScopingSessionService.CreateScopingSessionRequest> requests)

A method that creates multiple scoping sessions.

Input Parameters

Name Type Description
requests List<ffscpq.CreateScopingSessionService.CreateScopingSessionRequest> List of CreateScopingSessionRequest.

Return Value

This service returns a list of CreateScopingSessionResponse.

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.

// A list of opportunity IDs to create scoping sessions for.
List<Id> opportunityIds = new List<Id>{ '006DR00000KhTNYYA3', '006DR00000KhTNZYA3' };

// Build requests for each opportunity.
List<ffscpq.CreateScopingSessionService.CreateScopingSessionRequest> requests = new List<ffscpq.CreateScopingSessionService.CreateScopingSessionRequest>();
for (Id opportunityId : opportunityIds) {
    ffscpq.CreateScopingSessionService.CreateScopingSessionRequest request = new ffscpq.CreateScopingSessionService.CreateScopingSessionRequest(
        opportunityId
    );
    // Optionally add a list of estimate product IDs to add to the created scoping session.
    request.EstimateProductIds = new List<Id>{ 'a5FDR000001Qpxt2AC' };
    // Optionally add a name to the created scoping session.
    request.Name = 'Scoping Session created using global service';
    requests.add(request);
}

// Call the global service with the previously created request list.
List<ffscpq.CreateScopingSessionService.CreateScopingSessionResponse> responses = ffscpq.CreateScopingSessionService.createScopingSessions(
    requests
);

// Extract the response data.
for (ffscpq.CreateScopingSessionService.CreateScopingSessionResponse response : responses) {
    System.debug('Created Scoping session ID: ' + response.ScopingSession);
    System.debug(
        'Created Scoping Session Estimate Product IDs: ' + response.ScopingSessionEstimateProductIds
    );
}

ffscpq.CreateScopingSessionService.CreateScopingSessionRequest

global with sharing class CreateScopingSessionRequest

The request structure for creating a scoping session.

Properties

Name Type Description
OpportunityId Id An opportunity ID associated with the created scoping session.
EstimateProductIds List<Id> [Optional] The estimate products to add to the created scoping session.
Name String [Optional] The name of the created scoping session.

Methods

CreateScopingSessionRequest

global CreateScopingSessionRequest(Id opportunityId)

ffscpq.CreateScopingSessionService.CreateScopingSessionResponse

global with sharing class CreateScopingSessionResponse

The response structure for creating a scoping session.

Properties

Name Type Description
ScopingSession Id The ID of the newly created scoping session.
ScopingSessionEstimateProductIds List<Id> The IDs of the estimate products added to the created scoping session.

Methods

CreateScopingSessionResponse

global CreateScopingSessionResponse(Id scopingSessionId, List<Id> ScopingSessionEstimateProductIds)

© Copyright 2009–2026 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.