Coupa: Data templates

You can configure the Coupa target system service to map fields and other data from ReadSoft Online to Coupa.

By default, ReadSoft Online can map fields to these Coupa fields. If your solution has custom fields, however, you can use data templates to map fields and other data from ReadSoft Online to Coupa.

You can specify data templates in the Custom field mapping and Remit-to code template settings.

You specify custom field values using the format, CoupaCustomField="value", where CoupaCustomField is the target field Coupa, and value is any possible value defined later in this topic. Use a semicolon to separate multiple field specifications. For your convenience, you can click TEST, which among other things, makes sure the fields you specify exist in Coupa.

Currently, you can only map header fields in ReadSoft Online to custom fields in Coupa. Three types of custom fields are supported in Coupa: text, number and date. When mapping to custom fields in Coupa, make sure the field type in ReadSoft Online matches the correct type in Coupa. For example, if the ReadSoft Online field has the type, Amount, the corresponding Coupa field must have the type, number. If the field types do not match, the custom field the data will not be transferred, however, the invoice will still be sent to Coupa without causing an error.

Example

Suppose you type the following in the Custom field mapping setting:

CUSTOMFIELDAPPROVER="%@user60%";CUSTOMFIELDAPPROVALDATE="%@date60%";CUSTOMFIELDLINK="%#Permalink%"

In this example:

  • CUSTOMFIELDAPPROVER is set to a history variable that refers to the name of the user who checked the invoice.

  • CUSTOMFIELDAPPROVALDATE is set to a history variable that refers to the date and time when the invoice was verified.

  • CUSTOMFIELDLINK is set a system variable that refers to the permanent image link (URL) in ReadSoft Online storage.

A value can consist of multiple constants and variables, for example:

field="Invoice %InvoiceNumber% was approved by %@user60% in ReadSoft."

You specify the data using plain-text constants and variables enclosed in percent marks.

  • Constants - fixed values that you specify as text.
  • Variables - dynamic values that are determined by invoice data or system data. Variables are enclosed in percent characters (%).

To specify a variable for an invoice field, enclose the Type name of the field in percent characters (%).

A variable can also be preceded by:

Example

Supplier Name: %#Supplier.Name% Suppler Number: %#Supplier.ExternalId% InvNr: %InvoiceNumber%

Note If you create a custom field, the field type must be Text or Amount. Custom date fields are not supported because the date field that ReadSoft Online exports is not the format that Dynamics 365 expects. However, history variables are exported in the correct format.

System variables

You can specify system variables to obtain the values of system variables in ReadSoft Online.

  • #Appendices
  • #CreditInvoice
  • #BatchPrefix
  • #buyer.Type
  • #buyer.Name
  • #buyer.Id
  • #Buyer.FieldName (where FieldName is a field name specified in ReadSoft Online XML (2.0))
  • #buyer.ExternalId
  • #buyer.Description
  • #buyer.TaxRegistrationNumber
  • #buyer.OrganizationNumber
  • #buyer.Street
  • #buyer.PostalCode
  • #buyer.City
  • #buyer.CountryName
  • #buyer.PaymentTerm
  • #buyer.PaymentMethod
  • #buyer.CurrencyCode
  • #buyer.BankAccounts
  • #Currency
  • #DateTime
  • #Description
  • #DocumentTypeSystemName
  • #ImageFile2
  • #NumberOfPagesFrontAndBack
  • #NumberOfInvoicePages
  • #NumberOfInvoicePagesFrontAndBack
  • #NumberOfAppendixPages
  • #NumberOfAppendixPagesFrontAndBack
  • #Pages
  • #Permalink
  • #ProfileName
  • #EndorserNumber
  • #Supplier
  • #Supplier.FieldName (where FieldName is a field name specified in ReadSoft Online XML (2.0))
  • #SupplierDescription
  • #supplier.Type
  • #supplier.Name
  • #supplier.Id
  • #supplier.ExternalId
  • #supplier.TaxRegistrationNumber
  • #supplier.OrganizationNumber
  • #supplier.Street
  • #supplier.PostalCode
  • #supplier.City
  • #supplier.CountryName
  • #supplier.PaymentTerm
  • #supplier.PaymentMethod
  • #supplier.CurrencyCode
  • #supplier.BankAccounts

History variables

You can specify history variables to obtain the user or the date and time of a specific process. You construct a history variable using one of these formats:

  • @UserX
  • @DateX
...where User specifies that you want the user associated with the process, Date specifies that you want the date the process occurred and X specifies the numerical code of the process you want to return. For example, %@Date0% returns the date a document was created. %@User0% returns the user name that created the document.

Custom date formats

The default date format returned by the date variable is YYY-MM-ddTHH:mm:ss.FFFFFFFZ. For example: 2021-02-28T14:46:21.1265774Z.

If you use the Oracle Financials Cloud integration, you can control the format of the date variable using standard date and time formats as well as custom formats. You specify the format of your choice by enclosing it in braces after the date variable, like this:

%@date0{yyyy-MM-dd}%

The date variable above would return for example, 2021-02-28.

Note Currently, custom date formats are only available for the Oracle Financials Cloud integration. However, custom date formats will be available to other integrations in the near future.

Process status Numerical code
DocumentCreated 0
DocumentExtractionInProgress 30
DocumentExtractionSucceeded 40
DocumentPendingManualVerification 45
DocumentPendingCorrection 46
DocumentCorrectionFlowStarting 47
DocumentCorrectionFlowInProgress 48
DocumentCorrectionFlowDone 49
DocumentRejectedDuringVerification 50
DocumentRequestForInformationDuringVerification 55
DocumentManuallyVerified 60
DocumentPendingRegistration 61
DocumentRegistrationInProgress 62
DocumentRegistrationSucceeded 63
DocumentRegistrationFailed 64
DocumentPendingApproval 65
DocumentApprovalStarting 79
DocumentApprovalInProgress 66
DocumentApproved 67
DocumentApprovalSucceeded 68
DocumentApprovalRejected 69
DocumentRequestForInformation 70
DocumentPendingAllocation 71
DocumentPendingPost 74
DocumentPostInProgress 75
DocumentPostSucceeded 76
DocumentPostFailed 77
DocumentAssignedToUser 78
DocumentPendingBatchRegistration 80
DocumentPendingBatchPost 81
DocumentValidationFailed 82
DocumentPendingExport 90
DocumentExportPostponed 91
DocumentExportInProgress 95
DocumentExportFailed 99
DocumentExportSucceeded 100
DocumentSentToStorage 200
DocumentCommentAdded 201
LineItemExtractionUsed 202
DocumentFailed 900
DocumentDeleted 1000

Meta-data variables

You can specify these variables to obtain additional meta data from ReadSoft Online that is not available in the variables above:

  • $WebEye.CustomerID
  • $WebEye.BatchID
  • $WebEye.BuyerID
  • $WebEye.OutputImageFormat
  • $WebEye.DocumentID
  • $ExternalId
  • $UploaderUserName
  • $OriginalFileName
  • $BatchTrackId
  • $ReceiveTime
  • $DocumentId
  • $VerifierUserName