Sana Assistant (online)
Table of Contents

CheckoutProcesses Enumeration

The CheckoutProcesses enumeration defines the checkout processes to which validation rules can be applied. It is a flags enumeration, which means multiple values can be combined using bitwise operations.

CheckoutProcesses enumeration

Values

None

None = 0

This value means that when the validation rule fails only the validation message is shown and the user is not blocked from checkout process and may still proceed to order placement or quote creation.

Order

Order = 1 << 0

Specifies that the validation rule applies to the order checkout process. Use this value when the validation should only be performed during order creation.

Quote

Quote = 1 << 1

Specifies that the validation rule applies to the quote checkout process. Use this value when the validation should only be performed during quote creation.

Punchout

Punchout = 1 << 2

Specifies that the validation rule applies to the punchout checkout process. Use this value when the validation should only be performed during punchout integration workflows.

Usage

The enumeration is marked with the [Flags] attribute, allowing you to combine multiple values using the bitwise OR operator (|). This enables you to specify that a validation rule applies to multiple checkout processes.

Example Usage

Here are examples of how to use the CheckoutProcesses enumeration:

// Rule blocks the user from both placing the order and requesting a quote
public override CheckoutProcesses ProcessesToBlock =>
    CheckoutProcesses.Order | CheckoutProcesses.Quote;

// Rule blocks the user from placing the order
public override CheckoutProcesses ProcessesToBlock =>
    CheckoutProcesses.Order;

// Rule blocks the user from requesting a quote
public override CheckoutProcesses ProcessesToBlock =>
    CheckoutProcesses.Quote;

// Rule blocks the user from completing a punchout
public override CheckoutProcesses ProcessesToBlock =>
    CheckoutProcesses.Punchout;

// Rule does not block the user from proceeding with the checkout process
public override CheckoutProcesses ProcessesToBlock =>
    CheckoutProcesses.None;