Field Mappings for Sales Invoice to Electronic Invoice

When you send an Accounting sales invoice as an electronic invoice, Certinia converts it to an internal structured data format before passing it to Storecove. Storecove then converts it to the format required by the recipient.

The table below shows how fields on a sales invoice are mapped to the internal format, and then to Storecove. You can override all fields and add new mappings in the mapping UI. Some fields are populated with hardcoded values. You can also configure the field mappings. To see how to configure the sales credit note field mappings, see Managing Electronic Invoice Mappings.

Header Field Mapping

The table below lists the header field mappings. Some fields are populated with hard-coded values.

Warnings: Do not change the default mappings that are marked as "(Managed)". If you override them it will break the integration with Storecove.

Sales Invoice

ElectronicInvoicingService.Document

Storecove InvoiceSubmission

Notes

<not mapped, but available for mapping to a custom field> - invoice.taxSystem Hardcoded to either 'tax_line_percentages' or 'tax_no_tax', depending on whether there is any tax information.
<not mapped, but available for mapping to a custom field> <not supported> attachments Although attachments are not currently supported in the e-invoice, a PDF copy of the invoice can still be sent as usual.
<not mapped, but available for mapping to a custom field> AccountingCostCentre invoice.accountingCost  
c2g__Account__c AccountingCustomerParty.AccountId invoice.accountingCustomerParty.accountId  
c2g__Account__r.Name AccountingCustomerParty.CompanyName invoice.accountingCustomerParty.party.companyName  
c2g__Account__r.c2g__CODAFinanceContact__c AccountingCustomerParty.ContactId invoice.accountingCustomerParty.party.contact.id  
c2g__Account__r.c2g__CODAFinanceContact__r.Name AccountingCustomerParty.ContactName invoice.accountingCustomerParty.party.contact.lastName  
c2g__Account__r.c2g__CODAInvoiceEmail__c AccountingCustomerParty.EmailAddress invoice.accountingCustomerParty.party.contact.email  
c2g__Account__r.BillingStreet AccountingCustomerParty.PostalAddress.AddressLine1 invoice.accountingCustomerParty.party.address.street1  
<not mapped, but available for mapping to a custom field> AccountingCustomerParty.PostalAddress.AddressLine2 invoice.accountingCustomerParty.party.address.street2  
c2g__Account__r.BillingCity AccountingCustomerParty.PostalAddress.CityName invoice.accountingCustomerParty.party.address.city  
c2g__Account__r.BillingCountry AccountingCustomerParty.PostalAddress.Country -  
c2g__Account__r.c2g__CODAECCountryCode__c AccountingCustomerParty.PostalAddress.CountryIdentificationCode invoice.accountingCustomerParty.party.address.country  
<not mapped, but available for mapping to a custom field> AccountingCustomerParty.PostalAddress.County invoice.accountingCustomerParty.party.address.county  
c2g__Account__r.BillingPostalCode AccountingCustomerParty.PostalAddress.PostalCode invoice.accountingCustomerParty.party.address.zip  
c2g__Account__r.fferpcore__AccountExtension__r[0].fferpcore__EInvoicingAddressIdentifier__c AccountingCustomerParty.PublicIdentifiers[0].Id invoice.accountingCustomerParty.publicIdentifiers[0].id This is populated with the value from the corresponding Routing.EIdentifiers field.
c2g__Account__r.fferpcore__AccountExtension__r[0].fferpcore__EInvoicingSchemeID__c AccountingCustomerParty.PublicIdentifiers[0].Scheme invoice.accountingCustomerParty.publicIdentifiers[0].scheme This is populated with the value from the corresponding Routing.EIdentifiers field.
c2g__Account__r.c2g__CODAVATRegistrationNumber__c AccountingCustomerParty.PublicIdentifiers[1].Id invoice.accountingCustomerParty.publicIdentifiers[1].id This is populated with the value from the corresponding Routing.EIdentifiers field.
c2g__Account__r.c2g__CODAECCountryCode__c AccountingCustomerParty.PublicIdentifiers[1].Scheme invoice.accountingCustomerParty.publicIdentifiers[1].scheme

This is populated with the value from the corresponding Routing.EIdentifiers field.

Country code is used to work out the appropriate scheme for a VAT identifier for this country (in Accounting code).

c2g__Account__r.Phone AccountingCustomerParty.Telephone invoice.accountingCustomerParty.party.contact.phone  
<not mapped, but available for mapping to a custom field> AccountingSupplierParty.ContactName invoice.accountingSupplierParty.party.contact.lastName  
c2g__OwnerCompany__r.c2g__ContactEmail__c AccountingSupplierParty.EmailAddress invoice.accountingSupplierParty.party.contact.email  
c2g__OwnerCompany__r.c2g__Phone__c AccountingSupplierParty.Telephone invoice.accountingSupplierParty.party.contact.phone  
<not mapped, but available for mapping to a custom field> AllowanceCharges invoice.allowanceCharges  
<not mapped, but available for mapping to a custom field> BillingReference invoice.billingReference  
<not mapped, but available for mapping to a custom field> ConsumerTaxMode invoice.consumerTaxMode Hardcoded as 'false'.
<not mapped, but available for mapping to a custom field> ContractDocumentReference invoice.contractDocumentReference  
<not mapped, but available for mapping to a custom field> CreatePrimaryImage createPrimaryImage Hardcoded as 'true'.
c2g__CustomerReference__c CustomerOrderReference invoice.orderReference  
c2g__CustomerReference__c CustomerReference invoice.buyerReference  
<not mapped, but available for mapping to a custom field> Delivery.ActualDate invoice.delivery.actualDate  
<not mapped, but available for mapping to a custom field> Delivery.Location.Id invoice.delivery.location.id  
<not mapped, but available for mapping to a custom field> Delivery.Location.SchemeAgencyId invoice.delivery.location.schemeAgencyId  
<not mapped, but available for mapping to a custom field> Delivery.Location.SchemeId invoice.delivery.location.schemeId  
<not mapped, but available for mapping to a custom field> Delivery.Quantity invoice.delivery.quantity  
<not mapped, but available for mapping to a custom field> DeliveryAddress invoice.delivery.location.address  
<not mapped, but available for mapping to a custom field> DeliveryAddress.AddressLine1 invoice.delivery.location.address.street1  
<not mapped, but available for mapping to a custom field> DeliveryAddress.AddressLine2 invoice.delivery.location.address.street2  
<not mapped, but available for mapping to a custom field> DeliveryAddress.CityName invoice.delivery.location.address.city  
<not mapped, but available for mapping to a custom field> DeliveryAddress.Country invoice.delivery.location.address.country  
<not mapped, but available for mapping to a custom field> DeliveryAddress.CountryIdentificationCode invoice.delivery.location.address.country  
<not mapped, but available for mapping to a custom field> DeliveryAddress.County invoice.delivery.location.address.county  
<not mapped, but available for mapping to a custom field> DeliveryAddress.PostalCode invoice.delivery.location.address.zip  
c2g__Currency__c DocumentCurrencyCode invoice.documentCurrencyCode  
c2g__EInvoiceIdentifier__c DocumentIdentifier idempotencyGuid  
c2g__InvoiceTotal__c DocumentTotal invoice.amountIncludingVat Amount is negated if the document is a credit note.
Hardcoded - INVOICE DocumentType - In Storecove, prices are negated if type is CREDIT_NOTE.
c2g__DueDate__c DueDate invoice.dueDate  
Name InvoiceNumber invoice.invoiceNumber  
<not mapped, but available for mapping to a custom field> InvoicePeriod.EndDate invoice.invoicePeriod Two source fields can be mapped to this particular Storecove field (see example below)
<not mapped, but available for mapping to a custom field> InvoicePeriod.StartDate invoice.invoicePeriod Two source fields can be mapped to this particular Storecove field (see example below)
c2g__InvoiceDate__c IssueDate invoice.issueDate  
c2g__OwnerCompany__r.c2g__EInvoicingLegalEntityID__c LegalEntityId legalEntityId Do not override this mapping because this field is validated prior to sending.
<not mapped, but available for mapping to a custom field> Note invoice.note  
<not mapped, but available for mapping to a custom field> PaymentMeans invoice.paymentMeansArray  
<not mapped, but available for mapping to a custom field> PaymentMeans.Account payment_means_array.account Requires the PaymentMeans.Code field mapping.
<not mapped, but available for mapping to a custom field> PaymentMeans.BranchCode payment_means_array.branch_code Requires the PaymentMeans.Code field mapping.
<not mapped, but available for mapping to a custom field> PaymentMeans.Code payment_means_array.type  
<not mapped, but available for mapping to a custom field> PaymentMeans.Holder payment_means_array.holder Requires the PaymentMeans.Code field mapping.
<not mapped, but available for mapping to a custom field> PaymentMeans.Mandate payment_means_array.mandate Requires the PaymentMeans.Code field mapping.
<not mapped, but available for mapping to a custom field> PaymentMeans.Network payment_means_array.network Requires the PaymentMeans.Code field mapping.
<not mapped, but available for mapping to a custom field> PaymentMeans.PaymentId payment_means_array.payment_id Requires the PaymentMeans.Code field mapping.
<not mapped, but available for mapping to a custom field> PaymentTerms invoice.paymentTerms  
<not mapped, but available for mapping to a custom field> PrepaidAmount invoice.prepaidAmount Amount is negated if the document is a credit note.
<not mapped, but available for mapping to a custom field> ProjectReference invoice.projectReference  
c2g__Account__r.fferpcore__AccountExtensions__r[0].fferpcore__EInvoicingAddressIdentifier__c Routing.EIdentifiers[0].Id routing.eIdentifiers[0].id This is hard coded to map to the specified field on the Account.
c2g__Account__r.fferpcore__AccountExtensions__r[0].fferpcore__EInvoicingSchemeID__c Routing.EIdentifiers[0].Scheme routing.eIdentifiers[0].scheme This is hard coded to map to the specified field on the Account.
c2g__Account__r.c2g__CODAVATRegistrationNumber__c Routing.EIdentifiers[1].Id routing.eIdentifiers[1].id This is configurable via Manage E-Invoice Mappings. Map the source field to Routing ID.
c2g__Account__r.c2g__CODAECCountryCode__c Routing.EIdentifiers[1].Scheme routing.eIdentifiers[1].scheme

This is configurable via Manage E-Invoice Mappings. Map the source field to Routing Scheme.

Country code is used to work out the appropriate scheme for a VAT identifier for this country.

c2g__Account__r.c2g__CODAInvoiceEmail__c Routing.Emails[0] routing.emails This is configurable via Manage E-Invoice Mappings. Map the source field to Routing Email.
<not mapped, but available for mapping to a custom field> SalesOrderId invoice.salesOrderId  
<not mapped, but available for mapping to a custom field> TaxPointDate invoice.taxPointDate  
c2g__InvoiceDate__c TaxPointDate    
<not mapped, but available for mapping to a custom field> TaxSubtotals invoice.taxSubtotals These are worked out automatically from the taxes on the lines.
<not mapped, but available for mapping to a custom field> UblExtensions invoice.ublExtensions  

Example for InvoicePeriod Field Mapping

This example shows how to map the InvoicePeriod.StartDate and InvoicePeriod.EndDate custom date fields to the invoice document's invoice.invoicePeriod field. Two source fields are mapped to a single target field. When the mapping happens, the InvoicePeriod.StartDate and InvoicePeriod.EndDate field values are combined together and mapped to the invoice.invoicePeriod target field.

For Example:

The InvoicePeriod.StartDate is 2020-12-23 and the InvoicePeriod.EndDate is 2021-12-25. Both the start and end dates will be combined together as 2020-12-23 - 2021-12-25 and then mapped to invoice.invoicePeriod target field.

Line Field Mapping

The table below lists the line field mappings. Some fields are populated with hard-coded values.

Warnings: Do not change the default mappings that are marked as "(Managed)". If you override them it will break the integration with Storecove.

Sales Invoice Line Item

ElectronicInvoicingService.DocumentLine

Storecove InvoiceLine

Notes

c2g__LineNumber__c LineId lineId  
c2g__LineDescription__c Description description  
c2g__Product__r.Name ItemName name  
c2g__ProductCode__c SellersItemIdentification sellersItemIdentification  
c2g__UnitPrice__c UnitPrice itemPrice Amount is negated if the document is a credit note.
c2g__Quantity__c Quantity quantity  
c2g__NetValue__c NetValue amountExcludingVat Amount is negated if the document is a credit note. Rounded to 2 decimal places.
c2g__TaxValue1__c TaxBreakdown[0].Amount taxes_duties_fees[0].amount Amount is negated if the document is a credit note. Rounded to 2 decimal places.
c2g__OwnerCompany__r.c2g__ECCountryCode__c TaxBreakdown[0].CountryIdentificationCode taxes_duties_fees[0].country  
c2g__TaxRate1__c TaxBreakdown[0].Percent taxes_duties_fees[0].percentage Rounded to 2 decimal places.
c2g__OwnerCompany__r.EInvoicingTaxCategory__c TaxBreakdown[0].TaxCode taxes_duties_fees[0].category  
c2g__TaxValue2__c TaxBreakdown[1].Amount taxes_duties_fees[1].amount Amount is negated if the document is a credit note. Rounded to 2 decimal places.
c2g__OwnerCompany__r.c2g__ECCountryCode__c TaxBreakdown[1].CountryIdentificationCode taxes_duties_fees[1].country  
c2g__TaxRate2__c TaxBreakdown[1].Percent taxes_duties_fees[1].percentage Rounded to 2 decimal places.
c2g__OwnerCompany__r.EInvoicingTaxCategory__c TaxBreakdown[1].TaxCode taxes_duties_fees[1].category  
c2g__TaxValue3__c TaxBreakdown[2].Amount taxes_duties_fees[2].amount Amount is negated if the document is a credit note. Rounded to 2 decimal places.
c2g__OwnerCompany__r.c2g__ECCountryCode__c TaxBreakdown[2].CountryIdentificationCode taxes_duties_fees[2].country  
c2g__TaxRate3__c TaxBreakdown[2].Percent taxes_duties_fees[2].percentage Rounded to 2 decimal places.
c2g__OwnerCompany__r.EInvoicingTaxCategory__c TaxBreakdown[2].TaxCode taxes_duties_fees[2].category  
<not mapped, but available for mapping to a custom field> AccountingCostCentre accountingCost  
<not mapped, but available for mapping to a custom field> AdditionalItemProperties additionalItemProperties  
<not mapped, but available for mapping to a custom field> DiscountAmount allowanceCharge Value is negated, unless the document is a credit note.
<not mapped, but available for mapping to a custom field> CustomerItemIdentification buyersItemIdentification  
<not mapped, but available for mapping to a custom field> Period.StartDate invoicePeriod  
<not mapped, but available for mapping to a custom field> Period.StartDate invoicePeriod  
<not mapped, but available for mapping to a custom field> OrderLineReferenceLineId orderLineReferenceLineId  
<not mapped, but available for mapping to a custom field> UnitCode quantityUnitCode  
<not mapped, but available for mapping to a custom field> StandardItemIdentification standardItemIdentification  
<not mapped, but available for mapping to a custom field> StandardItemIdentificationSchemeAgencyId standardItemIdentificationSchemeAgencyId  
<not mapped, but available for mapping to a custom field> StandardItemIdentificationSchemeId standardItemIdentificationSchemeId  
<not mapped, but available for mapping to a custom field> Delivery.ActualDate delivery.actualDate  
<not mapped, but available for mapping to a custom field> Delivery.Quantity delivery.quantity  
<not mapped, but available for mapping to a custom field> Delivery.Location.Id delivery.location.id  
<not mapped, but available for mapping to a custom field> Delivery.Location.SchemeAgencyId delivery.location.schemeAgencyId  
<not mapped, but available for mapping to a custom field> Delivery.Location.SchemeId delivery.location.schemeId  
<not mapped, but available for mapping to a custom field> DeliveryAddress delivery.location.address  

Notes About Line-Level Tax Details

  • A sales invoice line item can have up to three taxes but Storecove only handles one. If you populate the sales invoice line item fields for more than one tax, Storecove will report an error.
  • The E-Invoicing Tax Category field on the Accounting Company (c2g__OwnerCompany__r.EInvoicingTaxCategory__c) is a picklist of values specified by Storecove. For the list of possible values, see Storecove's API documentation for tax category:
    https://www.storecove.com/docs/#_openapi_tax