Claimlane Integration Documentation

Version 1 - setup and everyday use in Business Central.

You are reading Version 1. Check Implementation Model in Claimlane Integration Setup and use the matching guide. This refers to the implementation model, rather than the installed extension's release number.

V1 uses Suppliers, Brands and separate B2B/B2C ticket pages. Screenshots below show legacy V1 setup; some fields are hidden in newer releases. For Data Sources and line-based B2B Outcomes, use Version 2 documentation.

Last updated:

Setting up Claimlane

Before you can start using Claimlane Integration, you need to have a Claimlane account. If you don't have one yet, you can sign up for an account at claimlane.com.

Once you have your Claimlane account, you'll need to generate an API key to connect your account to Business Central. You can request one through your Claimlane contact. Your contact can also help you set up Claimlane so the integration works properly.

Create Internal and Flow Tags

Internal and Flow tags are used to map data between Business Central and Claimlane. A rule for most of these tags in Claimlane is, that the Technical Label is what is the link between Claimlane and BC. For B2B, you create the tags this way:

  1. In Claimlane, click the icon with the 4 squares to the top right and select "Data Management".
  2. Click the three dots next to the data source you wish to edit and click "Configure".
  3. Click the "General Tags" button in the menu.
  4. Create a flow tag called "Invoice Number" of type "Input". Flow tags are filled in by the end-user. This tag is what is used to find the invoice in BC in order to find correct price, apply entries and more. Click the "Missing translation" link to the right of the name and fill in the technical label with the value "invoice-number". Note: the technical label must have this value.
  5. Go to internal tags and create the following tags:
    • Claim Reason (Required) - type "Single select" - technical label can be whatever you want here. But write it down, you will need it in the BC setup. Click on "Manage options" and add the return reason codes you want to use. Remember to add technical labels: in this case, they need to be the same as the return reason code in BC.
    • Return Reason (Required) - type "Single select" - technical label can be whatever you want, but it must be the same as the one used in Claim Reason. Remember to add technical labels for options.
    • Price Reduction (optional) - type "Single select". Used for doing price reductions, e.g., if you want to be able to give customers a price reduction of the original invoiced price. When adding options, the technical labels must be numbers only.
    • Unit Price (optional) - type "Input". Used for crediting a certain price on the credit memo. This is unit price, not amount.
  6. To enable the tags, you must go to the corresponding Request type rule and click the checkmark in "Enable".

Return Reason Technical Labels

The selected Claimlane option's Technical Label must match a Return Reason Code in Business Central. For example, an option with Technical Label 01 maps to Return Reason Code 01. The option's displayed name can be different.

Tag Technical Label identifies the tag containing the reason. Enter that label in Return Reason Tag Label in Claimlane Integration Setup. Option Technical Label identifies the selected reason within that tag and is matched against the Business Central Return Reason Code. These are two separate labels: for example, the tag can be return-reason while its selected option is 01.

In V1, use the same Tag Technical Label for the Claim Reason and Return Reason tags, as described above. Give each reason option the matching Business Central code.

Claimlane reason option with Technical Label 01 beside its displayed description
The Claimlane option Technical Label must match the corresponding Business Central Return Reason Code.

Above tags are for B2B returns and claims. To setup tags for B2C, go to "Manage Company" - "Data Sources", click the 3 dots next to the data source you wish to edit and click "Configure". Click the "General Tags" button in the menu. Create the tags that you need to use. Only claim and return reasons are relevant for this integration.

Create Product Data Blueprint

Product data is used to map products between Business Central and Claimlane. To create a product data blueprint:

  1. In Claimlane, click the icon with the 4 squares to the top right and select "Data Management".
  2. Click the three dots next to the data source you wish to edit and click "Configure".
  3. Click the "Product Data" button in the menu, click on "Product upload" and then on "Data blueprint"
  4. Create a product data blueprint by adding the fields you want to use for mapping products. You can add fields such as "Item", "Color", "Size". Also remember to set a Technical Label (used in setup in BC). An example could be
    Claimlane product data blueprint with Style, Color and Size fields
    Example of the Claimlane product data blueprint used by V1 product mappings.
  5. The data blueprint is what the user see in the frontend - how they choose which item to return or claim. In Business Central, one field can be a combination of multiple fields from different tables. You can read more below.

Create Statuses

Statuses are used to track the progress of a return or claim. To create statuses:

  1. In Claimlane, click the settings icon in the retailer inbox.
    Claimlane inbox status configuration
    Version 1: Statuses.
  2. Add at least these 4 statuses: Ready, In Progress, Error, Done. You can call them whatever you want. Write down the ID's found by hovering over the "i" icon.
  3. The status ID's are put in Claimlane Integration Setup in BC. See "B2B" section.
  4. The same is done for consumer inbox if B2C integration is used.

Installation

Follow these steps to install Claimlane Integration in Microsoft Dynamics 365 Business Central.

In Business Central, search for Extension Marketplace. Once Marketplace has opened, search for "Claimlane Integration" and follow the on-screen setup guide.

You can also install the extension directly from the Microsoft AppSource.

Configuration in BC

Customize Claimlane Integration to match your business processes and requirements.

We recommend that you use the Assisted Setup wizard to configure Claimlane Integration. Select Version 1 in Implementation Model. To access the wizard, go to Assisted Setup in Business Central and follow the steps. See below for setup field definitions.

General Setup

Version 1 General Setup in Business Central
Version 1: General Setup.

Company API Key
Your Claimlane API key is required to connect your Claimlane account to Business Central. You can find your API key in your Claimlane account settings or request one through your Claimlane contact.

Company Identifier
The identifier for the company. You can use this to differentiate your tickets between multiple companies, if you do not have a Claimlane instance per company. It is recommended to have one Claimlane instance per company, and therefore separate API keys.

Debug Mode
If set to Yes, the requests and response objects will be saved in the Claimlane Communication Log. This is useful for debugging purposes.

Create Whse. Documents
If set to Yes, the system will create warehouse documents for return orders, if location requires receipt.

Return Reason Tag Label
Defines which tag to use to find return reason on the item. This is required in order for the integration to work.

Price Reduction Tag Label
Defines the tag to use to find price reduction on the item. This is optional.

Price Reduction Type
Defines the type of price reduction. Options are G/L Account, Charge (Item) and Item. It is recommended to use Charge (Item).

Price Reduction No.
Defines the no. of the price reduction chosen in the Type.

Item Sync Setup

Version 1 Item Sync Setup in Business Central
Version 1: Item Sync Setup.

Enable Item Sync
Enables synchronization of items between BC and Claimlane.

Max Product Request Size
The maximum size of product data that can be uploaded to Claimlane per request. This is used to split up large product data sets into multiple requests.

Full Override Next Item Upload
Historical V1 option, now hidden and deprecated. Do not use this as an instruction for current synchronization.

Brand Table No.
Historical V1 field, hidden in current setup. Configure the brand-specific Item Sync Filters instead.

Brand Item Field No.
Historical V1 field, hidden in current setup. Configure the brand-specific Item Sync Filters instead.

For additional setup, see "Item Sync. Filters" below.

Customer Sync Setup

Version 1 Customer Sync Setup in Business Central
Version 1: Customer Sync Setup.

Enable Customer Sync
Enables synchronization of customers between BC and Claimlane.

Max Invite Request Size
The maximum size of customer invite data that can be uploaded to Claimlane per request. This is used to split up large invite data sets into multiple requests.

B2B E-mail Field
Select what field on the customer the email address should be copied from when creating Claimlane Retailers. The value can be changed in the Claimlane Retailer list.

Enable Invoice Sync
Enables synchronization of invoices between BC and Claimlane Data Sources.

Use Base Unit
If set to Yes, the system will use the base unit of measure for the item when syncing invoices. If set to No, the system will use the unit of measure on the invoice line.

Max Invoice Request Size
The maximum size of invoice data that can be uploaded to Claimlane per request. This is used to split up large invoice data sets into multiple requests.

For additional setup, see "Sales Invoice Filters" below.

B2B

Version 1 Assisted Setup in Business Central
Version 1: Assisted Setup.

Enable B2B Tickets
Legacy option shown in older V1 releases. Current V1 setup uses Enable B2B Claims and Enable B2B Returns.

B2B Tickets to Sync
Legacy selector in older V1 releases; use the separate enable fields in current V1 setup.

B2B Order Missing Action
Defines what should be done if no related invoice can be found in the system.

Find Customer by Name
If set to true, system will attempt to find a customer by name if no customer number is found in data from Claimlane.

B2B Price Application
Defines what should be done if no price can be found from the matching invoice.
First: Uses unit price from the first found invoice line on the customer. Latest: Uses unit price from the latest invoice line.

Invoice No. Tag Label
Defines which tag to use to find item price based on Invoice No. If not set or not filled, the system will fallback to order no. logic. Has to be invoice-number if invoice flow is enabled.

Unit Price Tag Label
Defines which tag to use to find unit price on the item. If Unit Price is set in Claimlanem, it will override price found in BC.

Auto Application
If set to true, the system will automatically try to apply the credit memo or return order to the customer ledger entry of the invoice.

Statuses
Defines the statuses used in Claimlane. The ID's are found in Claimlane settings.

B2B Return Action
Defines what should be done when a return order is created. Options are Do Nothing, Release, Send for Approval or Post. Recommended action is "Release".

B2B Return Location Code
Defines the location code to use when creating a return order. Will override default location code set on return reasons.

B2B Claim Action
Defines what should be done when a claim is created. Options are Do Nothing, Release, Send for Approval or Post. Recommended action is "Post". "Do Nothing" can be used in the beginning to check if everything is working as expected.

B2B Claim Location Code
Defines the location code to use when creating a claim. Will override default location code set on return reasons.

B2C

Version 1 B2C Setup in Business Central
Version 1: B2C Setup.

Enable B2C Tickets
Legacy option shown in older V1 releases. Current V1 setup uses Enable B2C Claims, Enable B2C Returns and Enable B2C Cancellations.

B2C Tickets to Sync
Legacy selector in older V1 releases; use the separate enable fields in current V1 setup.

B2C Order Missing Action
Defines what should be done if no related invoice can be found in the system.

Return Label Item No.
Defines the item number to use when creating a return label lines.

Statuses
Defines the statuses used in Claimlane. The ID's are found in Claimlane settings.

B2C Return Action
Defines what should be done when a return order is created. Options are Do Nothing, Release, Send for Approval or Post. Recommended action is "Release".

B2C Return Location Code
Defines the location code to use when creating a return order. Will override default location code set on return reasons.

B2C Claim Action
Defines what should be done when a claim is created. Options are Do Nothing, Release, Send for Approval or Post. Recommended action is "Post". "Do Nothing" can be used in the beginning to check if everything is working as expected.

B2C Claim Location Code
Defines the location code to use when creating a claim. Will override default location code set on return reasons.

Additional setup

V1 uses Suppliers and Brands, with separate Claimlane B2B Tickets and Claimlane B2C Tickets. In Claimlane Integration Setup, use Get Suppliers to retrieve Suppliers, Brands and product identification mappings. Configure the legacy filters and mappings below for the workflows you enable.

Sales Invoice Filters

Version 1 Sales Invoice Filters in Business Central
Version 1: Sales Invoice Filters.

Sales invoice filters are used to filter what invoices should be synced to Claimlane (if "Enable Invoice Sync" is set to Yes). You might not want to sync all invoices, eg. only sync B2B invoices.
Sales Invoice Filters are located in Claimlane Integration Setup under "Related".

Item Sync. Filters

Version 1 Item Filters in Business Central
Version 1: Item Filters.

Item filters are used to filter what items should be synced to Claimlane (if "Enable Item Sync" is set to Yes). You might not want to sync all items, eg. only sync items with a certain brand, only PCS unit of measure, only active items etc.
Item Sync. Filters are located in Claimlane Suppliers as they are linked to each supplier.

Product Identification Mapping

Version 1 Product Identification Mappings combining Item No. and Description for style and Item Variant fields for color and size
Example of a Version 1 Product Identification Mapping using Item and Item Variant fields.

Product identification mapping is used to map product data between BC and Claimlane. This is used to map the product data blueprint in Claimlane to the item card in BC. The mapping is done by using the technical label of the tags in Claimlane and the field no. in BC.
Product Identification Mapping is located in Claimlane Brands (can be found by search or in Claimlane Suppliers).

V1 Product Identification Mapping maps Business Central fields to Claimlane product properties. Multiple fields can map to the same Property. Placement controls the order in which their values are combined, separated by a space. In this example, style combines Item No. at Placement 1 and Description at Placement 2. Item Variant fields can also be used: the example maps color and size from Item Variant fields, with two values combined for color.

In Version 2, this functionality is replaced by Data Blueprint configuration.

The data blueprint is downloaded when clicking "Get Suppliers" in Claimlane Integration Setup, along with list of suppliers and brands.

Invoice Lines and Special Refund Handling

Special Items

Open Special Items from Related in Claimlane Integration Setup. These identify invoice lines such as freight, rounding lines, gift cards or other non-standard items that need different handling from ordinary merchandise.

Special Items are supported in V1 B2B/B2C and V2 B2C invoice refund processing. V2 B2B line Outcomes do not use this additional-refund flow.

  • Type and No. identify the original invoice line. Supported types are Item, Charge (Item), G/L Account and Resource.
  • Exclude from Calculation excludes the matching line from the ordinary invoice amount comparison used to determine whether the merchandise has been fully credited. It does not delete the invoice line.
  • Create on B2B Claims and Create on B2B Returns select the V1 B2B documents where eligible special lines are added. Create on B2C Claims and Create on B2C Returns select the corresponding B2C documents in both versions. Additional refund lines also require Exclude from Calculation.
  • Gift Card treats that line separately from ordinary merchandise. The refund is limited by the credited amount and original gift card value. B2C also uses Refund Policy and takes previous gift card credits into account.
  • Use as Item Charge Return identifies an Item or G/L Account to use when refunding an original Charge (Item) line.

For example, configure freight as a Special Item, select Exclude from Calculation and enable creation for the applicable channel and document type. Freight can then be added to the refund when the merchandise on the original invoice is fully credited. Review the generated document before posting.

Business Central Special Items list showing FREIGHT and GIFTCARD with separate calculation, document creation and Gift Card settings
Special Items identify invoice lines such as freight and gift cards that require special refund handling.

Events (Version 1, for BC partners)

These legacy events and examples apply to Version 1. Your BC partner should verify the event signatures against your installed extension. V2 uses different ticket and document handlers.

List of events

Event NameObject Name
OnAfterInsertB2CTicketHeaderTTU B2C Ticket Sync. Handler
OnBeforeInsertB2CTicketLineTTU B2C Ticket Sync. Handler
OnAfterInsertB2CTicketLineTTU B2C Ticket Sync. Handler
OnBeforeGetB2CTicketsHandleResponseTTU B2C Ticket Sync. Handler
OnBeforeInsertB2CTicketLineDataSourceTagsTTU B2C Ticket Sync. Handler
OnBeforeGetItemByItemReferenceB2BTTU Document Handler
OnBeforeModifyB2BSalesLineNewTTU Document Handler
OnAfterModifyB2BSalesLineNewTTU Document Handler
OnBeforeFindB2BPriceTTU Document Handler
OnFindSalesPriceNoPriceApplicationFoundTTU Document Handler
OnAfterGetOriginalB2BPriceTTU Document Handler
OnBeforeAddItemChargeAssignmentToSalesLineTTU Document Handler
OnAfterAddItemChargeAssignmentToSalesLineTTU Document Handler
OnBeforeGetB2BCustomerTTU Document Handler
OnBeforeGetB2CCustomerTTU Document Handler
OnAfterGetOriginalB2CPriceTTU Document Handler
OnBeforeAddReturnLabelLineTTU Document Handler
OnAfterAddReturnLabelLineTTU Document Handler
OnBeforeFindB2CPriceTTU Document Handler
OnBeforeModifyB2CSalesLineTTU Document Handler
OnAfterModifyB2CSalesLineTTU Document Handler
OnBeforeGetItemByItemReferenceB2CTTU Document Handler
OnBeforeModifyB2CSalesHeaderTTU Document Handler
OnBeforeCheckCustomerBlockedTTU Document Handler
OnBeforeModifyB2BSalesHeaderTTU Document Handler
OnAfterCreateDocumentFromB2BTicketTTU Document Handler
OnAfterCreateDocumentFromB2CTicketTTU Document Handler
OnHandleUnshippedB2CCancellationTTU Document Handler
OnBeforeAddItemObjectTTU Data Sync. Handler
OnBeforeAddProductIdentificationToItemObjectTTU Data Sync. Handler
OnBeforeAddDataToInvitesJsonTTU Data Sync. Handler
OnBeforeGetEmailAddressTTU Data Sync. Handler
OnBeforeLoopCustomersTTU Data Sync. Handler
OnBeforeSetSalesOrderNoTTU Data Sync. Handler
OnBeforeSetExternalDocumentNoTTU Data Sync. Handler
OnAfterInsertB2BTicketLineTTU B2B Ticket Sync. Handler
OnBeforeGetB2BTicketsHandleResponseTTU B2B Ticket Sync. Handler
OnBeforeInsertB2BTicketLineTTU B2B Ticket Sync. Handler
OnBeforeInsertB2BTicketLineProductIdentificationTTU B2B Ticket Sync. Handler
OnBeforeInsertB2BTicketLineDataSourceTagsTTU B2B Ticket Sync. Handler
OnAfterInsertB2BTicketHeaderTTU B2B Ticket Sync. Handler
OnBeforeCheckFulleRefundedTTU Toolbox
OnBeforeAddAdditionalRefundsToSalesHeaderTTU Toolbox
OnBeforeModifyAdditionalRefundsToSalesHeaderTTU Toolbox
OnAfterModifyAdditionalRefundsToSalesHeaderTTU Toolbox
OnBeforeModifyGiftCardLineTTU Toolbox
OnAfterModifyGiftCardLineTTU Toolbox
OnBeforeAddGiftCardsToSalesHeaderTTU Toolbox

Eg. the following event can used to create matrix lines (if K3 Pebblestone is used):

          
[EventSubscriber(ObjectType::Codeunit, Codeunit::"TTU Document Handler", 'OnAfterModifyB2BSalesLineNew', '', false, false)]
local procedure OnAfterModifyB2BSalesLineNew(var SalesLine: Record "Sales Line"; var LineNo: Integer)
var
    K3PFSalesDocMgt: Codeunit "K3PF Sales Document Mgt.";
    SalesLine2: Record "Sales Line";
begin
    Clear(K3PFSalesDocMgt); SalesLine2 := SalesLine;
    K3PFSalesDocMgt.AssignToMatrixLine(SalesLine2);
    LineNo += 10000;
end;

        

FAQs

Is the app extendable?

Yes, the app is extendable through Event Publishers and Event Subscribers. Use event subscribers in your app to extend functionality. See the Events section for more info.

Can I edit the tag setup?

You can edit the tags at any time by logging into Claimlane and going to the Data Management section. Internal and flow tags are customizable. Make sure that technical labels match the labels in BC for proper integration.

How do I resync a ticket?

For V1, open the ticket in its Claimlane B2B Tickets or Claimlane B2C Tickets page and choose "Resync Ticket". Created and Posted tickets cannot be resynced. After a successful Claimlane update, the action deletes the local ticket, resets its legacy integration-complete flag and returns it to the configured Ready status. If the update fails, the local ticket remains and the error is logged.

If above action is not available in BC, you can reproduce the effect of the button (only works for B2B and requires admin rights in Claimlane):

  1. Delete the Ticket in Business Central
  2. Go to the ticket in Claimlane, click on the 3 dots in the top right corner and select "Mark Supplier Integration" and click on "Mark as false"
  3. Move the ticket to the "Ready for BC" status

The ticket will then be synced to Business Central the next time the job queue entry runs.

How are cancellations handled?

Cancellations where orders have already been shipped/invoiced will be handled the same way as returns in Business Central.

Cancellations where the orders has not been shipped, the app will not handle these, as there are many different ways to handle these. Instead, an event has been created that your BC partner can use:

          
[IntegrationEvent(false, false)]
local procedure OnHandleUnshippedB2CCancellation(var TTUB2CTicketHeader: Record "TTU B2C Ticket Header"; var Customer: Record "Customer"; var InvoiceNo: Code[20]; var CurrencyCode: Code[10]; var IsHandled: Boolean)
begin
end;
          
        

If the status of the Ticket Header has not been set to "Created" or "Posted" after this event, the ticket will be set as status "Posted"

If the ticket is not shipped, and is not handled in this event, the ticket will be set as Cancelled.

Common Errors and how to solve them

Could not find invoice on line ###. EAN ###

This error occurs because Business Central has not found a recognizable invoice for the specified line. Please check the following:

  • Check the ticket in Claimlane - is the Invoice field correctly filled?
  • Verify that the Invoice No. Tag Label in Claimlane Integration Setup is the same as the Technical Label for the Invoice tag in Claimlane (must be invoice-number in order for Invoice flow to work properly).
  • Go to the ticket in Business Central (Claimlane B2B Tickets) and open the ticket. Click on Data Source Tags on the specified line and verify that the Invoice Number Tag is present.

You may need to resync the ticket after making any changes in Claimlane.

Multiple items found with the EAN ###.

This error occurs because Business Central has found multiple items with the same EAN. In order to fix this, you must get rid of duplicate item references in BC. If you are in doubt, contact your BC partner.

EAN is blank on line ###.

This error is caused by a missing EAN on the Ticket Line in BC. This is usually do to faulty response data from Claimlane. Try and resync the ticket. If the error persists, contact your Claimlane contact.

The Return Reason does not exist. Identification fields and values: Code=''

This error is most likely because you forgot to set a Return Reason on the product before putting the ticket in "Ready for BC". Go to the ticket in Claimlane and set the return reason accordingly and then resync the ticket.

If the error persists, check the Return Reason Tag Label in Claimlane Integration Setup. It must match the Technical Label for the Return Reason tag in Claimlane.