Openbravo Issue Tracking System - Retail Modules
View Issue Details
0051195Retail ModulesWeb POSpublic2022-12-19 12:362024-01-09 16:32
gonzalo_fernandez 
gonzalo_fernandez 
normalminorN/A
newopen 
5
 
 
No
0051195: Send email on e-commerce order
This project has the goal to automate the email sending of a Click&Collect sales order. That consists of sending the corresponding order and the sales invoice automatically to the customer without human interaction, in order to avoid mistakes.
The newly added properties are the following:
  - email: true / false (whether we should send an email or not)
  - emailDocument: "Order" / "Invoice" / "Both" (documents to send in the email)
  - emailAddress: "targetemail@sample.foo" (the target email address)

When processing an order with the External Order Loader, if the request has the previously mentioned properties, an email with the selected reports will be sent to the desired email address. An example of an order to process with The White Valley as organization is the following:

{
    "messageId": "test1",
    "posTerminal": "VBS-1",
    "channel": "External",
    "data": [{
        "currency": "EUR",
        "step": "all",
        "grossAmount": 24.9,
        "netAmount": 20.58,
        "businessPartner": "VBS/C0001",
        "lines": [{
            "product": "WVG/S0011",
            "qty": 1,
            "grossAmount": 24.9,
            "netAmount": 20.58,
            "taxAmount": 4.32,
            "taxLines": {
                "Entregas IVA 21%": {
                    "rate": 21,
                    "netAmount": 20.58,
                    "taxAmount": 4.32
                }
            }
        }],
        "payments": [{
            "paidAmount": 24.9,
            "date": "2015-11-16T08:48:51.524Z",
            "kind": "OBPOS_payment.cash",
            "rate": "1",
            "isocode": "EUR"
        }],
        "taxes": {
            "Entregas IVA 21%": {
                "rate": 21,
                "netAmount": 20.58,
                "taxAmount": 4.32
            }
        },
        "email": true,
        "emailDocument": "Both",
        "emailAddress": "targetemail@sample.foo"
    }]
}

You should know that, before testing this, you should have properly configured your email client and set The White Valley Group Admin as your default role.
No tags attached.
Issue History
2022-12-19 12:36gonzalo_fernandezNew Issue
2022-12-19 12:36gonzalo_fernandezAssigned To => gonzalo_fernandez
2022-12-19 12:40hgbotNote Added: 0144815
2022-12-19 12:42hgbotNote Added: 0144816
2023-06-27 09:54hgbotNote Added: 0151666
2023-06-29 16:00hgbotNote Added: 0151871
2024-01-09 16:32AugustoMauchProjectContribution Requests => Retail Modules
2024-01-09 16:32AugustoMauchTriggers an Emergency Pack => No
2024-01-09 16:32AugustoMauchCategoryCore Contributions => Web POS

Notes
(0144815)
hgbot   
2022-12-19 12:40   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/794 [^]
(0144816)
hgbot   
2022-12-19 12:42   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.orderloader.email/-/merge_requests/1 [^]
(0151666)
hgbot   
2023-06-27 09:54   
Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.orderloader.email/-/merge_requests/1 [^]
(0151871)
hgbot   
2023-06-29 16:00   
Merge request closed: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/794 [^]