Dynamics 365 for Finance and Operations: Data templates
You can configure the Dynamics 365 for Finance and Operations target system service to map fields and other data from Tungsten AP Essentials to Dynamics 365.
By default, Tungsten AP Essentials maps data to these Dynamics 365 fields. If your Dynamics 365 solution utilizes other fields, however, you can use data templates to map fields and other data from Tungsten AP Essentials to Dynamics 365. Tungsten AP Essentials can map to two types of entities in Dynamics 365: vendor invoice header and vendor invoice line. Each entity has a corresponding setting in the target system settings that you can use to map custom fields:
- Custom field mapping - for header fields (vendor invoice header entities).
- Custom line-item field mapping - for line-item fields (vendor invoice line entities).
You specify custom field values using the format, DynamicsField="value", where DynamicsField is a Target field in Dynamics 365, 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 Validate, which among other things, makes sure the fields you specify exist in Dynamics 365.
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 Tungsten AP Essentials storage.
A value can consist of multiple constants and variables, for example:
field="Invoice %InvoiceNumber% was approved by %@user60% in AP Essentials."
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:
- # - to indicate that it is a system variable.
- @ - to indicate that it is a history variable.
- $ - to indicate that it is a meta-data variable.
Example
Customer: %$WebEye.CustomerID% Document created: %@date0{yyyy-MM-dd}% InvNr: %InvoiceNumber%
System variables
You can specify system variables to obtain the values of system variables in Tungsten AP Essentials.
- #Appendices
- #CreditInvoice
- #BatchPrefix
- #Currency
- #DateTime
- #Description
- #DocumentTypeSystemName
- #ImageFile2
- #NumberOfPagesFrontAndBack
- #NumberOfInvoicePages
- #NumberOfInvoicePagesFrontAndBack
- #NumberOfAppendixPages
- #NumberOfAppendixPagesFrontAndBack
- #Pages
- #Permalink
- #ProfileName
- #EndorserNumber
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
The default date format returned by the date variable is YYY-MM-ddTHH:mm:ss.FFFFFFFZ. For example: 2021-02-28T14:46:21.1265774Z.
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 |
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 or the SAP S/4HANA Cloud ES 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.
Additional parameters for history variables
If a history variable has multiple records associated with it, you can append history variables with additional parameters to specify whether you want the first record, last record, or all records. For example, if a document is approved by multiple users, the history variable returns the last approver by default. However, by specifying an additional parameter, you can get the first approver instead. These parameters are available:
-
First — Returns the first record in the selected history.
-
Last — Returns the last record in the selected history. This parameter is used by default if no parameter is specified.
-
All — Returns all of the records in the selected history as a semicolon-separated text sting. When using this parameter, not all all target systems accept the default date format, so make sure you know what format your target system expects.
To use a parameter, append the history variable with a dot followed by the parameter. For example, to obtain the first approver:
%@User67.First%
When using additional parameters in combination with custom date history variables, specify the parameter first:
%@Date67.First{yyyy-MM-dd}%
Meta-data variables
You can specify these variables to obtain additional meta data from Tungsten AP Essentials that is not available in the variables above:
- $WebEye.CustomerID
- $WebEye.BatchID
- $WebEye.OutputImageFormat
- $WebEye.DocumentID
- $ExternalId
- $UploaderUserName
- $OriginalFileName
- $BatchTrackId
- $ReceiveTime
- $DocumentId
- $VerifierUserName