The Order Return Export (sometimes called the Order Return Recurring Export) is an SFTP export that sends your return data to a trading partner or reporting system as an X12 180 return document, built from a Twig template you control. It is not a report from REPORTING > Reports — reports in Acenda can't be scheduled, so if that's what you're after, see How to generate reports instead.
Returns themselves live in ORDERS > Returns. This export doesn't replace that view — it's how you get return data out automatically to an SFTP destination, on a recurring schedule.
Before you start: This is a trading-partner-specific EDI export (X12 180). If you're new to Acenda's EDI/Twig tooling, read the How to implement and customize EDI in Acenda and the How to use Twig markup in Acenda Admin tools first. You'll also need SFTP connection details from your trading partner or IT team.
Step-by-Step Setup
Find the integration:
In Acenda, go to CHANNELS > Integrations. Order Return Export is a General Integration — if you don't already have one, click + New Integration and add it from the General Integrations list. (Exact wording can vary slightly by account — ask Acenda Support if you don't see it.)
Enter SFTP connection details:
Fill in Protocol, Host, Port, Username, Password and Path (the destination folder on the remote server), using the information from your IT team or reporting partner.
Note: Only username/password authentication is supported for this export — SSH key-based login isn't currently available.
Select the render engine:
Under Template Control, set Render Template Engine to Twig.
Paste and customize the template:
Copy the sample in Body Template (Twig) below into the Body Template field, then update the placeholders so they match your trading partner, sales channels and return-reason codes (see What to Edit below).
Configure output options:
Under Output File Name Options, set your filename template. Leave One File Per Record off unless your partner needs a separate file for every return — otherwise Acenda aggregates each run's returns into a single file.
Configure return filters:
Under Order Return Filters:
Standard rolling export: Leave Return IDs, Order IDs and Starting Return ID blank to export returns created in the previous 3 days.
Backfill / resend: Enter specific Return IDs, Order IDs, or a Starting Return ID to resend historical returns.
Save and test:
Click Save. After the export's next scheduled run, confirm the file arrived in your destination SFTP folder.
Body Template (Twig) Sample
Copy the code below into the Body Template field, then work through What to Edit to replace every placeholder.
Important: Every value below is a placeholder for an example trading partner. Don't go live with these defaults — your sales channel IDs, sender/receiver IDs and return-reason codes are specific to your account and your partner's requirements.
{% apply spaceless %}
{% if ship_advice.sales_channel_id == YOUR_CHANNEL_A_ID %}
{% set account_id = "YOUR_SENDER_ID " %}
{% set gs_identifier = "YOUR_SENDER_ID" %}
{% elseif ship_advice.sales_channel_id == YOUR_CHANNEL_B_ID %}
{% set account_id = "YOUR_SENDER_ID " %}
{% set gs_identifier = "YOUR_SENDER_ID" %}
{% else %}
{% set account_id = "YOUR_SENDER_ID " %}
{% set gs_identifier = "YOUR_SENDER_ID" %}
{% endif %}
{% if return.reason == 'YOUR_DEFECTIVE_CODE' %}
{% set return_reason = "Defective" %}
{% elseif return.reason == 'YOUR_WRONG_ITEM_CODE' %}
{% set return_reason = "Incorrect Item Received" %}
{% elseif return.reason == 'YOUR_UNWANTED_CODE' %}
{% set return_reason = "No longer want/need" %}
{% elseif return.reason == 'YOUR_QUALITY_CODE' %}
{% set return_reason = "Quality" %}
{% else %}
{% set return_reason = "Miscellaneous" %}
{% endif %}
{# Confirm this matches the per-line quantity your partner expects #}
{% set return_quantity = return.quantity %}
{{ "ISA" }}*{{ "00" }}*{{ " " }}*{{ "00" }}*{{ " " }}*{{ "ZZ" }}*{{ account_id }}*{{ "12" }}*{{ "YOUR_RECEIVER_ID " }}*{{ ship_advice.created_at|date("ymd") }}*{{ ship_advice.created_at|date("Hi") }}*{{ "U" }}*{{ "00401" }}*{{ "000011110" }}*{{ "0" }}*{{ "P" }}*{{ ">" }}
{{ "GS" }}*{{ "AN" }}*{{ gs_identifier }}*{{ "YOUR_RECEIVER_ID" }}*{{ ship_advice.created_at|date("Ymd") }}*{{ ship_advice.created_at|date("Hi") }}*{{ "14" }}*{{ "X" }}*{{ "004010" }}
{{ "ST" }}*{{ "180" }}*{{ "0001" }}
{{ "BGN" }}*{{ "00" }}*{{ return.id }}*{{ return.created_at|date("Ymd") }}***
{{ "RDR" }}*{{ "CR" }}*{{ "ZZ" }}**{{ return_reason }}
{{ "PRF" }}*{{ ship_advice.purchase_order }}~
{% for item in ship_advice.ship_advice_item %}
{{ "BLI" }}*{{ "UP" }}*{{ item.upc }}*{{ return_quantity }}*{{ "EA" }}*{{ "SEL" }}*{{ item.unit_price }}*******
{{ "N9" }}*{{ "RTL" }}*{{ "1" }}
{% endfor %}
{{ "SE" }}*{{ 5 + (ship_advice.ship_advice_item | length * 2) }}*{{ "0001" }}
{{ "GE" }}*{{ "1" }}*{{ "14" }}
{{ "IEA" }}*{{ "1" }}*{{ "000011110" }}
{% endapply %}{{ "\n" }}What to Edit
Sales channel IDs:
ship_advice.sales_channel_idis an auto-increment ID specific to your account, not a fixed value across Acenda customers. Find your actual IDs under CHANNELS > Integrations and replace everyYOUR_CHANNEL_*_IDplaceholder.Return reason codes:
return.reasonis passed through as-is from each sales channel (for example, Target's, Mirakl's or Walmart's own return-reason text) — Acenda doesn't maintain one fixed list across channels. Replace everyYOUR_*_CODEplaceholder with the actual values your returns feed sends, and confirm the mapping against a few real return payloads before going live.Sender/receiver and GS identifiers: Replace
YOUR_SENDER_IDandYOUR_RECEIVER_IDwith the values your trading partner assigned you, not an example partner's.EDI control numbers: The ISA/GS/SE/GE/IEA control numbers in the sample are static placeholders — work with your trading partner (and see the How to implement and customize EDI in Acenda) to confirm what they require.
Quantity and item fields: Double-check
return_quantityanditem.upc/item.unit_priceagainst your own data before relying on them — field availability can vary by channel.
Protecting Customer Information (PII)
Warning: Don't include customer names, email addresses, phone numbers, physical addresses, or payment details in this export unless an approved data-sharing agreement with your partner explicitly requires it.
Include only the operational data needed to process the return:
Return ID / Order ID / Purchase Order
SKU / UPC & quantity
Status, dates, and return reason
Looking for a No-Code Export Instead?
If you don't need the Twig/EDI format above, DATA TRANSFERS > Exports and Scheduled Exports offer no-code exports for catalog, inventory, channel item mapping, SKU presentation, promotion and custom pricing data — see How to export data from Acenda. Returns aren't one of the supported entity types there today, so the Twig-templated export above is the way to automate return exports.
Troubleshooting & FAQ
File doesn't arrive: Check the integration's Notifications (or Change Log) for errors, and confirm the export's schedule is active.
Integration shows "Connection Unhealthy": Recheck your Protocol, Host, Port, Username and Password — a bad SFTP connection is the most common cause.
Twig errors: A syntax error or bad field reference in your Body Template raises a Twig render notification rather than silently failing — check Notifications after saving a template change.
A field renders blank: Twig silently renders an unrecognized variable as empty instead of erroring. Double-check the exact field name (for example
return.quantity, not a variable you haven't set yourself) if something in the output looks missing.Returns are missing from the file: Confirm your Order Return Filters aren't unintentionally narrowing the export, and remember the default window only covers the previous 3 days when filters are blank.
Related articles
Still stuck? Contact Acenda Support and include the integration name and a sample return ID.
Keywords
returns report, return report, returns export, Order Return Export, returns data, return report SFTP, RMA report, refund report, scheduled returns report, Twig template, Body Template, Render Template Engine, Template Control, SFTP, Protocol, Host, Port, Path, General Integrations, REPORTING Reports, ORDERS Returns, PII, no-code export, how to set up a returns report, how to view returns, how to report on returns
