Loop Returns Create Return

Creates a return in Loop for an existing order, running Loop's full multi-step return flow in a single action.

What it does

  • Looks up the order in Loop using the order name plus a verification value (customer email or postcode/ZIP).
  • Adds each requested item to the return, with its return reason and return type (refund/store credit or exchange).
  • Finalises the return, sets how the customer is compensated, picks a return method automatically and submits it.
  • Returns the new return's ID, or the error from Loop when something is invalid (e.g. an item already returned).

Inputs

NameTypeRequiredDescription
Order NameStringYesThe order name/number the return is for.
ItemsListYesItems to return. Each item needs the order line item ID, plus its return reason (parent and specific), and its return type.
VerificationStringYesValue Loop needs to verify the order, normally the customer email or postcode/ZIP.
Shop IDCredentialsNoThe Loop shop the order belongs to. Leave unmapped when a Loop Returns connection is set up.
Credit TypeStringNoHow the customer is compensated: refund, gift (store credit) or exchange.
API KeyCredentialsNoLoop Returns API key. Leave unmapped when a Loop Returns connection is set up.
Safe ModeBooleanNoIf on, errors are returned in the outputs instead of stopping the flow.

Outputs

NameTypeDescription
SuccessBooleanWhether the return was created.
Return IDStringThe ID of the created return.
Raw DataObjectThe full response from Loop.
Error MessageStringError details when Safe Mode is on and the action fails.

Notes

  • Set up a Loop Returns module connection to supply the API key and shop ID. Without a connection, map the API Key and Shop ID inputs instead. If you map the Shop ID input, it takes priority over the shop ID from the connection.
  • The action retries Loop rate limits (429) and temporary gateway errors (502, 503, 504). Each wait lasts at most 5 seconds, and a single run waits at most 15 seconds in total. If rate limiting continues past that limit, the action fails, and Loop may keep an unsubmitted draft return.
  • A return reason is effectively required: Loop needs both a general reason and a more specific one before a return can be submitted.
  • An item that has already been returned will be rejected by Loop.


Did this page help you?