# Purchase Order PDF and Versions

### Purchase Order Versions:

Use ION's prebuilt marketplace automation to manage versions.

Every time a purchase order is moved to either "APPROVED" or "ORDERED" (configurable) the purchase order "Version" attribute will be incremented. When you move a purchase order to the "APPROVED" or "ORDERED" status a PDF/XLS of the purchase order is generated and uploaded to the file attachments for that purchase order. The generated document will be titled with the version attribute at the time of order.

{% hint style="info" %}
DISCLAIMER: This automation utilizes Carbone for PDF generation. Please see [Report Generator Disclaimer](/adminstration/administration-and-configuration/report-generator-disclaimer.md) for more information.
{% endhint %}

#### PDF Generator

This automation can use any one of the following 3 implementations of Carbone:

1. First Resonance's PDF Generator (default)
2. Your PDF Generator account (i.e. Carbone) account
3. On-premise implementation of your PDF Generator

#### Setup:

1. Navigate to the integrations page via the arrows on the left-hand side

2. Search for and locate the integration called "Purchase Order PDF"

3. Select the integration and click the `Add Instance` button

4. Optionally modify the `Name` of the automation. This is helpful if you are deploying multiple instances of the same automation (i.e., one is pointing to staging and one is pointing to production)

   <figure><img src="/files/7VjNFrpdLSQo3xLZt973" alt=""><figcaption></figcaption></figure>

5. Configure the integration with your ion-api credentials and select the environment. See [API Keys](/api/api-keys.md) for more information on how to get your credentials.

   <figure><img src="/files/qHBps8kTAzHgojdxXbOi" alt=""><figcaption></figcaption></figure>

6. Select the purchase order status that will trigger the creation of the PDF. You can choose either `APPROVED` or `ORDERED`

7. If you would like to use an on premise installation of your PDF Generator, you must set the `On-Prem Carbone` setting to true and specify the `On-Prem Carbone URL`. The default is `false` which will use the standard cloud implementation of Carbone.

   <figure><img src="/files/cUlLV14JpmsROHmUf4Q4" alt=""><figcaption></figcaption></figure>

8. Specify the Carbone `TemplateId` to use to generate the PDF. The default template id will use an out-of-the-box generalized purchase order template. Contact your customer success manager if you would like to use a customized purchase order template.

9. Specify the type of file to generate. The default is `pdf`. You can also opt to generate `xls` spreadsheets.

10. Specify the `Carbone API Key` and `Carbone Version`. If you are not using your own PDF Generator account, then use the default values.

    <figure><img src="/files/RYmgl3uGIi0umc8Q4fCW" alt=""><figcaption></figcaption></figure>

11. Specify the `Organization Name`. This value is used in naming the document that is generated.

12. Optionally, enable the `Send Notification` setting if you would like a notification to be when whenever the PO is versioned and/or a document is generated.

    <figure><img src="/files/rXi7SjgOQlssV1a6m5WH" alt=""><figcaption></figcaption></figure>

13. Press Finish


---

# Agent Instructions: 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:

```
GET https://manual.firstresonance.io/automations/purchase-order-pdf-and-versions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
