InRetrn

Guide for setting up the InRetrn returns integration in Omnium.

What is InRetrn?

InRetrn is a returns platform that handles the consumer-facing part of a return. The customer looks up their order in the InRetrn portal, registers what they want to send back, and receives a return label. To do that, InRetrn needs the order history — which is what this integration delivers.

The integration covers three flows:

  • Order export — orders are pushed to InRetrn as sales orders so they can be found in the returns portal.
  • Return export — returns registered in Omnium are pushed to InRetrn as return orders.
  • Returns from InRetrn — returns and exchanges registered in the InRetrn portal are written back into Omnium through the public Returns API.

Setup in Omnium

Connector

Add a connector under Configuration → Advanced Settings → Connectors. The connector Name must be inretrn — this is the value you reference from the workflow steps that trigger the export.

FieldDescription
Nameinretrn (matched case-insensitively)
HostInRetrn API base URL. Production: https://api.inretrn.com/. Test: https://uat-api.inretrn.com/
UsernameUsername supplied by InRetrn
TokenAPI key supplied by InRetrn

The username and token are combined and sent base64-encoded in the Authorization header on every request.

{
    "name": "inretrn",
    "host": "https://api.inretrn.com/",
    "username": "",
    "token": "",
    "properties": [
        {
            "key": "InretrnUseShippingAddress",
            "value": "false"
        }
    ]
}

Connector properties

PropertyTypeDescription
InretrnUseShippingAddressboolSend the shipment address as the buyer address instead of the billing address. Off by default, in which case the billing address is used and the shipment address is the fallback.

Connector selection per market

Both exports resolve the connector from the order's market, in this order:

  1. A global connector named or typed inretrn that lists the order's market in Enabled for markets.
  2. A connector named or typed inretrn defined directly on the market.
  3. A global connector named or typed inretrn with no market restriction.

This lets you run separate InRetrn accounts per market, or one account across all of them.


Order export

Trigger

Orders are exported by the Export Order workflow step with Connector set to inretrn. Add it to whichever order statuses should make the order available in the returns portal — typically the status where the order is shipped or completed.

{
  "Name": "ExportOrder",
  "Connector": "inretrn"
}

The order must have an order number. Orders without one are rejected.

The same order is not exported twice within 10 seconds. If two status updates arrive back to back — for example from an ERP pushing two updates at once — the second export is skipped and logged rather than sent.

Endpoint

MethodEndpointDescription
POST/v2/salesorder/createCreates sales orders in InRetrn

Sales order

InRetrn fieldOmnium source
OrderNoOrder number
OrderDateOrder created date
CurrencyBilling currency
TransportServiceShipping method name of the first shipment. Overridden by the order property InretrnOrderPropTransportService
TrackingNoComma-separated list of the distinct tracking numbers on the order's shipments and shipment packages
ExternalSellerReferenceSee External seller reference

Buyer

InRetrn fieldOmnium source
CustomerNoCustomer number of the customer on the order
NameCustomer name
EmailCustomer email
MobilePhoneCustomer phone, truncated to 15 characters
RegionRegion name and region code of the source address
Address.AddressLine1 / AddressLine2Address lines
Address.PostalCode / City / RegionPostal code, city, region
Address.CountryISO 3166-1 alpha-2 country code. See Country resolution

The source address is the billing address, or the shipment address when InretrnUseShippingAddress is enabled. Whichever is chosen, the other one is used as fallback when it is missing.

Payments

One entry per payment on the order.

InRetrn fieldOmnium source
AmountPayment amount
PaymentGatewayReferencePayment transaction id
PaymentGatewayTypePayment method name

Order lines

Each order line is looked up as a product before it is mapped. The line's code is searched as both product id and SKU id, the results are narrowed to the order's market, and the product matching the market's content language is preferred. When the code matches a variant, the parent product supplies the item data and the variant supplies the variant data, with the parent as fallback for any empty variant field.

InRetrn fieldOmnium source
ItemNoProduct id of the parent product. Falls back to the order line's product id, then its code
ItemVariantNoVariant id with the parent product id removed
ItemDescription1Product name, truncated to 125 characters
ItemVariantDescriptionVariant name, truncated to 125 characters
ItemEanVariant EAN, first GTIN, or SKU id; then the parent's EAN or SKU id; then the order line's EAN or code
LineNumberLine item id
OrderedQuantityQuantity minus canceled quantity
ShippedQuantityDelivered quantity
UnitNetPriceExtended price excluding tax, divided by quantity
UnitGrossPriceExtended price, divided by quantity
UnitInPriceLine cost
VatPercentTax rate
UnitOfMeasureSelected unit, or stk when the line has none
LineType1 for product lines. 2 for freight lines and for lines whose product carries a return or claim flag
ItemImageUrlLine image URL
UnitHeight / UnitWidth / UnitLengthDimensions of the shipment package the line belongs to, otherwise the product's first colli
UnitNetWeightProduct weight
ItemHarmonizationCodeProduct customs code
ItemCountryOfOriginProduct country of origin, resolved to an ISO 3166-1 alpha-2 code
ItemSeasonCodeProduct season. On variant lines this currently carries the product brand
BrandName / BrandCodeNameProduct brand, falling back to the order line's brand
SupplierName / SupplierCodeNameSupplier name and id. Read from the product; when the product carries supplier data, the order line's supplier is used instead
ProductGroup / ProductGroupDescriptionId and name of the product's main category, or its first category
ModeOfTransportShipping method name of the shipment the line belongs to. Overridden by the order property InretrnModeOfTransportation
TrackingNoTracking number of the shipment the line belongs to
ReturnAllowed / ClaimAllowedSet from the product properties InretrnReturnAllowed and InretrnClaimAllowed

Freight lines

One additional order line is appended per shipment on the order:

InRetrn fieldValue
ItemNoFreight
LineNumberShipment id
LineType2
ItemDescription1shipment: followed by the shipping label
UnitGrossPriceShipping subtotal
UnitNetPriceShipping subtotal excluding tax
OrderedQuantity1
ShippedQuantity1 when the shipment is shipped, otherwise 0

Backfilling order history

Orders placed before the integration went live are not in InRetrn, so customers cannot look them up in the portal. Existing order history can be loaded in bulk — contact Omnium support to arrange it. Orders without order lines or without an order number are skipped.


Return export

Trigger

Returns are exported by the Export Order return workflow step with Connector set to inretrn. Add it to the return status where the return should be registered in InRetrn.

{
  "Name": "ExportOrder",
  "Connector": "inretrn"
}

After a successful export, the InRetrn return order number is stored on the return as the external id InretrnReturnId. Running the step again exports the return again — Omnium does not skip returns that already carry the external id.

Endpoint

MethodEndpointDescription
POST/v1/returnorder/createCreates return orders in InRetrn

Return order

InRetrn fieldOmnium source
OrderNoOrder number of the original order
ReturnOrderNoOmnium-{orderNumber}-{nn}, where nn counts the returns on the order up to and including this one
ReturnOrderDateReturn created date
SourceOfReturnThe return's origin. Returns created without an origin are sent with a placeholder value, so set the origin when creating the return
ReturnLabelUrlLabel link of the return's first shipment, empty when there is none

Return lines

InRetrn fieldOmnium source
ItemNo / ItemVariantNoResolved from the product the same way as on order lines
LineNumberLine item id of the return line
ReturnedQuantityReturn line quantity
ReasonCodeThe InretrnReturnReason property on the return, or Manual when it is not set
CommentThe return comment and the return line comment, joined with a pipe character

A return line whose code does not match any line on the original order is skipped, and an error is added to the order.


Returns registered in InRetrn

Returns that customers register in the InRetrn portal are pushed back into Omnium over the public Returns API:

OperationEndpointUse case
POST/api/returns/{orderId}/ReturnRegisters the return, optionally with an exchange order
PATCH/api/returns/{orderId}/{returnId}Adjusts return lines, quantities and shipment charges after the parcel has been inspected
POST/api/returns/{orderId}/UpdateStatusMoves the return through its statuses, which runs the configured return workflow steps

These are the standard Returns API endpoints — no InRetrn-specific endpoints are involved. Configure the return statuses and workflow steps that credit the payment, update inventory and notify the customer as described in Return configuration.


Configuration reference

Product properties

PropertyTypeDescription
InretrnReturnAllowedboolSets ReturnAllowed on the exported order line
InretrnClaimAllowedboolSets ClaimAllowed on the exported order line

Setting either property also changes the line's LineType to 2. Use them on products that should not follow the standard return rules, such as fees and gift cards.

Store and market properties

PropertySet onDescription
InretrnExternalSellerStorePropertyStoreValue is sent as ExternalSellerReference on the sales order
InretrnExternalSellerPropertyMarketValue is sent as ExternalSellerReference when the order's store has no seller reference

Order properties

PropertyDescription
InretrnModeOfTransportationOverrides ModeOfTransport on every order line
InretrnOrderPropTransportServiceOverrides TransportService on the sales order

Return properties

PropertyDescription
InretrnReturnReasonSets ReasonCode on every exported return line

External seller reference

ExternalSellerReference identifies the selling entity in InRetrn. It is only resolved for orders that have a store:

  1. When the order's store has the property InretrnExternalSellerStoreProperty, its value is used.
  2. Otherwise the order's market is checked.

Orders without a store id are exported without a seller reference.

The market fallback currently requires both properties on the market: InretrnExternalSellerStoreProperty must be present for the fallback to trigger, and the value is read from InretrnExternalSellerProperty. Setting the reference on the store avoids this.


Country resolution

InRetrn requires a country on the buyer, so the country is resolved to an ISO 3166-1 alpha-2 code from the first of these that yields one:

  1. The country code, then the country name, of the order's addresses — in the same order the buyer address is chosen.
  2. The store's address, then the store's shipping address.
  3. The market's country code.

Two-letter codes, three-letter codes and English country names all resolve. Values that are not countries — region groupings such as EU or Europe — are left unresolved rather than guessed, and the export then fails on InRetrn's own validation.

The same resolution is applied to the product's country of origin for ItemCountryOfOrigin.


Errors and troubleshooting

A failed export adds an error to the order, visible on the order in the Omnium GUI. The error is removed on the next successful export of the same kind.

Error keyRaised by
InretrnErrorOrder export, and return lines that cannot be matched to the original order
InretrnReturnErrorReturn export
SymptomCause
The export fails with a connector options errorNo connector named or typed inretrn resolves for the order's market. Check the market restrictions on the connector
Order was exported less than 10 seconds agoDuplicate protection. The order was already sent — no action needed
The export fails on a missing order numberOrders are only exported once they have an order number
Errors mentioning ExternalSellerReferenceInRetrn rejected the seller reference. See External seller reference
Country rejected by InRetrnThe country could not be resolved to an ISO code. See Country resolution