> For the complete documentation index, see [llms.txt](https://docs.cleartax.in/product-help-and-support/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cleartax.in/product-help-and-support/for-large-businesses/cleartax-e-invoicing-malaysia/b2b-sales-documents/generate-e-invoice-s.md).

# Generate e-invoice(s)

* For generating e-invoices, select the documents that you want to generate e-invoices on the “Sales dashboard” page.
* You can select a document row individually and click on the “Generate e-inv” button to generate an e-invoice.
* Alternatively, you can also bulk select the document rows (adjust the filter options for more refined bulk selection) and click on the “Generate e-inv” button to generate e-invoices in bulk.<br>

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcBZu-oj6rwNcnoVYCLKe5-0H2C_kANwLs52yRJCWuEzZ0mZ8GQzEYbnZp7eKLg-Tl76lAMBsAYL7nRJAff-0OburAUhqfzVZrL-x-pIWRXR_rlv9gKvQ__lX5s62j4mui_e0ez4L36AOen0kEsvFT7zvg?key=PCqKIH22__dEO6431-EgcQ)

* Once the “Generate e-inv” action is completed, you will see the status of the documents change to reflect the e-invoicing status.
* There can be 4 possible states for these documents

1. Failed – Document is successfully uploaded, initiated a submission to LHDN but failed ClearTax validations or network failure issues on LHDN APIs.
2. Submitted – Document submission initiated but is in a queue to be processed.
3. Valid – Status of a successful invoice validation
4. Invalid – Submitted document failed validations at LHDN

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdlTtdx303Yx45--vtDs2BxjeoPmg9ew4e_5u-d_Ya9rRbibA4kUNR553NBwmQDYUVOcce8RtYe_Z-P0KWp8YjZ_Bg6jFMcI72tXAfL6ZJa8CvNmylsIvqPlNSrGyr7cpYuQOIxmX7htNAYWJwcJfi4rWI?key=PCqKIH22__dEO6431-EgcQ)

* You can further click on the hyperlinked “Document number” to open the document details.
* In case of a “Failed” or an “Invalid” document, you can also see the error message and correct the error using the “Edit” button.
* Once the error is corrected, you can reinitiate the e-invoice generation process via the same page.<br>

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXemSfebylPCJjOd5DOWrhN4LUwMA2APD6eCQRZd2OVEwWjzDXsJix6YJnc0QVUcEfMUZU_hTkdnajViGtLetbTdwW7ngjFVidFSkslqytXFin6VXUD61exPWjZnt9G7P5keMLoZ_3PN-oOEdS207hhqiTHR?key=PCqKIH22__dEO6431-EgcQ)

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cleartax.in/product-help-and-support/for-large-businesses/cleartax-e-invoicing-malaysia/b2b-sales-documents/generate-e-invoice-s.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
