«

POST /api/M26/claims -- Tạo khiếu nại trên đơn

body: { "name": "string", "description": "string", "relatedOrder": "string", "reasonCode": "string", "solutionCode": "string", "suggest": "string", "ticketType": "string", "claimProductCommands": [ { "relatedProduct": "string", "notReceived": 0, "numbersFaultyProduct": 0 } ], "imageIds": [ "3fa85f64-5717-4562-b3fc-2c963f66afa6" ] }

    • Given Tồn tại các lý do khiếu nại cho khách hàng "pamiuoi" có thông tin
      Lý doLoại
      exchange_or_returnĐổi, trả hàngORDER
      faulty_productGiao hàng sai, lỗi, hỏngORDER_PRODUCT
      long_time_no_receivedLâu chưa nhận hàngORDER
      not_receivedGiao thiếu hàngORDER_PRODUCT
      otherLý do khácORDER
    • And Tồn tại các phương án xử lý cho khách hàng "pamiuoi" có thông tin
      Phương án
      compensateBồi thường
      returnĐổi trả
      redeliveryGiao bù
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại khi không gửi lên header x-tenant

    • Given Có token của tài khoản "pamiuoi"
    • And Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • When Gửi request "POST" đến "/M26/claims" với body
      {
          "ticketType": "order",
          "name": "Khiếu nại cho đơn ${DH_01}",
          "relatedOrder": "${DH_01}",
          "reasonCode": "${long_time_no_received}",
          "solutionCode": "${redelivery}"
       }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
      "title": "Bad Request",
      "detail": "Required header 'X-Tenant' is not present.",
      }
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại khi gửi lên header x-tenant không hợp lệ

    • Given Có token của tài khoản "pamiuoi"
    • And Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • When Request có header là
      X-Tenant<tenant>
    • And Gửi request "POST" đến "/M26/claims" với body
       {
          "ticketType": "order",
          "name": "Khiếu nại cho đơn ${DH_01}",
          "relatedOrder": "${DH_01}",
          "reasonCode": "${long_time_no_received}",
          "solutionCode": "${redelivery}"
       }
    • Then Trả về status code 404
    • And Response có body thỏa mãn giá trị như sau
      {
        "title": "not_found_connection_config"
      }

    Examples:

    tenant
    abc
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại khi không gửi lên token

    • Given Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
      {
         "ticketType": "order",
         "name": "Khiếu nại cho đơn ${DH_01}",
         "relatedOrder": "${DH_01}",
         "reasonCode": "${long_time_no_received}",
         "solutionCode": "${redelivery}"
      }
    • Then Trả về status code 401
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại khi gửi lên token không hợp lệ

    • Given Token đã hết hạn
    • And Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
      {
         "ticketType": "order",
         "name": "Khiếu nại cho đơn ${DH_01}",
         "relatedOrder": "${DH_01}",
         "reasonCode": "${long_time_no_received}",
         "solutionCode": "${redelivery}"
      }
    • Then Trả về status code 401
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại khi gửi lên đơn hàng không tồn tại

    • Given Có token của tài khoản "pamiuoi"
    • And Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
      {
         "ticketType": "order",
         "name": "Khiếu nại cho đơn ${DH_01}",
         "relatedOrder": "not_exist",
         "reasonCode": "${long_time_no_received}",
         "solutionCode": "${redelivery}"
      }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
         "title": "order_not_found"
      }
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại cho đơn hàng có trạng thái Chờ đặt cọc, hủy bỏ

    • Given Có token của tài khoản "pamiuoi"
    • And Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01<status>
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
      {
         "ticketType": "order",
         "name": "Khiếu nại cho đơn ${DH_01}",
         "relatedOrder": "${DH_01}",
         "reasonCode": "${long_time_no_received}",
         "solutionCode": "${redelivery}"
      }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
         "title": "order_not_found"
      }

    Examples:

    status
    Chờ đặt cọc
    Hủy bỏ
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại với lý do khác khi không gửi lên mô tả và phương án xử lý

    • Given Có token của tài khoản "pamiuoi"
    • And Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
       {
          "ticketType": "order",
          "relatedOrder": "${DH_01}",
          "reasonCode": "${other}",
          <bodyJson>
          "name": "Khiếu nại cho đơn ${DH_01}"
      }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
         "title": "<title>"
      }

    Examples:

    title bodyJson
    solution_must_not_be_null "solutionCode": "","description": "thích",
    solution_must_not_be_null "description": "thích",
    solution_must_not_be_null "solutionCode": null,"description": "thích",
    description_must_not_be_null "solutionCode":"${redelivery}",
    description_must_not_be_null "solutionCode":"${redelivery}","description": null,
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại Lâu chưa nhận hàng, giao thiếu hàng, đổi trả khi không truyền lên các thông tin phương án đề xuất

    • Given Có token của tài khoản "pamiuoi"
    • And Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
       {
          "ticketType": "order",
          "name": "Khiếu nại cho đơn ${DH_01}",
          "relatedOrder": "${DH_01}",
          "reasonCode": "${<reasonCode>}"
          <jsonBody>
      }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
         "title": "<title>"
      }

    Examples:

    reasonCode jsonBody title
    long_time_no_received , "solutionCode": "" solution_must_not_be_null
    long_time_no_received , "solutionCode": null solution_must_not_be_null
    long_time_no_received solution_must_not_be_null
    exchange_or_return , "solutionCode": "" solution_must_not_be_null
    exchange_or_return , "solutionCode": null solution_must_not_be_null
    exchange_or_return solution_must_not_be_null
    not_received , "solutionCode": "" solution_must_not_be_null
    not_received , "solutionCode": null solution_must_not_be_null
    not_received solution_must_not_be_null
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại giao hàng sai lỗi hỏng khi không truyền lên các thông tin phương án đề xuất, ảnh

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSize
      merchant_01product_01skuId_01skusId01331
      merchant_01product_02skuId_02skusId02331
    • And Từ sản phẩm trong giỏ, tài khoản "pamiuoi" đã tạo đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • And Đơn hàng "DH_01" có thông tin mã sản phẩm
      Mã sản phẩmskuId
      DH_0101skuId_01
      DH_0102skuId_02
    • And Khách hàng "pamiuoi" có ảnh khiếu nại "imageError"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
       {
          "ticketType": "order",
          "name": "Khiếu nại cho đơn ${DH_01}",
          "relatedOrder": "${DH_01}",
          "reasonCode": "${faulty_product}",
          "claimProductCommands": [{"relatedProduct": "${DH_0101}","notReceived": 0,"numbersFaultyProduct": 1}],
          <jsonBody>
        }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
         "title": "<title>"
      }

    Examples:

    jsonBody title
    "imageIds": ["${imageError}"] solution_must_not_be_null
    "solutionCode": "","imageIds": ["${imageError}"] solution_must_not_be_null
    "solutionCode": null,"imageIds": ["${imageError}"] solution_must_not_be_null
    "solutionCode": "${redelivery}","imageIds": null files_must_be_uploaded
    "solutionCode": "${redelivery}" files_must_be_uploaded
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại với phương án xử lý là bồi thường nếu không gửi lên số tiền bồi thường, hoặc gửi lên

    số tiền bồi thường không hợp lệ

    • Given Có token của tài khoản "pamiuoi"
    • And Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
       {
          "ticketType": "order",
          "name": "Khiếu nại cho đơn ${DH_01}",
          "relatedOrder": "${DH_01}",
          <jsonBody>
          "reasonCode": "${long_time_no_received}",
          "solutionCode": "${compensate}"
      }
    • Then Trả về status code <status>
    • And Response có body thỏa mãn giá trị như sau
      {
         "title": "<title>"
      }

    Examples:

    jsonBody title status
    suggest_must_not_be_null 400
    "suggest" : null , suggest_must_not_be_null 400
    "suggest" : "abc", Internal Server Error 500
    "suggest" : -1, suggest_not_allow 400
  • Tags: @AUTOMATED, @TNK-9629

    Có thể tạo khiếu nại giao hàng sai, lỗi, hỏng khi gửi lên thông tin hợp lệ

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSize
      merchant_01product_01skuId_01skusId01331
      merchant_01product_02skuId_02skusId02331
    • And Từ sản phẩm trong giỏ, tài khoản "pamiuoi" đã tạo đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01<status>
    • And Đơn hàng "DH_01" có thông tin mã sản phẩm
      Mã sản phẩmskuId
      DH_0101skuId_01
      DH_0102skuId_02
    • And Khách hàng "pamiuoi" có ảnh khiếu nại "imageError"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
       {
          "ticketType": "order",
          "name": "Khiếu nại đơn ${DH_01}",
          "description": <description>,
          "relatedOrder": "${DH_01}",
          "reasonCode": "faulty_product",
          "solutionCode": "<solutionCode>",
          <suggest>
          "claimProductCommands": <claimProductCommands> ,
          "imageIds": ["${imageError}"]
        }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "description": <description>,
        "relatedOrder": "${DH_01}",
        "reasonCode": "faulty_product",
        "notReceived": null,
        "solutionCode": "<solutionCode>",
        "suggest": <amountSuggest>,
        "state": "NEW",
        "numbersFaultyProduct": <numbersFaulty>,
        "claimProductViews": <claimProductCommands>
      }

    Examples:

    status description solutionCode suggest amountSuggest numbersFaulty claimProductCommands
    Chờ xử lý "thích" compensate "suggest": 1, 1 5 [{"relatedProduct": "${DH_0101}","notReceived": null,"numbersFaultyProduct": 3}, {"relatedProduct": "${DH_0102}","notReceived": null,"numbersFaultyProduct": 2}]
    Chờ giao hàng "" return null 1 [{"relatedProduct": "${DH_0101}","notReceived": null,"numbersFaultyProduct": 1}]
    Vận chuyển quốc tế null redelivery null 1 [{"relatedProduct": "${DH_0101}","notReceived": null,"numbersFaultyProduct": 1}]
    Đang giao hàng "" compensate "suggest": 0.5, 0.5 3 [{"relatedProduct": "${DH_0101}","notReceived": null,"numbersFaultyProduct": 1}, {"relatedProduct": "${DH_0102}","notReceived": null,"numbersFaultyProduct": 2}]
    Đã nhận hàng "" redelivery null 1 [{"relatedProduct": "${DH_0101}","notReceived": null,"numbersFaultyProduct": 1}]
    Đã hoàn tiền "" redelivery null 1 [{"relatedProduct": "${DH_0101}","notReceived": null,"numbersFaultyProduct": 1}]
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại giao hàng sai, lỗi, hỏng khi gửi lên số lượng sai lỗi cho sản phẩm không hợp lệ

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantity
      merchant_01product_01skuId_01skusId0133
      merchant_01product_02skuId_02skusId0233
    • And Từ sản phẩm trong giỏ, tài khoản "pamiuoi" đã tạo đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • And Đơn hàng "DH_01" có thông tin mã sản phẩm
      Mã sản phẩmskuId
      DH_0101skuId_01
      DH_0102skuId_02
    • And Khách hàng "pamiuoi" có ảnh khiếu nại "imageError"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
       {
          "ticketType": "order",
          "name": "Khiếu nại",
          "description": "thích",
          "relatedOrder": "${DH_01}",
          "reasonCode": "faulty_product",
          "solutionCode": "${redelivery}" ,
          "claimProductCommands": <claimProductCommands>,
          "imageIds": ["${imageError}"]
        }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
          "title": "<title>",
      }

    Examples:

    claimProductCommands title
    [{"relatedProduct": "${DH_0101}","notReceived": null,"numbersFaultyProduct": -1}] exceed_allowed_quantity
    [{"relatedProduct": "${DH_0101}","notReceived": null,"numbersFaultyProduct": 0}] exceed_allowed_quantity
    [{"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": 1}] not_received_must_be_null
    [{"relatedProduct": "${DH_0101}","notReceived": null,"numbersFaultyProduct": 4}, {"relatedProduct": "${DH_0102}","notReceived": null,"numbersFaultyProduct": 2}] invalid_numbers_faulty_product_quantity
  • Tags: @AUTOMATED, @TNK-9629

    Có thể tạo khiếu nại giao hàng thiếu khi gửi lên thông tin hợp lệ

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSize
      merchant_01product_01skuId_01skusId01331
      merchant_01product_02skuId_02skusId02331
    • And Từ sản phẩm trong giỏ, tài khoản "pamiuoi" đã tạo đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01<status>
    • And Đơn hàng "DH_01" có thông tin mã sản phẩm
      Mã sản phẩmskuId
      DH_0101skuId_01
      DH_0102skuId_02
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
        {
          "ticketType": "order",
          "name": "Khiếu nại đơn ${DH_01}",
          "description": <description>,
          "relatedOrder": "${DH_01}",
          "reasonCode": "not_received",
          "solutionCode": "<solutionCode>",
          <suggest>
          "claimProductCommands": <claimProductCommands>
        }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
       {
        "description": <description>,
        "relatedOrder": "${DH_01}",
        "reasonCode": "not_received",
        "notReceived": <notReceived>,
        "solutionCode": "<solutionCode>",
        "suggest": <amountSuggest>,
        "state": "NEW",
        "numbersFaultyProduct": null,
        "claimProductViews": <claimProductCommands>
      }

    Examples:

    status description solutionCode suggest amountSuggest notReceived claimProductCommands
    Chờ xử lý "thích" compensate "suggest": 1, 1 3 [{"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": null}, {"relatedProduct": "${DH_0102}","notReceived": 2,"numbersFaultyProduct": null}]
    Chờ giao hàng "" return null 1 [{"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": null}]
    Vận chuyển quốc tế null redelivery null 1 [{"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": null}]
    Đang giao hàng "" compensate "suggest": 0.5, 0.5 4 [{"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": null}, {"relatedProduct": "${DH_0102}","notReceived": 3,"numbersFaultyProduct": null}]
    Đã nhận hàng "" redelivery null 1 [{"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": null}]
    Đã hoàn tiền "" redelivery null 1 [{"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": null}]
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại giao hàng thiếu nếu gửi lên số lượng thiếu của sản phẩm không hợp lệ

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSize
      merchant_01product_01skuId_01skusId01331
      merchant_01product_02skuId_02skusId02331
    • And Từ sản phẩm trong giỏ, tài khoản "pamiuoi" đã tạo đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • And Đơn hàng "DH_01" có thông tin mã sản phẩm
      Mã sản phẩmskuId
      DH_0101skuId_01
      DH_0102skuId_02
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
        {
          "ticketType": "order",
          "name": "Khiếu nại đơn ${DH_01}",
          "relatedOrder": "${DH_01}",
          "reasonCode": "not_received",
          "solutionCode": "${redelivery}",
          "claimProductCommands": <claimProductCommands>
        }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
       {
           "title": "<title>",
       }

    Examples:

    claimProductCommands title
    [{"relatedProduct": "${DH_0101}","notReceived": -1,"numbersFaultyProduct": null}] exceed_allowed_quantity
    [{"relatedProduct": "${DH_0101}","notReceived": 0,"numbersFaultyProduct": null}] exceed_allowed_quantity
    [{"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": 1}] numbers_faulty_product_must_be_null
    [{"relatedProduct": "${DH_0101}","notReceived": 4,"numbersFaultyProduct": null}, {"relatedProduct": "${DH_0102}","notReceived": 1,"numbersFaultyProduct": null}] invalid_not_received_quantity
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại giao hàng thiếu/ giao hàng sai, lỗi, hỏng nếu không gửi lên thông tin sản phẩm

    • Given Có token của tài khoản "pamiuoi"
    • And Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • And Khách hàng "pamiuoi" có ảnh khiếu nại "imageError"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
       {
          "ticketType": "order",
          "name": "Khiếu nại",
          "description": "thích",
          "relatedOrder": "${DH_01}",
          "reasonCode": "<reasonCode>",
          "solutionCode": "${redelivery}",
          <claimProductCommands>
          "imageIds": ["${imageError}"]
        }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
        {
            "title": "claim_product_must_not_be_null",
        }

    Examples:

    reasonCode claimProductCommands
    not_received "claimProductCommands": [],
    not_received "claimProductCommands": null,
    not_received
    faulty_product "claimProductCommands": [],
    faulty_product "claimProductCommands": null,
    faulty_product
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại khi gửi lên sản phẩm không tồn tại trên hệ thống hoặc sản phẩm không thuộc đơn khiếu nại

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSize
      merchant_01product_01skuId_01skusId01331
      merchant_01product_02skuId_02skusId02331
    • And Từ sản phẩm trong giỏ, tài khoản "pamiuoi" đã tạo đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • And Đơn hàng "DH_01" có thông tin mã sản phẩm
      Mã sản phẩmskuId
      DH_0101skuId_01
      DH_0102skuId_02
    • And Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_02Chờ xử lý
    • And Khách hàng "pamiuoi" có ảnh khiếu nại "imageError"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
         {
          "ticketType": "order",
          "name": "Khiếu nại",
          "description": "thích",
          "relatedOrder": "<relatedOrder>",
          "reasonCode": "<reasonCode>",
          "solutionCode": "${redelivery}",
          "claimProductCommands": <claimProductCommands>,
          "imageIds": ["${imageError}"]
        }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
       "title": "product_not_found"
      }

    Examples:

    relatedOrder reasonCode claimProductCommands
    ${DH_01} not_received [{"relatedProduct": "not_exist","notReceived": 1,"numbersFaultyProduct": null}, {"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": null}]
    ${DH_02} faulty_product [{"relatedProduct": "${DH_0101}","notReceived": null,"numbersFaultyProduct": 1}]
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại nếu gửi lên lý do, phương án xử lý không tồn tại

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSize
      merchant_01product_01skuId_01skusId01331
      merchant_01product_02skuId_02skusId02331
    • And Từ sản phẩm trong giỏ, tài khoản "pamiuoi" đã tạo đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • And Đơn hàng "DH_01" có thông tin mã sản phẩm
      Mã sản phẩmskuId
      DH_0101skuId_01
      DH_0102skuId_02
    • And Khách hàng "pamiuoi" có ảnh khiếu nại "imageError"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
       {
          "ticketType": "order",
          "name": "Khiếu nại",
          "description": "thích",
          "relatedOrder": "${DH_01}",
          "reasonCode": "<reasonCode>",
          "solutionCode": "<solutionCode>",
          "claimProductCommands": <claimProductCommands>,
          "imageIds": ["${imageError}"]
        }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
      "title": "<title>"
      }

    Examples:

    reasonCode claimProductCommands solutionCode title
    not_received [{"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": null}] not_exist solution_not_found
    exchange_or_return null not_exist solution_not_found
    long_time_no_received null not_exist solution_not_found
    faulty_product [{"relatedProduct": "${DH_0101}","notReceived": null,"numbersFaultyProduct": 1}] not_exist solution_not_found
    other null not_exist solution_not_found
    not_exist null redelivery reason_not_found
  • Tags: @AUTOMATED, @TNK-9629

    Có thể tạo khiếu nại với lý do Lâu chưa nhận hàng, Đổi trả hàng, Lý do khác khi nhập các thông tin hợp lệ

    • Given Có token của tài khoản "pamiuoi"
    • And Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • And Khách hàng "pamiuoi" có ảnh khiếu nại "imageError"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
       {
          "ticketType": "order",
          "name": "Khiếu nại",
          "description": <description>,
          "relatedOrder": "${DH_01}",
          "reasonCode": "<reasonCode>",
          "solutionCode": "<solutionCode>",
          "imageIds": <imageId>,
          <suggest>
          "claimProductCommands": <claimProductCommands>
        }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
      {
       "description": <description>,
       "relatedOrder": "${DH_01}",
       "reasonCode": "<reasonCode>",
       "notReceived": null,
       "solutionCode": "<solutionCode>",
       "suggest": <amountSuggest>,
       "state": "NEW",
       "numbersFaultyProduct": null,
       "claimProductViews": <responseProduct>
      }

    Examples:

    description reasonCode solutionCode suggest amountSuggest claimProductCommands responseProduct imageId
    "thích" other compensate "suggest": 1, 1 null [] null
    null long_time_no_received return null [] [] ["${imageError}"]
    "thích" exchange_or_return redelivery null null [] null
  • Tags: @AUTOMATED, @TNK-9629

    Không thể tạo khiếu nại với lý do Lâu chưa nhận hàng, Đổi trả hàng, Lý do khác khi truyền lên sản phẩm khiếu nại

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSize
      merchant_01product_01skuId_01skusId01331
      merchant_01product_02skuId_02skusId02331
    • And Từ sản phẩm trong giỏ, tài khoản "pamiuoi" đã tạo đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • And Đơn hàng "DH_01" có thông tin mã sản phẩm
      Mã sản phẩmskuId
      DH_0101skuId_01
      DH_0102skuId_02
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
        {
          "ticketType": "order",
          "name": "Khiếu nại đơn ${DH_01}",
          "description": "thích thì tạo",
          "relatedOrder": "${DH_01}",
          "reasonCode": "<reasonCode>",
          "solutionCode": "redelivery",
          "claimProductCommands": [{"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": null}]
        }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
      "title": "<title>"
      }

    Examples:

    reasonCode title
    ${other} reason_not_found
    ${long_time_no_received} reason_not_found
    ${exchange_or_return} reason_not_found
  • Tags: @AUTOMATED, @TNK-9629

    Một đơn hàng có thể tạo nhiều khiếu nại

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSize
      merchant_01product_01skuId_01skusId01331
      merchant_01product_02skuId_02skusId02331
    • And Từ sản phẩm trong giỏ, tài khoản "pamiuoi" đã tạo đơn hàng với thông tin
      Mã đơnTrạng thái
      DH_01Chờ xử lý
    • And Khách hàng "pamiuoi" đã tạo khiếu nại với thông tin
      Mã khiếu nạiMã đơnLý do khiếu nạiLoại khiếu nạiPhương án xử lýSố tiền bồi thường
      KN001DH_01Lâu chưa nhận hàngORDERBồi thường1
    • And Đơn hàng "DH_01" có thông tin mã sản phẩm
      Mã sản phẩmskuId
      DH_0101skuId_01
      DH_0102skuId_02
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/claims" với body
        {
          "ticketType": "order",
          "name": "Khiếu nại đơn ${DH_01}",
          "description": "thích thì tạo",
          "relatedOrder": "${DH_01}",
          "reasonCode": "not_received",
          "solutionCode": "redelivery",
          "claimProductCommands": [{"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": null}]
        }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
       {
        "description": "thích thì tạo",
        "relatedOrder": "${DH_01}",
        "reasonCode": "not_received",
        "notReceived": 1,
        "solutionCode": "redelivery",
        "suggest": null,
        "state": "NEW",
        "numbersFaultyProduct": null,
        "claimProductViews": [{"relatedProduct": "${DH_0101}","notReceived": 1,"numbersFaultyProduct": null}]
      }