Skip to content

Guides

This chapter describes example procedures for working with the Document Phase Management extension. The examples use the phases shown on the Sales Document Phases page in the Document Phases chapter.

Setting Up a Flow for B2B Sales Orders

This guide describes how to set up a flow in which a B2B sales order waits for a bank payment. If the payment does not arrive, the customer receives a reminder and later the order is cancelled. The procedure is intended for the user who sets up the phases.

Step 1: Set up the default phase.

  1. Open the Sales Document Phases page and choose New.
  2. Document Type: Sales Order, Code: 01_NEW, Description: e.g. Default phase for a new Sales Order.
  3. Enable Default. Every new sales order gets this phase.

Step 2: Set up the phase for a received B2B order.

  1. Code: B2B_01, Public Description: Order received.
  2. Previous Phase Filter: 01_NEW.
  3. Reason Code Filter: B2B. Only orders with this reason code move into the phase; orders with the reason code B2C can continue to their own phase (e.g. B2C_01).
  4. Assign the actions, e.g. SendEmailNotification to confirm the order to the customer, and fill in the E-mail Notification Layout and Subject.

Step 3: Set up the waiting for the payment.

  1. Code: B2B_02_01_BANK, Public Description: Waiting for payment.
  2. Previous Phase Filter: B2B_01.
  3. Payment Method Code Filter: the bank payment methods, e.g. ACCOUNT|BANK.

Step 4: Set up the reminder and the cancellation.

  1. Code: B2B_02_02_NOTICE, Previous Phase Filter: B2B_02_01_BANK, Interval (Days): 5. Assign the SendEmailNotification action with the reminder layout.
  2. Code: B2B_02_03_CANCELED, Previous Phase Filter: B2B_02_02_NOTICE, Interval (Days): 2. Assign the actions for the cancellation, e.g. DeleteReservations.

Step 5: Set up the phase for a paid order.

  1. Code: B2B_03_PAYED, Public Description: Payment received.
  2. Previous Phase Filter: the waiting phases, e.g. B2B_02_01_BANK|B2B_02_02_NOTICE.
  3. Payment Confirmed: Payment Confirmed. The order moves into the phase as soon as the Paid field on the order is enabled.
  4. Assign the follow-up actions, e.g. ReleaseSalesDocument and AutomaticReservation.

Step 6: Schedule the Phase Management report in the job queue (see Setup).

Note

The codes in this example are chosen so that their alphabetical order matches the order of the process. If more phases meet the conditions at the same time, the one with the alphabetically first code wins.

Cancelling an Order Manually

This guide describes how a user cancels an order using a manual phase.

  1. Open the sales order.
  2. Choose the Select Phase action.
  3. Select the phase for cancelled orders, e.g. STORNO. Only the phases marked as Manual Phase are offered.
  4. The actions assigned to the phase run and the change is recorded in the Phase Log.

Resolving a Failed Phase Change

This guide describes how to deal with a document whose phase change ended with an error.

  1. In the Sales Order Processor role center, check the Phase Validation Errors cues. Choose the cue to open the list of documents with an error.
  2. Open the Sales Document Phases Log and select the entry with the Phase State Validation Error.
  3. Open the Action Log and read the Error Text of the failed action (e.g. There is nothing to release for the document…).
  4. Remove the cause of the error on the document or in the setup.
  5. In the Action Log, select the failed action and choose Actions > Restart and Continue. The failed action runs again and the remaining actions of the phase continue.
  6. Check that the Phase State of the document has changed to OK – restarted.

Note

Until a user restarts the actions, the document stays in the Validation Error state.