Integrations & ERP Custom Fields / Business Central

Business Central®: Configuration

Currently, YayPay can import data from a Business Central® ERP System. However, there is not any capability for reverse payment integration from YayPay back to Business Central®.

Here we describe integrating your Business Central® and YayPay:

  1. Registering your Application in Microsoft Entra ID

  2. Configuring Business Central®

  3. Configuring YayPay

Registering YourApplication in Microsoft Entra ID

See also:

Quickstart: Register an application with the Microsoft identity platform

This section explains the process of registering and configuring an application in Microsoft Entra ID. This is required before connecting Business Central® with YayPay.

To register a new application in the Azure portal:

  1. Log in to your Azure portal account, navigate to Identity | ApplicationsApp registrations, and click New registration.
  2. On the page that opens, enter a display name for your application in the Name field, and select the Accounts in this organizational directory only (Single tenant) in the Supported account types field.

    Delete

    Note

    To integrate Business Central® with YayPay, create a line-of-business application. Thus, for the Supported account types option, use single tenant registration in the Azure portal.


  3. Click Register at the bottom of the page to complete the initial app registration.

    When completed, the Overview page displays, providing basic information about your application.

To configure your application:

  1. Navigate to the App registrations section and select your application.

  2. On the page that opens, click Authentication located under Manage on the left side of the page.

  3. On the page that opens, click Add a platform located under Platform configurations.

  4. On the Configure platforms panel that opens on the right hand side, select Web.

  5. On the page that opens, enter the redirect URI in the Redirect URIs field and click Configure.

    This URI is where the Microsoft identity platform redirects a user's client and sends security tokens after authentication.

  6. Navigate to the API permissions section, and in the panel that opens, click on the Dynamic 365 Business Central option to configure permissions.

  7. On the page that opens, select Delegated permissions.


  8. Click API permissions again and set Application permissions to Grant admin consent for {user}.

  9. Navigate to the Certificates & secrets section and click New client secret to define the following:
    Description – Describes the client secret.
    Expires– Defines when the secret expires.


    Copy and save the client secret value because it will be later masked and you cannot copy it.

After completing this process, see the Overview page of your application for all relevant information.

Save this information as you will need to use these values in the corresponding fields on the Business Central Connector Settings page in YayPay:

  • Application (client) ID
  • Certificates & secrets values
  • Directory (tenant) ID


Configure Business Central®

This section describes how to configure both the online and on-premise Business Central® platforms before synchronizing them with YayPay.


Business Central® Online

This section summarizes how to configure your cloud Business Central® application before synchronizing it with YayPay.

To connect your application created in the Azure portal to the Business Central® environment:

  1. Log into your Business Central® account and use the Search icon in the top right corner of the page to search for add or Microsoft Entra Applications.

  2. On the page that opens, click New.
  3. On the page that opens, enter the value of the Application (client) ID field of your application registered in Microsoft Entra ID into the Client ID field. You can find this information in the Overview section in the Azure portal. Also, add a short description of the application in the Description field.
  4. Assign the same user permissions as for the Azure user.

  5. Go back to the Microsoft Entra Applications page to ensure that the State field is set to Enabled.
  6. Configure Endpoints in Business Central®.

Configure Endpoints in Business Central®

See also:

The Business Central Admin Center API

Endpoints for the APIs for Dynamics 365 Business Central On-Premises and Online

This section describes how to create and configure endpoints in Business Central®.

In the Azure portal, go to App registrations. On the Overview page of your registered app, you will find the Endpoints section located above the app. After an app is registered and the Tenant ID value is generated, you will find the OAuth 2.0 base URL in this Endpoints section.

Additionally, see the Location section in Business Central Administration Center API. For the base URI, use https://api.businesscentral.dynamics.com/v2.0/<environment name>/api/v2.0.

Once a client has created an app in Microsoft Entra ID to integrate with YayPay and connected it to their Business Central instance, they must expose the endpoints of their environment to the YayPay connector. This is essential for the YayPay connector to be able to synchronize data. 

To achieve this, the client needs to create the necessary endpoints within their Business Central ERP system.

Delete

Note

For more details, see also the following articles on the Microsoft® website:


Creating Endpoints in Business Central®

To create an endpoint in Business Central:

  1. In your Business Central instance, navigate to the Web Services section and click New at the top of the page.

  2. On the new row that appears, set Object Type to Page.

  3. For the new Page object, set Object ID to Customers. You can browse the list of object IDs using keywords.

  4. Define the Service Name field and check the Publish check box.

  5. Click the Reload button located at the top of the page.

  6. As a result, you will find the updated URL in the OnData V4 URL column.

The above listed endpoints represent available fields that the connector can utilize to synchronize data. As the service name for these endpoints are entered by users, the connector will use the endpoints created by users. Users can navigate between these endpoints using the Object ID value.

For example, for a Customer object, there's a list of available endpoints. To use a specific endpoint required for the connector, enter the Object ID value of that endpoint.

See the following sections for a list of endpoints that you need to create in the Business Central environment for the YayPay connector to be able to work with your data.

Endpoints Configuration

For the connector to be able to work with the data, create the endpoints listed in the table below in your Business Central environment.

If you decide to change the default Service Names value provided in the mapping, or if you have already published any of the specified object IDs in your web services, make sure to update the mapping file accordingly. For example, if you would like to change the default ypBcCompanyservice name to ypBcCompanyInformation, modify the corresponding line in the mapping file, i.e. change "companyObject" : "ypBcCompany", to "companyObject" : "ypBcCompanyInformation",. After making these changes, upload the updated mapping file back to YayPay.

Business Central Web Services

Object ID Object Name Service Name to enter in the Business Central environment 
6408 workflowCustomers ypBcCustomers
30011 APIV2 - Company Information ypBcCompany
30009 APIV2 - Customers ypBcContacts
132 Posted Sales Invoice ypBcInvoiceBillToContact
30012 APIV2 - Sales Invoices ypBcSalesInvoice
20023 paymentTerms ypBcPaymentTerms
483 Currency Exchange Rates ypBcExchangeRates
526 Posted Sales Invoice Lines ypBcSalesInvoiceLines
25 Customer Ledger Entries ypBcCustomerLedgerEntries
573 Detailed Customer Ledger Entries ypBcDetailedCustLedgerEntries
144 Posted Sales Credit Memos ypBcSalesCreditMemos
9657 Customer Billing Contact ypBсdocLayouts
Delete
Delete

Important

Regardless of which version of Business Central you are using, Cloud or On-Premise, ensure that you can add all the object IDs listed in the Business Central Web Services table above as endpoints on the Business Central Web Services page. This is a mandatory requirement for YayPay to integrate data from Business Central.

The absence of some of the listed endpoints in Business Central may be due to the API version. Ensure that the version of your Business Central supports API version V2.

Also, ensure that the following endpoints are available on the Web Services page:

  • 30011 APIV2 - Company Information ypBcCompany
  • 30009 APIV2 - Customers ypBcContacts
  • 30012 APIV2 - Sales Invoices ypBcSalesInvoice
  • 20023 paymentTerms ypBcPaymentTerms
  • 9657 Customer Billing Contact ypBсdocLayouts

If you cannot find or add the endpoints (listed above) on the application's Web Services page, create page extensions for these endpoints. These page extensions are provided by Microsoft. For more details, see the ALAppExtensions section on GitHub.


Custom Fields

When configuring custom fields in YayPay, ensure that you include the object's name from your YayPay mapping in the Source Field Name field for both customer and invoice level custom fields.

The following table lists native fields available for custom configuration of the CUSTOMER object.

Custom Fields: CUSTOMER  

Business Central API Field Name

YayPay Source Field Name

id

ypBcCustomers_id

number

ypBcCustomers_number

name

ypBcCustomers_name

searchName

ypBcCustomers_searchName

name2

ypBcCustomers_name2

address

ypBcCustomers_address

address2

ypBcCustomers_address2

city

ypBcCustomers_city

contact

ypBcCustomers_contact

phoneNumber

ypBcCustomers_phoneNumber

telexNumber

ypBcCustomers_telexNumber

documentSendingProfile

ypBcCustomers_documentSendingProfile

ourAccountNumber

ypBcCustomers_ourAccountNumber

territoryCode

ypBcCustomers_territoryCode

globalDimension1Code

ypBcCustomers_globalDimension1Code

globalDimension2Code

ypBcCustomers_globalDimension2Code

chainName

ypBcCustomers_chainName

budgetedAmount

ypBcCustomers_budgetedAmount

creditLimitLcy

ypBcCustomers_creditLimitLcy

customerPostingGroup

ypBcCustomers_customerPostingGroup

currencyCode

ypBcCustomers_currencyCode

customerPriceGroup

ypBcCustomers_customerPriceGroup

languageCode

ypBcCustomers_languageCode

statisticsGroup

ypBcCustomers_statisticsGroup

paymentTermsCode

ypBcCustomers_paymentTermsCode

finChargeTermsCode

ypBcCustomers_finChargeTermsCode

salespersonCode

ypBcCustomers_salespersonCode

shipmentMethodCode

ypBcCustomers_shipmentMethodCode

shippingAgentCode

ypBcCustomers_shippingAgentCode

placeOfExport

ypBcCustomers_placeOfExport

invoiceDiscCode

ypBcCustomers_invoiceDiscCode

customerDiscGroup

ypBcCustomers_customerDiscGroup

countryRegionCode

ypBcCustomers_countryRegionCode

collectionMethod

ypBcCustomers_collectionMethod

amount

ypBcCustomers_amount

comment

ypBcCustomers_comment

blocked

ypBcCustomers_blocked

invoiceCopies

ypBcCustomers_invoiceCopies

lastStatementNumber

ypBcCustomers_lastStatementNumber

printStatements

ypBcCustomers_printStatements

billToCustomerNumber

ypBcCustomers_billToCustomerNumber

priority

ypBcCustomers_priority

paymentMethodCode

ypBcCustomers_paymentMethodCode

lastModifiedDateTime

ypBcCustomers_lastModifiedDateTime

lastDateModified

ypBcCustomers_lastDateModified

dateFilter

ypBcCustomers_dateFilter

globalDimension1Filter

ypBcCustomers_globalDimension1Filter

globalDimension2Filter

ypBcCustomers_globalDimension2Filter

balance

ypBcCustomers_balance

balanceLcy

ypBcCustomers_balanceLcy

netChange

ypBcCustomers_netChange

netChangeLcy

ypBcCustomers_netChangeLcy

salesLcy

ypBcCustomers_salesLcy

profitLcy

ypBcCustomers_profitLcy

invDiscountsLcy

ypBcCustomers_invDiscountsLcy

pmtDiscountsLcy

ypBcCustomers_pmtDiscountsLcy

balanceDue

ypBcCustomers_balanceDue

balanceDueLcy

ypBcCustomers_balanceDueLcy

payments

ypBcCustomers_payments

invoiceAmounts

ypBcCustomers_invoiceAmounts

crMemoAmounts

ypBcCustomers_crMemoAmounts

financeChargeMemoAmounts

ypBcCustomers_financeChargeMemoAmounts

paymentsLcy

ypBcCustomers_paymentsLcy

invAmountsLcy

ypBcCustomers_invAmountsLcy

crMemoAmountsLcy

ypBcCustomers_crMemoAmountsLcy

finChargeMemoAmountsLcy

ypBcCustomers_finChargeMemoAmountsLcy

outstandingOrders

ypBcCustomers_outstandingOrders

shippedNotInvoiced

ypBcCustomers_shippedNotInvoiced

applicationMethod

ypBcCustomers_applicationMethod

pricesIncludingVat

ypBcCustomers_pricesIncludingVat

locationCode

ypBcCustomers_locationCode

faxNumber

ypBcCustomers_faxNumber

telexAnswerBack

ypBcCustomers_telexAnswerBack

vatRegistrationNumber

ypBcCustomers_vatRegistrationNumber

combineShipments

ypBcCustomers_combineShipments

genBusPostingGroup

ypBcCustomers_genBusPostingGroup

gln

ypBcCustomers_gln

postCode

ypBcCustomers_postCode

county

ypBcCustomers_county

debitAmount

ypBcCustomers_debitAmount

creditAmount

ypBcCustomers_creditAmount

debitAmountLcy

ypBcCustomers_debitAmountLcy

creditAmountLcy

ypBcCustomers_creditAmountLcy

eMail

ypBcCustomers_eMail

homePage

ypBcCustomers_homePage

reminderTermsCode

ypBcCustomers_reminderTermsCode

reminderAmounts

ypBcCustomers_reminderAmounts

reminderAmountsLcy

ypBcCustomers_reminderAmountsLcy

numberSeries

ypBcCustomers_numberSeries

taxAreaCode

ypBcCustomers_taxAreaCode

taxLiable

ypBcCustomers_taxLiable

vatBusPostingGroup

ypBcCustomers_vatBusPostingGroup

currencyFilter

ypBcCustomers_currencyFilter

outstandingOrdersLcy

ypBcCustomers_outstandingOrdersLcy

shippedNotInvoicedLcy

ypBcCustomers_shippedNotInvoicedLcy

reserve

ypBcCustomers_reserve

blockPaymentTolerance

ypBcCustomers_blockPaymentTolerance

pmtDiscToleranceLcy

ypBcCustomers_pmtDiscToleranceLcy

pmtToleranceLcy

ypBcCustomers_pmtToleranceLcy

icPartnerCode

ypBcCustomers_icPartnerCode

refunds

ypBcCustomers_refunds

refundsLcy

ypBcCustomers_refundsLcy

otherAmounts

ypBcCustomers_otherAmounts

otherAmountsLcy

ypBcCustomers_otherAmountsLcy

prepaymentPercent

ypBcCustomers_prepaymentPercent

outstandingInvoicesLcy

ypBcCustomers_outstandingInvoicesLcy

outstandingInvoices

ypBcCustomers_outstandingInvoices

billToNumberOfArchivedDoc

ypBcCustomers_billToNumberOfArchivedDoc

sellToNumberOfArchivedDoc

ypBcCustomers_sellToNumberOfArchivedDoc

partnerType

ypBcCustomers_partnerType

preferredBankAccountCode

ypBcCustomers_preferredBankAccountCode

cashFlowPaymentTermsCode

ypBcCustomers_cashFlowPaymentTermsCode

primaryContactNumber

ypBcCustomers_primaryContactNumber

contactType

ypBcCustomers_contactType

responsibilityCenter

ypBcCustomers_responsibilityCenter

shippingAdvice

ypBcCustomers_shippingAdvice

shippingTime

ypBcCustomers_shippingTime

shippingAgentServiceCode

ypBcCustomers_shippingAgentServiceCode

serviceZoneCode

ypBcCustomers_serviceZoneCode

contractGainLossAmount

ypBcCustomers_contractGainLossAmount

shipToFilter

ypBcCustomers_shipToFilter

outstandingServOrdersLcy

ypBcCustomers_outstandingServOrdersLcy

servShippedNotInvoicedLcy

ypBcCustomers_servShippedNotInvoicedLcy

outstandingServInvoicesLcy

ypBcCustomers_outstandingServInvoicesLcy

allowLineDisc

ypBcCustomers_allowLineDisc

numberOfQuotes

ypBcCustomers_numberOfQuotes

numberOfBlanketOrders

ypBcCustomers_numberOfBlanketOrders

numberOfOrders

ypBcCustomers_numberOfOrders

numberOfInvoices

ypBcCustomers_numberOfInvoices

numberOfReturnOrders

ypBcCustomers_numberOfReturnOrders

numberOfCreditMemos

ypBcCustomers_numberOfCreditMemos

numberOfPstdShipments

ypBcCustomers_numberOfPstdShipments

numberOfPstdInvoices

ypBcCustomers_numberOfPstdInvoices

numberOfPstdReturnReceipts

ypBcCustomers_numberOfPstdReturnReceipts

numberOfPstdCreditMemos

ypBcCustomers_numberOfPstdCreditMemos

numberOfShipToAddresses

ypBcCustomers_numberOfShipToAddresses

billToNumberOfQuotes

ypBcCustomers_billToNumberOfQuotes

billToNumberOfBlanketOrders

ypBcCustomers_billToNumberOfBlanketOrders

billToNumberOfOrders

ypBcCustomers_billToNumberOfOrders

billToNumberOfInvoices

ypBcCustomers_billToNumberOfInvoices

billToNumberOfReturnOrders

ypBcCustomers_billToNumberOfReturnOrders

billToNumberOfCreditMemos

ypBcCustomers_billToNumberOfCreditMemos

billToNumberOfPstdShipments

ypBcCustomers_billToNumberOfPstdShipments

billToNumberOfPstdInvoices

ypBcCustomers_billToNumberOfPstdInvoices

billToNumberOfPstdReturnR

ypBcCustomers_billToNumberOfPstdReturnR

billToNumberOfPstdCrMemos

ypBcCustomers_billToNumberOfPstdCrMemos

baseCalendarCode

ypBcCustomers_baseCalendarCode

copySellToAddrToQteFrom

ypBcCustomers_copySellToAddrToQteFrom

validateEuVatRegNumber

ypBcCustomers_validateEuVatRegNumber

currencyId

ypBcCustomers_currencyId

paymentTermsId

ypBcCustomers_paymentTermsId

shipmentMethodId

ypBcCustomers_shipmentMethodId

paymentMethodId

ypBcCustomers_paymentMethodId

taxAreaId

ypBcCustomers_taxAreaId

contactId

ypBcCustomers_contactId

Delete

The following table lists native fields available for custom configuration of the INVOICE object.

In Business Central, all posted invoices are displayed in the CustomerLedgerEntries transactions journal. To synchronize custom fields at the invoice level in YayPay, you can specify the Business Central invoice journal from which you want to extract the native fields and sync them as custom fields in YayPay.

For example, if a posted invoice in Business Central is shown in the SalesInvoice journal, you can use the field from the Custom Fields: INVOICE table. For example,ypBcSalesInvoice_postingDate

Additionally, for the same invoice, you can also synchronize a native field as a custom field from the CustomerLedgerEntries journal. In this case, use the field from the Custom Fields: INVOICE (transactions journal - CustomerLedgerEntries) table. For example, ypBcCustomerLedgerEntries_Document_Date

Custom Fields: INVOICE

Business Central API Field Name

YayPay Source Field Name

id

ypBcSalesInvoice_id

number

ypBcSalesInvoice_number

externalDocumentNumber

ypBcSalesInvoice_externalDocumentNumber

invoiceDate

ypBcSalesInvoice_invoiceDate

postingDate

ypBcSalesInvoice_postingDate

dueDate

ypBcSalesInvoice_dueDate

promisedPayDate

ypBcSalesInvoice_promisedPayDate

customerPurchaseOrderReference

ypBcSalesInvoice_customerPurchaseOrderReference

customerId

ypBcSalesInvoice_customerId

customerNumber

ypBcSalesInvoice_customerNumber

customerName

ypBcSalesInvoice_customerName

billToName

ypBcSalesInvoice_billToName

billToCustomerId

ypBcSalesInvoice_billToCustomerId

billToCustomerNumber

ypBcSalesInvoice_billToCustomerNumber

shipToName

ypBcSalesInvoice_shipToName

shipToContact

ypBcSalesInvoice_shipToContact

sellToAddressLine1

ypBcSalesInvoice_sellToAddressLine1

sellToAddressLine2

ypBcSalesInvoice_sellToAddressLine2

sellToCity

ypBcSalesInvoice_sellToCity

sellToCountry

ypBcSalesInvoice_sellToCountry

sellToState

ypBcSalesInvoice_sellToState

sellToPostCode

ypBcSalesInvoice_sellToPostCode

billToAddressLine1

ypBcSalesInvoice_billToAddressLine1

billToAddressLine2

ypBcSalesInvoice_billToAddressLine2

billToCity

ypBcSalesInvoice_billToCity

billToCountry

ypBcSalesInvoice_billToCountry

billToState

ypBcSalesInvoice_billToState

billToPostCode

ypBcSalesInvoice_billToPostCode

shipToAddressLine1

ypBcSalesInvoice_shipToAddressLine1

shipToAddressLine2

ypBcSalesInvoice_shipToAddressLine2

shipToCity

ypBcSalesInvoice_shipToCity

shipToCountry

ypBcSalesInvoice_shipToCountry

shipToState

ypBcSalesInvoice_shipToState

shipToPostCode

ypBcSalesInvoice_shipToPostCode

currencyId

ypBcSalesInvoice_currencyId

shortcutDimension1Code

ypBcSalesInvoice_shortcutDimension1Code

shortcutDimension2Code

ypBcSalesInvoice_shortcutDimension2Code

currencyCode

ypBcSalesInvoice_currencyCode

orderId

ypBcSalesInvoice_orderId

orderNumber

ypBcSalesInvoice_orderNumber

paymentTermsId

ypBcSalesInvoice_paymentTermsId

shipmentMethodId

ypBcSalesInvoice_shipmentMethodId

salesperson

ypBcSalesInvoice_salesperson

disputeStatusId

ypBcSalesInvoice_disputeStatusId

disputeStatus

ypBcSalesInvoice_disputeStatus

pricesIncludeTax

ypBcSalesInvoice_pricesIncludeTax

remainingAmount

ypBcSalesInvoice_remainingAmount

discountAmount

ypBcSalesInvoice_discountAmount

discountAppliedBeforeTax

ypBcSalesInvoice_discountAppliedBeforeTax

totalAmountExcludingTax

ypBcSalesInvoice_totalAmountExcludingTax

totalTaxAmount

ypBcSalesInvoice_totalTaxAmount

totalAmountIncludingTax

ypBcSalesInvoice_totalAmountIncludingTax

status

ypBcSalesInvoice_status

lastModifiedDateTime

ypBcSalesInvoice_lastModifiedDateTime

phoneNumber

ypBcSalesInvoice_phoneNumber

email

ypBcSalesInvoice_email

  Delete

Custom Fields: INVOICE (transactions journal - CustomerLedgerEntries)

Business Central API Field Name

YayPay Source Field Name

Entry_No

ypBcCustomerLedgerEntries_Entry_No

Posting_Date

ypBcCustomerLedgerEntries_Posting_Date

Document_Date

ypBcCustomerLedgerEntries_Document_Date

Document_Type

ypBcCustomerLedgerEntries_Document_Type

Document_No

ypBcCustomerLedgerEntries_Document_No

Customer_No

ypBcCustomerLedgerEntries_Customer_No

Customer_Name

ypBcCustomerLedgerEntries_Customer_Name

Description

ypBcCustomerLedgerEntries_Description

SystemCreatedAt

ypBcCustomerLedgerEntries_SystemCreatedAt

SystemCreatedBy

ypBcCustomerLedgerEntries_SystemCreatedBy

UserID

ypBcCustomerLedgerEntries_UserID

YourReference

ypBcCustomerLedgerEntries_YourReference

EDIIDPay

ypBcCustomerLedgerEntries_EDIIDPay

Global_Dimension_1_Code

ypBcCustomerLedgerEntries_Global_Dimension_1_Code

Global_Dimension_2_Code

ypBcCustomerLedgerEntries_Global_Dimension_2_Code

Customer_Posting_Group

ypBcCustomerLedgerEntries_Customer_Posting_Group

IC_Partner_Code

ypBcCustomerLedgerEntries_IC_Partner_Code

Salesperson_Code

ypBcCustomerLedgerEntries_Salesperson_Code

Currency_Code

ypBcCustomerLedgerEntries_Currency_Code

Original_Amount

ypBcCustomerLedgerEntries_Original_Amount

Original_Amt_LCY

ypBcCustomerLedgerEntries_Original_Amt_LCY

Amount

ypBcCustomerLedgerEntries_Amount

Amount_LCY

ypBcCustomerLedgerEntries_Amount_LCY

Debit_Amount

ypBcCustomerLedgerEntries_Debit_Amount

Debit_Amount_LCY

ypBcCustomerLedgerEntries_Debit_Amount_LCY

Credit_Amount

ypBcCustomerLedgerEntries_Credit_Amount

Credit_Amount_LCY

ypBcCustomerLedgerEntries_Credit_Amount_LCY

RunningBalanceLCY

ypBcCustomerLedgerEntries_RunningBalanceLCY

Remaining_Amount

ypBcCustomerLedgerEntries_Remaining_Amount

Remaining_Amt_LCY

ypBcCustomerLedgerEntries_Remaining_Amt_LCY

Sales_LCY

ypBcCustomerLedgerEntries_Sales_LCY

Bal_Account_Type

ypBcCustomerLedgerEntries_Bal_Account_Type

Bal_Account_No

ypBcCustomerLedgerEntries_Bal_Account_No

Due_Date

ypBcCustomerLedgerEntries_Due_Date

Payment_Prediction

ypBcCustomerLedgerEntries_Payment_Prediction

Prediction_Confidence

ypBcCustomerLedgerEntries_Prediction_Confidence

Prediction_Confidence_Percent

ypBcCustomerLedgerEntries_Prediction_Confidence_Percent

Promised_Pay_Date

ypBcCustomerLedgerEntries_Promised_Pay_Date

Pmt_Discount_Date

ypBcCustomerLedgerEntries_Pmt_Discount_Date

Pmt_Disc_Tolerance_Date

ypBcCustomerLedgerEntries_Pmt_Disc_Tolerance_Date

Original_Pmt_Disc_Possible

ypBcCustomerLedgerEntries_Original_Pmt_Disc_Possible

Remaining_Pmt_Disc_Possible

ypBcCustomerLedgerEntries_Remaining_Pmt_Disc_Possible

Max_Payment_Tolerance

ypBcCustomerLedgerEntries_Max_Payment_Tolerance

Payment_Method_Code

ypBcCustomerLedgerEntries_Payment_Method_Code

Open

ypBcCustomerLedgerEntries_Open

Closed_at_Date

ypBcCustomerLedgerEntries_Closed_at_Date

Dispute_Status

ypBcCustomerLedgerEntries_Dispute_Status

On_Hold

ypBcCustomerLedgerEntries_On_Hold

User_ID

ypBcCustomerLedgerEntries_User_ID

Source_Code

ypBcCustomerLedgerEntries_Source_Code

Reason_Code

ypBcCustomerLedgerEntries_Reason_Code

Reversed

ypBcCustomerLedgerEntries_Reversed

Reversed_by_Entry_No

ypBcCustomerLedgerEntries_Reversed_by_Entry_No

Reversed_Entry_No

ypBcCustomerLedgerEntries_Reversed_Entry_No

Exported_to_Payment_File

ypBcCustomerLedgerEntries_Exported_to_Payment_File

Message_to_Recipient

ypBcCustomerLedgerEntries_Message_to_Recipient

Direct_Debit_Mandate_ID

ypBcCustomerLedgerEntries_Direct_Debit_Mandate_ID

Dimension_Set_ID

ypBcCustomerLedgerEntries_Dimension_Set_ID

External_Document_No

ypBcCustomerLedgerEntries_External_Document_No

Your_Reference

ypBcCustomerLedgerEntries_Your_Reference

RecipientBankAccount

ypBcCustomerLedgerEntries_RecipientBankAccount

Delete

Syncing Custom Fields Added Programmatically

The connector can also sync custom fields added into Business Central programmatically.

To be able to do that, you must ensure that such custom fields are included in the response for the following endpoints previously created in your Business Central environment:

Target Endpoint Description
ypBcCustomers For custom fields added at the customer level.
ypBcSalesInvoice For custom fields added at the invoice level.
ypBcCustomerLedgerEntries

Example  

This example provides a sample JSON mapping for native fields. You can customize this sample to include the mapping for custom fields or make any necessary modifications.

{

  "endpointMapping" : {

    "customersObject" : "ypBcCustomers",

    "contactsObject" : "ypBcContacts",

    "companyObject" : "ypBcCompany",

    "currencyExchangeRateObject" : "ypBcExchangeRates",

    "paymentTermObject" : "ypBcPaymentTerms",

    "postedSalesInvoiceObject" : "ypBcSalesInvoice",

    "postedSalesInvoiceLineObject" : "ypBcSalesInvoiceLines",

    "postedSalesCreditMemoObject" : "ypBcSalesCreditMemos",

    "customerLedgerEntriesObject" : "ypBcCustomerLedgerEntries",

    "detailedCustLedgerEntriesObject" : "ypBcDetailedCustLedgerEntries",

    "invoiceBillToContactObject" : "ypBcInvoiceBillToContact",

    "customerBillingContactObject": ypBсdocLayouts

  },

  "dunsNumberCustomField" : null,

  "billingEmailCustomField" : null,

  "syncInvoicePdf" : false,

  "onPremBaseUrl" : null,

  "salesforceErpIdSource": null

}

The highlighted array contains mandatory endpoints that must be configured for a successful synchronization.

The array below is reserved for configuring custom fields.


Business Central® On-Premise

This section summarizes how to configure your on-premise Business Central® application before synchronizing it with YayPay.

Prerequisites:

  1. Prepare your Business Central® environment.

    To learn how to do that, read the following instructions:
  2. Configure your API endpoints in Business Central®.

  3. Enable access to the APIs.

    To learn how to do that, read the following instructions:

When you complete the prerequisite steps, continue by configuring your Business Central® on-premise application:

  1. Log into your Business Central® on-premise application.

  2. In the list of server instances, select the one that you will use for the YayPay synchronization.

  3. Navigate to the General section and set Credential Type to AccessControlService(Office 365).

  4. Generate the web server access key:  
    1. Go to the User Card page and generate the Web Service Access Key using the Web Service Access Key field.


      When generated, use the web service access key as a password on the connector's Settings page in YayPay.

    2. Use the User Name and Web Service Access Key (Basic Auth) fields to connect Odata and APIs in the following step..

  5. Navigate to the OData Servicessection and check the following check boxes:
    • Enable API Services 

    • Enable OData Services 


  6. Click Save to confirm your settings.

  7. Click Restart to restart your Business Central® server instance for the changes to take effect.

After completing the Business Central® configuration, proceed with the configuration on the connector's Settings page in YayPay.


Configure YayPay

This section explains how to configure YayPay to connect to your Business Central® system.

  1. Log into YayPay.

  2. Navigate to Settings | Integrations and click on the Manage Business Systems button located on the right side of the page.

  3. In the Manage Business Systems dialog that opens, select Business Central.

    Click SAVE to confirm the settings.

  4. On the Business Central Connector Settings panel that appears, download JSON mapping by clicking on the Download Current Mapping button. This mapping will be used by the connector to associate API endpoint names with the synchronizing entity types.

  5. Specify the settings needed for the synchronization.

    Depending on the version of Business Central, you will specify the following fields:


    Cloud On-premise
    Client ID Username
    Client Secret Web Service Access Key
    Directory (tenant) ID Server Instance Name


    The following fields are available on the Business Central Connector Settings panel.

    If you click the three dots, you can select the following options:

    Resync Invoices

    Re-syncs both open and closed invoices from Business Central®.

    This is done using nvoice IDs from YayPay as identifiers and retrieving corresponding invoices from Business Central® based on these specific IDs.

    Additionally, this process also resyncs invoice-level custom fields as native fields, creates invoice billing contacts from custom fields, syncs invoice PDFs and invoice-level contacts.

    Delete

    Note

    This process synchronizes invoice PDFs only for open invoices.


    Resync Customers

    Re-syncs all customers from Business Central®.

    This is done by using customers IDs from YayPay as identifiers and retrieving corresponding customers from Business Central®based on these IDs.

    Additionally, this process also resyncs customer-level custom fields as native fields, customer-level contacts, uploads both active and inactive customers, supports parent/child customer relationships.

    Delete

    Note

    If a customer is not found in Business Central® during the resync process, it will be automatically removed from YayPay to maintain data accuracy.

    Test Mode

    If checked, it verifies the connection settings without importing real data.

    This can be useful when setting up or configuring the connection for the first time, as any entered data is stored separately and will not impact real data in Business Central.

    Upload File

    Upload a JSON file containing the mapping fields for Business Central. If you do not upload a JSON mapping file, the connector will use the default mapping from the defaultCustomConfig.json file instead. This mapping is used by the connector to associate API endpoint names with the corresponding entity types for synchronization.

    If you want to change the current mapping, click on Download Current Mapping, make the necessary edits to the mapping according to your needs, and then upload the updated mapping file back to YayPay.

    Clicking on the Preview Mapping button will open the Mapping Preview dialog where you can review the currently used mapping.

    Client ID/Username

    Enter the client ID of your Azure application or username for your on-premise application.

    Company

    Enter the name of your Azure application.

    Environment (cloud)

    Enter the client’s Business Central environment.

    To locate the environment in the Cloud version of your Business Central, go to Information |  Help & Support | Report a problem and look for the value next to Microsoft Entra tenant ID.

    Delete

    Warning

    This field is not used when integrating with the on-premise version of the Business Central application and becomes deactivated once the mapping file with an onPremBaseUrl object is specified.

    Client Secret/Web Service Access Key

    Enter the client secret of your Azure application or the Web Service Access Key value for your on-premise application.

    Directory (tenant) ID/Server Instance Name

    Enter the directory (tenant) ID of your Azure application or server instance name of your on-premise application.

    Step for Delta Sync

    Optionally, enter a numerical value that will be used to divide the retrieved data into batches, based on a specific time period.

    For example, if you enter 5 and select Month for Period, the sync will import data starting from 2015 and split it into batches of 5 months each.

    Period

    Select a time period used for the Step for Delta Sync option.

  6. Click CONNECT and the Sync button to start the synchronization process.

    After the first synchronization, the Last Sync Date value will be replaced with a date-time stamp, and other statuses will indicate that YayPay is still connected to your Business Central system.

  7. Go to the LOGS tab to see the details of the synchronization process.


    Delete

    Tip

    You can also synchronize customer data between Salesforce® and Business Central®. For more details, see Integrating Salesforce® with Business Central®.


Can't find what you need?

Contact our support team support@yaypay.com for help.