SDK Version: 9.56.26056.3
Generated from: sdk/9.56
by-domain/.by-request-type/.by-handler/.Neighboring Triggers section.The following extension points are new in 9.56:
Cart & Checkout:
SetCartLockRequestCreateAndSaveAsynchronousPaymentToCartRequestCreateAsynchronousPaymentServiceRequestGetSalesTransactionCheckoutResultByTransactionIdRequestCheckSalesTransactionExistenceDataRequestSetCartLockRequestHandlerCreateAsynchronousPaymentServiceRequestHandlerCreateAndSaveAsynchronousPaymentToCartRequestHandlerPayment Notifications:
PostPaymentNotificationRequestUpdatePaymentNotificationProcessingStatusDataRequestUpdatePaymentNotificationProcessingStatusServiceRequestPostPaymentNotificationHandlerDiagnostics & Error Logging:
GetCheckoutErrorLogDataRequestInsertCheckoutErrorLogDataRequestCheckoutErrorLogSqlServerDataServiceSystem & Infrastructure:
GetEmailTemplateByEventNotificationTypeDataRequestGetNonDefaultLanguageIdDataRequestPurgeTerminalStateDataRequestSingleAsyncRequestHandler<TRequest> over the obsolete synchronous base classes.using System.Threading.Tasks;
using Microsoft.Dynamics.Commerce.Runtime;
using Microsoft.Dynamics.Commerce.Runtime.Messages;
using Microsoft.Dynamics.Commerce.Runtime.Services.Messages;
namespace Contoso.Commerce.Runtime.Extensions;
public sealed class SaveCustomerRequestHandler
: SingleAsyncRequestHandler<SaveCustomerServiceRequest>
{
protected override async Task<Response> Process(
SaveCustomerServiceRequest request)
{
ThrowIf.Null(request, nameof(request));
var customer = request.CustomerToSave;
// 1. Validate or enrich the request.
// 2. Call other CRT requests through request.RequestContext if needed.
// 3. Return the response expected by this request.
throw new System.NotImplementedException();
}
}
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Dynamics.Commerce.Runtime;
using Microsoft.Dynamics.Commerce.Runtime.Messages;
using Microsoft.Dynamics.Commerce.Runtime.Services.Messages;
namespace Contoso.Commerce.Runtime.Extensions;
public sealed class SaveCustomerTrigger : IRequestTriggerAsync
{
public IEnumerable<Type> SupportedRequestTypes =>
new[] { typeof(SaveCustomerServiceRequest) };
public Task OnExecuting(Request request)
{
var saveRequest = (SaveCustomerServiceRequest)request;
// Pre-processing: validate, enrich, reject, log.
return Task.CompletedTask;
}
public Task OnExecuted(Request request, Response response)
{
var saveRequest = (SaveCustomerServiceRequest)request;
// Cast response to the concrete response type if you need it.
// var typedResponse = (SaveCustomerServiceResponse)response;
// Post-processing: inspect result, add telemetry, react to output.
return Task.CompletedTask;
}
}
| Item | Count |
|---|---|
| Assemblies | 136 |
| Handlers | 626 |
| Triggers | 80 |
| Request Types | 1664 |