This API validates and enriches data for a Customer Purchase Order.

API Details

APISignature
acceptOrderwebService static Apttus_Config2.CPQStruct.DataValidateEnrichResult validateAndEnrichSO(Id bObjectId)
Parameters
NameTypeDescription
requestApttus_Config2.CPQStruct.DataValidateEnrichResult validateAndEnrichSOThe request data object.
Request Data Object - 

Apttus_Config2.CPQStruct.DataValidateEnrichResult validateAndEnrichSO

FieldTypeRequired?Description
bObjectIdIDYesCustomer Purchase Order ID, Order Item ID to enrich and validate.


API Response

Response Data Object - DataValidateEnrichResult
FieldTypeDescription
IsSuccessboolean

Validation and Enrichment is a success.

True- If there are no issue logs created for validation error as part of the execution.

False- If there are issue logs create for validation error as part of the execution.

IssueLogsList<Apttus_Config2__CustomerPOIssueLog__c>List of Issue logs generated for a given PO Item / PO while running the validation rule and enrichment rule against it.
ModifiedSObjectsMap<ID, SObject>Objects Modified as Part of Enrichment rule. Key-Value Pair where Key is ID of modified record and Value is record SObject with modified Value.
NumErrorsByObjectMap<ID, Integer>The number of Validation/Enrichment Error for each record. Key is record Id and value is the number of Error Issue logs created for that record.
NumWarningsByObjectMap<ID, Integer>The number of Validation/Enrichment Warning for each record. Key is record Id and value is the number of Warning Issue logs created for that record.

Code Sample


The following enables you to validate and enrich the data in the customer purchase order.

Id customerPOId = 'a6PW00000008wGY';
Apttus_Config2.CPQStruct.DataValidateEnrichResult response = Apttus_Config2.DataValidationService.validateAndEnrichSO(customerPOId);
system.debug('IsSuccess=>'+response.IsSuccess);
system.debug('IssueLogs=>'+response.IssueLogs);
system.debug('NumErrorsByObject=>'+response.NumErrorsByObject);
system.debug('NumWarningsByObject=>'+response.NumWarningsByObject);
CODE