Sales Channel Integrations: EBay

Sales Channel Integrations: EBay

Introduction
The eBay Retailer Integration connects to the eBay Fulfilment API to import valid orders on eBay into the Kornit X Sales Module. The Fulfilment API requires the client to have a active eBay Selling account on which items to be sold are listed and orders placed by a buyer are retrieved. The order is generated when a buyer makes a purchase and successfully completes the checkout process. 

Setting up a Ebay Developer Account
Please Note: The Ebay Developer account setup only needs to be done once. The credentials (i.e Client ID, Client Secret Key and Redirect Uri) can be re-used for different clients.

We already have a Kornit X Ebay Developer account which has all the necessary credentials. Any client wishing to connect to our Ebay API integration should use these credentials. Each client can either accept or decline access when the integration attempts to connect to their Ebay seller's account. Please contact the support team or your Implementation/Support contact for more details.

Production (and or sandbox) application keys to the eBay APIs can be obtained from the Ebay Developer's Program. Once an account is setup on the Ebay developer's program and the name of the application is registered, the OAuth credentials which consist of a Client ID and a Client Secret can be  requested. These keys are used to generate the user access tokens needed for the application to access the Ebay APIs.

The request to obtain access tokens for the application also requires a redirect_uri value (also referred to as 'RuName'). The RuName value which is displayed on the 'Get a Token from eBay via Your Application' box on the Ebay developer's program can be configured to hold different values for the acceptURL and the rejectURL fields in the box. The application is redirected to one of these URLs when a permission is granted or declined by the client. When these fields are not specified, the default eBay URLs are used.

The Fulfilment API uses the 'authorization code grant' to obtain a user access token. This is a two step process that combines a consent request with an authorization code grant request

Obtaining Consent and the Access Tokens
The permission required for the application to access and retrieve orders is provided by the client with the selling account on which the orders exist. Please follow the below steps to request and obtain the consent code:

 - Access the Ebay developer's program and ensure the 'Your auth accepted URL' field on the 'Get a Token from eBay via Your Application' box is populated with the url https://oms.custom-gateway.net/v2/settings/companies-pre-alpha/ebay-landing.

Kornit X Platform Settings and Authentication
Obtain the integration credentials namely the Client ID, Client Secret Key, and Redirect Uri.

In the platform, select the client this retailer integration is for on the companies settings page and click the 'Retailer Connections' button to access the various integrations. Select eBay from this list and this should display the settings popup for the client.

 Enter the 'Client ID', 'Client Secret Key' and the 'Redirect Uri (RuName)' values in their respective fields and save.

Open up the settings popup again and click on the Request Ebay Token Data button to request for the third party consent code and also the access tokens. This will redirect the user to the Grant Application Access page login where the third party user or seller can log in with the seller account details. Once logged in, the seller can give consent by clicking the Agree button on the page. Please note if the 'Agree' button is not present, just logging in may be sufficient to give consent.

 Once consent is given, the application is redirected back to the companies settings popup. The 'API Access Token' and the API Refresh token fields along with their respective expiration timestamp fields should now be automatically populated.

The 'Last Order Creation DateTime' field should also be automatically populated with the current date and time. This field represent the date and time to start retrieving orders. Any orders before this date are ignored and will not be fetched from the eBay API. This field can therefore be modified as required.

Once all fields are populated as required, the settings can be saved by clicking on the 'Save' button.

Please note that the 'API Access Token' is only valid for about 2 hours. The integration automatically refreshes the access token if any attempt is made to fetch orders from the API after the 2 hours has expired. The API Refresh Token is valid for about two years. If the current timestamp exceeds the Refresh Token Expiration timestamp, a fresh request will have to be made again by clicking the 'Request Ebay Token Data' button.

Authentication Settings Summary
The authentication fields provided in the settings for the integration are thus:
1. Client ID - Obtained from the eBay Developer's program
2. Client Secret Key - Obtained from the eBay Developer's program
3. Redirect Uri(RuName) - Obtained from the eBay Developer's program.
4. Third Party Consent Code - Generated by the application once the third party user or seller gives the permission grant
5. Api Access Token - Generated by the application
6. Access Token Expiration Timestamp - Generated by the application
7. Api Refresh Token - Generated by the application
8. Refresh Token Expiration Timestamp - generated by the application.

Obtaining Consent and the Access Tokens The Fulfilment API
Getting Orders from eBay

Once a valid access token is obtained, orders made on the sellers account can be retrieved from eBay.  The orders retrieved have the status NOT_STARTED and a creation date greater than or equal to the creation date of the last order retrieved from eBay. The 'Last Order Creation DateTime' is also a field in the application settings and can be modified as required. However this date is updated after every order retrieved from eBay. The status is specified internally in the application and cannot be altered from the application settings. Any orders that do not meet these criteria are ignored by the application.

For the orders to be successfully saved on the platform there needs to be a mapping set up between the fulfiller and the Sales Channel. Please see the document CPP/OMS 'Company' Hierarchy  for more on how the mapping works. The Product Supplier and the Order Destination fields will need to be completed on the application settings.

The items returned in the order by the API also contain personalisation information that may have been provided by the buyer. This information is saved in the item attributes.

Sending Shipping Fulfilment Information
Once the order is dispatched , the ebay Fulfillment API is notified and the order on the seller's account is updated as dispatched. The order is also updated on the platform as 'Dispatched Notified'.


    • Related Articles

    • Sales Channel Integrations: CDiscount

      Introduction The CDiscount Retailer Integration connects to the CDiscount Marketplace API to import valid orders on CDiscount into the Kornit X Sales Module. The API requires the client to have a active CDiscount Seller account on which items to be ...
    • Sales > Feeds: Ebay

      This feed will generate the required basic details for an ebay import. For an understanding on the meaning of the fields please refer to Ebays own documentation - LINK Here you can generate a CSV feed from product data for Ebay. To run the Feed you ...
    • Sales Channel Integrations: Generic FileSystem

      The Kornit X Platform allows orders to be created by uploading specificaly formatted CSV files to an SFTP site. The standard CSV format is explained below but custom formats can also be used. This article will explain how to configure such ...
    • Sales Channel Integrations | Mirakl

      Introduction The Kornit X platform has been connected to Mirakl via an integration which allows orders to be pulled into the Sales Module. Users can enable this on Sales Channel company types to connect and use this.  To contact Mirakl about working ...
    • Sales Channel Integrations: Channel Advisor

      Introduction The Kornit X platform has been connected to Channel Advisor via an integration which allows orders to be pulled into the Sales Module. Integration Setup To set this up please enter the required connection credentials and options and ...