Sales Operations Gherkin / BDD

Objective

Express the complete field sales journey (Pre-Journey -> In Store -> Post-Journey) in a clear, executable format so that all stakeholders understand the expected end-to-end behavior, data consistency, and integration between modules.

Business Rule

A Sales Representative must be able to complete a full field sales journey: synchronize data, visit outlet, create Pre Order, collect payment, move stock, print documents, and finalize synchronization with consistent records in the back office.

Feature

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Feature: End-to-End Field Sales Journey

  As a Sales Representative
  I want to complete a full field sales journey
  So that all sales, payment, stock, and document data are accurately recorded and synchronized to back office

  Background:
    Given salesman is logged in on mobile app
    And master data (outlet, product, stock) is available

  Scenario: Complete full field sales journey successfully
    When user performs initial synchronization
    And starts a visit to outlet "OUTLET-DEMO-01"
    And creates a Pre Order with product "PROD-001" quantity 10
    And performs payment collection of Rp 5000000 using CASH
    And performs stock movement from mobile warehouse to outlet
    And prints transaction documents
    And ends the visit
    And performs final synchronization
    Then all data (Pre Order, Payment, Stock, Visit) should be successfully synced to back office
    And records in back office report are consistent

  Scenario Outline: Pre Order creation with different payment methods
    When user creates Pre Order with payment method "<payment_method>"
    Then Pre Order should be created with status "SUBMITTED"
    And credit limit should be updated if payment method is CREDIT

    Examples:
      | payment_method |
      | CASH           |
      | CREDIT         |

  Scenario: Synchronization fails when offline
    Given device is offline
    When user tries to perform final synchronization
    Then system should queue the data for later sync
    And show "Data will be synced when online" message

Supporting Validation

  • Verify data consistency between mobile and back office after synchronization.
  • Check Pre Order, Payment, Stock movement, and Visit records.
  • Validate pricing, credit limit deduction, and document printing.
  • Test boundary cases: offline mode, insufficient stock, and credit limit.

Back to Project