Skip to main content

Promofarma® Export

This feature automatically sends posted sales shipments to the Promofarma (Federfarma) e-DDT portal as electronic delivery notes. Only shipments for customers (pharmacies) enabled for the service, both in Business Central and on the Promofarma portal, are sent.

The integration is based on Document Exchange Profiles: you create a profile with the Promofarma format and configure its setup.

  1. Open Document Exchange Profiles and create a profile with the Promofarma format.
  2. From the profile, open Setup: the Promofarma Setup page opens.
  3. Fill in the fields described below.
Field Description
Profile Code Document exchange profile the setup refers to (read-only).
Username User name for the Promofarma e-DDT portal.
Password Password for the portal (stored securely and shown masked).
Last Customer Check Date of the last download of enabled pharmacies from the portal. Must be filled in: the next check starts from this date and automatically updates it to today.
Send Shipment From Date Starting posting date of the shipments to send. Mandatory.
Shipment Date Delay Date formula applied to today to determine the latest posting date of shipments to send (e.g. -1D to skip today's shipments).
Web Service Delay (sec.) Pause, in seconds, between one upload and the next, to avoid overloading the portal.
Field Description
Document No. Number of a posted sales shipment to use with the Download e-DDT - Test action.
Action Description
Reset Sales Shipment Status Opens a filter on posted sales shipments; for the filtered shipments with Sent to Promofarma = Error, the status is cleared so they are sent again at the next run.
Clear Enabled Customers After confirmation, clears the list of enabled pharmacies stored in Business Central.
Download Enabled Customers Downloads the updated list of enabled pharmacies from the portal and saves it to a customers.json file.
Download e-DDT - Test Generates the electronic delivery note (XML) for the shipment entered in Document No. and downloads it as shipment.xml, without sending it.

The Customer Card includes these fields:

Field Description
Promofarma e-DDT Enabled Indicates that the customer's shipments must be sent to Promofarma.
Promofarma e-DDT Since Service activation date for the customer. Shipments from years before this date's year are not sent.

The customer must also have the Health Tracking Code filled in, which is used to match the customer in the portal's list of enabled pharmacies.

Posted sales shipments have the Sent to Promofarma field, with these values:

Value Meaning
(blank) Shipment not yet processed.
Yes Shipment sent successfully.
No Shipment processed but not sent because the customer was not enabled or there were no lines to send.
Error Upload failed; the error details are recorded in the document exchange profile log.

Shipments are sent when the document exchange profile is processed (manually or through the job queue). During processing:

  1. The list of enabled pharmacies is updated from the portal, starting from Last Customer Check.
  2. Shipments with blank Sent to Promofarma and a posting date between Send Shipment From Date and the date calculated with Shipment Date Delay are examined.
  3. A shipment is sent only if the bill-to customer:
    • has Promofarma e-DDT Enabled turned on and Promofarma e-DDT Since filled in, with a year not later than the shipment's year;
    • is enabled on the Promofarma portal for the shipment's year (via the Health Tracking Code);
    • and the shipment contains lines with a quantity.
  4. When a customer is enabled, all of their shipments of the same year not yet sent (status blank or No) within the configured date range are sent.
  5. Each shipment is marked Yes if sent, Error if the upload fails (with a log entry), or No if it must not be sent.

The electronic delivery note includes sender, recipient, item lines and, where available, lot numbers and expiration dates.