Customer Portal

Our Customer Portal module lets you easily add extra menu options in the 'My Account' section. These new menu options display real-time information from Microsoft Dynamics 365 Business Central. This gives your customers direct access to documents that your staff would otherwise have to handle manually.

 

Features

  • Display Business Central customer-related data of your choice in the account section
  • Display general ERP data such as orders, invoices, shipments, RMAs, and credit limit information
  • Quickly place repeat orders for previously placed orders
  • Connect to any Business Central table you need, depending on the information you want to display online.
  • Allow your customers to download PDF files of the displayed information online, such as an invoice, packing slip, and order confirmation
Interactive guide

 

Business Central

Install the Tinx Customer Portal extension via AppSource and follow steps 1 and 2 (optional) of the step-by-step guide shown above.

 

Magento

Install the Tinx Customer Portal Magento extension. If you don't have access to our extension, please reach out to our support department: support@tinx-it.nl. They can provide you with a composer key to use our extension.

Installation (Composer)

Add the following custom repository to your project's composer.json:

{
"repositories": [
{"type": "composer", "url": https://tinxit.repo.packagist.com/YOUR_TINX_USERNAME/}
]
}

Store the authentication credentials in your global Composer auth.json with the command below.

composer config --global --auth http-basic.tinxit.repo.packagist.com token YOUR_TINX_CUSTOMER_PORTAL_TOKEN

Configuration

In the Magento backend, go to Stores > Configuration. In the Tinx-IT tab, click on Tinx Customer Portal BC. In the configuration, you can find the following fields:

  • Field Explanation
    URL to Access Token service

    URL Magento uses to get an OAuth token from Business Central.

    Example: https://login.microsoftonline.com/GUID/oauth2/v2.0/token

    GUID: tenantGuid (see screenshot).

    Access token expires (UTC) Read-only: Tells Magento when to request a new token from Business Central.
    URL to Business Central *

    URL Magento uses to get document data from Business Central.

    The Web client URL has the following syntax: 
    https://api.businesscentral.dynamics.com/v2.0/GUID1/
    TinxDevelopment/api/ENVIRONMENT/customerPortal/v2.0/
    companies(GUID2)/
    Don't forget the trailing slash (/).

    GUID1: tenantGuid (see screenshot).
    ENVIRONMENT: environmentName (see screenshot).
    GUID2: companyGuid. Go to Business Central and Search for the company you want to connect to. Enter companies in the search bar, select Companies, select the company, and open the page inspection tool (CTRL+ALT+F1) (see screenshot).

    URL to PDF Codeunit

    URL Magento uses to download PDF documents from Business Central.
     

    The Web client URL has the following syntax: 
    https://api.businesscentral.dynamics.com/v2.0/GUID/
    ENVIRONMENT/WS/COMPANY/Codeunit/printPDF

    GUID: tenantGuid (see screenshot).
    ENVIRONMENT: environmentName (see screenshot).
    COMPANY: companyName (see screenshot).

    Multiple API URLs?

    Use this setting if you want to connect with multiple Business Central companies from one Magento website.

    NAV Company code: Company identifier of the Magento customer (see screenshot).
    Full Business Central API URL: Specify the URL to Business Central *

    Client ID

    The Client ID is a unique identifier for your application within Microsoft Entra ID. It tells Business Central which application is requesting access. You can find this value in the App registrations section of the Azure portal.

    See step 1 of the step-by-step guide.

    Client Secret

    The Client Secret acts as a secure password for your application. It proves to Microsoft Entra ID that the request comes from a trusted, authorized app. You create the Client Secret in the Certificates & secrets section of your app registration in the Azure portal.

    See step 1 of the step-by-step guide.

    Customer Attribute Customer identifier (Business Central Customer No.) of the Magento customer (see screenshot).
    Records limit

    Meant for pagination in Magento, how many records should be shown per page?

    Functionality is currently not working

    Menu item label

    Functionality is currently not working

    Column names with currency format

    Separate multiple currency column names by comma (,).

    Functionality is currently not working

    Display currency sign

    Displays the currency sign when showing prices on the frontend.

    Functionality is currently not working

    Date Format

    Specifies the date format for dates.
     

    Use Y for 4 digit year and y for 2 digit year
    Use d to display day of month (01-31)
    Use m to display month number (01-12)
    Use M to display month name (Jan to Dec), etc...
    Examples: Y-m-d, m-d-Y

    Customer Portal Menu block heading

    Functionality is currently not working

  • We created the following sales document * API pages in Business Central: Sales Orders, Sales Invoices, Sales Shipment, Sales Credit Memo, and Return Receipt Headers. Those pages are used by the Customer Portal extension as a default to retrieve real-time information from Business Central. 


    Field Explanation
    Enable Sales document * menu? Determines whether to activate the specific sales document functionality to retrieve orders from Business Central in real time.
    Label Title of the menu item in the customer account section.
    Which columns should we display? If empty, all columns will be shown.

    Use this if you want to specify which columns you want to display for this specific sales document header. The field identifiers (comma-separated) should match Business Central's response. To see the Business Central response, use an application like Postman. See our Postman section if you want to know how.

    For sales orders, you can use the following example:
    no,yourReference,orderDate,shipTo,amount,tinxWebshopStatus

    Display Sales Order Lines?

    Determines whether to activate the specific sales document functionality to retrieve sales lines in real time from Business Central.

    Subform-link display as: determines how to display the dropdown text button for sales lines to your customers (you can use any character).

    Which order line columns should we display? If empty, all columns will be shown.

    Use this to specify which columns you want to display for this sales document's sales lines. The field identifiers (comma-separated) should match Business Central's response. To see Business Central's response, you can use an application like Postman. See our Postman section if you want to know how.

    For sales orders, you can use the following example:
    documentNo,itemNo,quantity,description,tinxWebshopStatus

    Display PDF Button?

    Determine if you want to display a PDF button per sales document.

    PDF Icon: Should the link to the PDF be displayed as an Icon? If you select 'No', it will be visible as a text link.

    What PDF function should we call? Determine which PDF function the sales document should use to download the PDF in Business Central. The following functions are supported:

    • PrintPDFOrder (Sales Orders)
    • PrintPDFInvoice (Sales Invoices)
    • PrintPDFShipment (Sales Shipment)
    • PrintPDFCredit (Sales Credit Memo)

    In order to use the PDF functionality, you should publish a specific codeunit in Business Central. Go to Business Central. Type in the search bar ‘web services’, click on ‘Web Services’, and click on New. The Object Type is 'Codeunit', Object id is '11205880' (TINX CPM General Functions) and the Service Name: 'printPDF' and publish the web service.

    Display ReOrder button?

    Add a ReOrder button per sales document to reorder previous items.

    Label to display on ReOrder button: Define how to display the text button to your customers (you can use any characters).

    Label to display on ReOrder column: Define the column title to your customers (you can use any character).

    SKU column alias to be used to reorder item: The SKU field identifier. It should match the Business Central response (document sales lines). For example: itemNo.

    Quantity column alias to be used to reorder item: The quantity field identifier. It should match the Business Central response (document sales lines). For example: quantity.

    ID column alias to be used to reorder a complete order: The Business Central sales document No. identifier. For example: Document_No or No.

    To see the response from Business Central, you can use an application like Postman. See our Postman section if you want to know how.

    Who can see this menu item?

    Table to configure the permissions for who can see this menu item. If no permissions are set, everyone can view it.

    You can create your own conditions based on customer attribute values.

    Functionality is currently not working

    What is the column name for default alphabetical A > Z sorting?

    Which field identifier do you want to use for sorting the sales document table in the customer account?

    Functionality is currently not working

    What is the default sort direction for the column?

    Determine whether the sales document table should sort ascending or descending (based on the field identifier).

    Functionality is currently not working

    E-mail Button

    Give per sales document the customers the ability to reach out to a salesperson.

    Add an extra column with an email button: Decide whether you want to use this functionality.

    What label should the column have? Define the column title to your customers (you can use any character).

    What label should the button have? Define how to display the text button to your customers (you can use any character).

    What would the receiving address be? Define per sales document, who should receive the e-mail.

    What would the subject of this e-mail be? Define per sales document the subject of the e-mail.

    What would the body of this e-mail be? Define per sales document the body of the e-mail.

  • If your implementation requires more than our standard Business Central sales document API pages, We've got you covered. We added three options in our Customer Portal extension to access a custom API page. Please use the Microsoft documentation to do so.

    Field Explanation
    Enable custom menu? Determines whether to activate the custom menu functionality to retrieve real-time data from Business Central.
    Label Title of the menu item in the customer account section.
    URL of service EntitySetName value of the custom API page.
    filter field Specify the Customer No. (Business Central) identifier field.
    Which columns should we display? If empty, all columns will be shown. Use this if you want to specify which columns you want to display for this specific sales document header. The field identifiers (comma-separated) should match the Business Central response.
    Who can see this menu item?

    Table to configure the permissions of who can see this menu item. If no permissions are set, everyone can view it.

    You can create your own conditions based on customer attribute values.

    Functionality is currently not working

    What is the column name for default alphabetical A > Z sorting?

    Which field identifier do you want to use for sorting the sales document table in the customer account?

    Functionality is currently not working

    What is the direction for the default sort column?

    Determine whether the sales document table should sort ascending or descending (based on the field identifier).

    Functionality is currently not working

    E-mail Button

    Give per sales document the customers the ability to reach out to a sales person.

    Add extra column with e-mail button: Determine if you want to use this functionality.

    What label should the column have? Define the column title to your customers (you can use any character).

    What label should the button have? Define how to display the text button to your customers (you can use any characters).

    What would the receiving address be? Define per sales document, who should receive the e-mail.

    What would the subject of this e-mail be? Define per sales document the subject of the e-mail.

    What would the body of this e-mail be? Define per sales document the body of the e-mail.

Postman (optional)

Postman is a standalone software testing API (Application Programming Interface) platform to build, test, design, modify, and document APIs. You can use Postman to test and see which field identifiers are available in the API pages. You can download Postman here.

To make things easier, we prepared a Postman collection. You can download the collection here. This will help you set up a Postman configuration to connect to Business Central. To set this up, please follow the steps below:

 

Related to