# 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](https://manual.firstresonance.io/adminstration/administration-and-configuration/report-generator-disclaimer "mention") 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="https://3615148728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LkRqYp6lJhwxjYdzYG8%2Fuploads%2Ft9hNQOIzTpMvL7i6kAqt%2Fimage.png?alt=media&#x26;token=6fd9ad89-b5de-4fb5-a980-745a88b1c9ae" alt=""><figcaption></figcaption></figure>

5. Configure the integration with your ion-api credentials and select the environment. See [api-keys](https://manual.firstresonance.io/api/api-keys "mention") for more information on how to get your credentials.

   <figure><img src="https://3615148728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LkRqYp6lJhwxjYdzYG8%2Fuploads%2F7Pmrkcu9LuqOsVu4LArK%2Fimage.png?alt=media&#x26;token=1f27056a-023f-4445-8678-c5707fbbcafa" 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="https://3615148728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LkRqYp6lJhwxjYdzYG8%2Fuploads%2FxsjGvlyEevgLRShL7t82%2Fimage.png?alt=media&#x26;token=c3805eb8-c5c6-42cb-a8ba-3545f2f7a8c4" 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="https://3615148728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LkRqYp6lJhwxjYdzYG8%2Fuploads%2FVz3KGCNPM3raLi1wCK41%2Fimage.png?alt=media&#x26;token=dc6ffb52-1e73-469e-90ed-ae804eb1895c" 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="https://3615148728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LkRqYp6lJhwxjYdzYG8%2Fuploads%2FIBYJHMlI2BIYAKiXC2Gt%2Fimage.png?alt=media&#x26;token=c5641c8b-351e-4052-a88e-28446926d8f5" alt=""><figcaption></figcaption></figure>

13. Press Finish
