> For the complete documentation index, see [llms.txt](https://docs.eu-pactum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eu-pactum.com/procurement-product/supplier-data-correction.md).

# Supplier data correction

In workspaces that are integrated to either Coupa or Ariba, automatic data correction from attachments can optionally be enabled. This is useful in situations where the original data is imprecise or missing, and a better value can be found in the attached files (usually quote) of the requisition.

For example, the Coupa requisition might have `invoices@supplier.com` set as the main supplier email. By default, this is the email Pactum would reach out to for negotiation. However, the quote PDF attachment often contains the email of the specific person who generated the quote, e.g. `john.smith@supplier.com`. If data correction is enabled, Pactum attempts to correct the supplier email field (and a few others) by inspecting the attachments added to the requisitions.

The data correction happens after Pactum imports a requisition from Coupa or Ariba, and before starting a negotation. The updated values are only used within Pactum for negotiation purposes, and are *not* written back into Coupa or Ariba. The high-level process is described in the following diagram.

<figure><img src="https://2769938103-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FM7KTpbu7nDWmneLhlf%2Fuploads%2Fgit-blob-1e9013cb7dea758d66d6706175948a773cc8802e%2FDocs%20diagrams%20-%20Requisition%20data%20correction.jpg?alt=media" alt=""><figcaption></figcaption></figure>

The fields that Pactum can attempt to correct are:

1. Supplier email
2. Quote reference
3. Supplier phone number
4. Whether a particular attachment should be visible to the supplier

Correcting each of those fields can be turned on or off individually, and all are off by default.

To protect against accidental leaks of sensitive data, a safeguard is applied when correcting supplier emails: the supplier email is only corrected if the new email domain is the same as the original email domain. For example:

* The supplier email in Coupa/Ariba is `invoices@supplier.com` and Pactum extracts `john.smith@supplier.com`. In this case, the negotiation is sent to `john.smith@supplier.com` because both emails are on the `supplier.com` domain.
* The supplier email in Coupa/Ariba is `invoices@supplier.com` and Pactum extracts `john@yahoo.com`. The negotiation is sent to `invoices@supplier.com` because the email domains do not match.

Additionally, it is possible to enable rejection of requisitions which are determined as no longer negotiable by Pactum, e.g. when an agreement has already been signed or when invoice has been issued.

Currently, only PDF attachments and Coupa specific text attachments are used for data extraction. Other attachments are ignored for data correction purposes as of now.
