Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Business Central Punch-Out implementation with cXML

Posted on by 10
Hi Folks,
I'm currently working on developing and interface in Business Central with an external supplier who has an e-commerce.
For them the standard why to interact with external systems is with a punch-out connection with cXML.
The problem itself is not handle the cXML but the way their system response since they sand back data using a web browser post without any authentication.
I don't actually know how to handle it, we are on SaaS environment so we have the 2Auth mandatory on our API/Web Services.
Looking online for some hints I saw that for authentication for punch-out it's usually used something like a /cookie way/, but I don't know how to implement that.
According to this documentation https://punchoutcommerce.com/guides/punchout/cxml-punchout-setup-request/ we have to provide a URL that they can call with a POST call.
As I said the problem is how to handle the authentication. 
The supplier has already developed an integration with Microsoft AX but obviously is not the same for Business Central and the documentation they provided is not enough for us.
In general how is the correct way to manage a punch-out connection in business central?
Anyone may have developed a some kind of connectors for this interface?
Thanks in advance
Luca
 
Categories:
  • Manish Sharma Profile Picture
    Manish Sharma 38 on at
    Business Central Punch-Out implementation with cXML
    Did you find any solution to this ?
  • Community member Profile Picture
    Community member 10 on at
    Business Central Punch-Out implementation with cXML
    Hi Zhu,
    thank you for the response but I think there is a misunderstanding.
    We don't call a URL of the supplier but we have to provide them our own URL for receive the cXML.
    I'll try to explain better the punch-out process:
    - We do a web service call to the SUPPLIER (ex. www.example.com/sendPunchOutSetup)
      In this call we provide an XML body with some information like the username/password and is mandatory to provide a URL where they will send back the chart with the items in cXML format.
    - The supplier return a response with a URL of their e-commerce with an active session (www.example.com/?sysid=SESSIONID)
    - We open the URL (with a simple HYPERLINK) that opens a web page to the e-commerce with the already logged in user.
    - The user can add items to the chart and buy stuffs, but when he tries to check-out instead of go to the payment page it calls our URL to send back the cXML with the url that we provided in the first step.
     
    Try to imagine like I have an Amazon account, I call an Amazon web service with my credentials, Amazon send back a URL that opens a page with my session and my user already logged in.
    I buy everything I want and when I try to check out instead of prompt me to the payment form it just call my web service to send me back the data of the items.
    The problem is here, the call they do to our URL is without any authentication, they don't handle it, the punch-out standard doesn't handle it.
    Punch-out standard seems to work with a cookie authentication.
    So I don't know how to figure this out since with SaaS env the 2Auth is mandatory. 
    We tried with an Azure function without authentication but our customer is not satisfied because is not secure, the only way seems to be the cookie auth approach but how it that possible with BC or Azure functions?
     
    Thanks again for the help.
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,472 Super User 2024 Season 2 on at
    Business Central Punch-Out implementation with cXML
    Hi, in other words, the partner's data is completely public? Can you access it without any authentication?
    In BC, the following methods are mainly used to obtain external data.
     
    If no authentication is required, you should be able to obtain it directly.
    For example,
    Get Picture from public URL:
    Get IP Address from free wev service:
     
     
    Hope this can give you some hints.
    Thanks.
    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans