Skip to main content
The Loop Returns integration lets your AI Agents answer “where is my return, and has my refund gone through?” without handing the ticket to your team. Beyond lookups, agents can flag a return for your team to review, leave an internal note on a return, and cancel a return — each with human approval by default.
This page is about Loop Returns (loopreturns.com), the returns and exchanges platform. For the subscription app, see Loop. They are separate integrations with separate API keys.

When to use it

Use Loop Returns to automate return questions and simple follow-up actions, such as:
  • “Did you receive my return?”
  • “Where is my return label?”
  • “Has my refund been issued?”
  • “Why was my return rejected?”
  • “I made this return by mistake, can you cancel it?”
  • flagging a return that needs a person to look at it, with a note explaining why
Looking up a return never changes anything in Loop. Flagging, adding a note, and cancelling do change the return in Loop, so cx asks for human approval before the agent sends them by default.

Set up Loop Returns

You need a Loop Returns API key with the Returns scope.
1

Create an API key in Loop

In the Loop Admin, go to Returns Management → Tools & integrations → Developer Tools. Click Generate API key, add the Returns scope, give the key a name such as “Chatarmin CX”, and click Generate. Copy the key.A key without the Returns scope cannot read returns, and cx will not save it. The same scope also covers flagging, adding notes to, and cancelling returns.
2

Open integrations

Open integrations in your workspace settings and choose Loop Returns.If Loop Returns is not listed, contact your Chatarmin CX account team to check availability for your workspace.
3

Connect the account

Click Connect, paste the API Key, and click Connect to save. cx checks the key against Loop Returns before saving it. A successful connection shows Connected.cx stores the key encrypted.
4

Enable the actions on an agent

Open AI Agents, choose your agent, and enable the Loop Returns actions it needs — Get Loop Returns return, Flag Loop Returns return, Add Loop Returns return note, and Cancel Loop Returns return. Select the connected Loop Returns account the agent may use on each action.

AI Agent actions

Read action

Get Loop Returns return

This read-only action finds a return by order number or Loop return ID. It does not need human approval. The agent gets back:
  • the return state: open, review, closed, cancelled, or expired
  • the return method and the label and tracking status
  • the returned items with the customer’s return reasons
  • the refund amount and a refund status
Customers write order numbers with or without the #, for example 1001 or #1001. The action tries both.
Loop Returns cannot be searched by email. If the customer only gives an email address, the agent needs to find the order number first, for example with your Shopify integration, and then look up the return. Write this into the agent’s instructions.

What the refund status means

Loop does not send a refund status. cx works it out from the return, so the agent is told to say a refund was issued only when the status is processed. When the status is unknown, the agent should not promise a refund. Tell it to hand the ticket to your team.

Write actions

Flagging, adding a note to, and cancelling a return each take a Loop return ID, which the agent gets from Get Loop Returns return. All three need human approval by default — a person reviews and approves the action before cx sends it to Loop. You can turn approval off per action when you configure the agent, the same way as any other approvable action.

Flag Loop Returns return

Flags the return for review in Loop. Loop stops automatic processing on that return until someone checks it in the Loop admin. Use it when a return needs a human decision, for example a damaged item or a policy exception. Tell the agent to say the return was “flagged for review” — never that it was approved or refunded.

Add Loop Returns return note

Adds an internal note to the return, up to 255 characters. Only your team sees the note in the Loop admin; the customer never does. Use it to leave context for whoever handles the return next, for example what the customer said or why it was flagged.

Cancel Loop Returns return

Cancels the return in Loop. The customer can then start a new return for the same items. Use it only when the customer asked for the return to be cancelled or it was created by mistake. Tell the agent to confirm the cancellation to the customer only after the action succeeds.

Who can act on a return

On a ticket, every Loop Returns action — the lookup and all three write actions — only works on returns whose customer email matches an email address on the ticket’s contact. If the return or order number belongs to someone else, the action answers “not found” and makes no change in Loop. This stops a customer from reading or changing another customer’s return by guessing an order number or return ID. Test runs without a ticket do not have a customer to compare with, so the email check does not apply there. Use a test return when you try an action.

Best practices

  • Tell the agent when to look up a return and what to say for each state, such as “label created but not shipped” or “received, refund pending”.
  • Tell the agent to ask for the order number if the customer does not give one.
  • Keep approval on for flagging, notes, and cancellations until you trust the agent’s judgment on when to use them.
  • Tell the agent what counts as a reason to flag a return, and what to write in a note, so notes stay short and useful for your team.
  • Only let the agent cancel a return when the customer explicitly asks, or when it already knows the return was made by mistake.
  • Keep an escalation rule for unknown refund status and for returns that cannot be found.
  • Use a test return from your own order for the first check. Do not use a real customer’s order.

Safe test

1

Pick a known return

Choose a return in Loop that you can see in the Loop Admin. Note its order number, return ID, and state.
2

Run the agent in a test

Ask the agent in a test run about that order number, for example “What is the status of my return for order #1001?”
3

Compare

Check that the state, tracking, items, and refund status match the Loop Admin. The lookup does not change anything in Loop.
4

Try a write action in a live ticket

A test run only simulates flag, note, and cancel — it never changes Loop. To see a real write, ask the agent on a live ticket with that return. Approve the request when it reaches you, then check in the Loop Admin that the return now shows the flag, note, or cancelled state.

Disconnect Loop Returns

In integrations, open the account’s Connected menu, choose Disconnect, and confirm Delete. cx removes the stored key. Agents that used the account can no longer look up or change returns. To stop access on the Loop side too, delete the API key in the Loop Admin under Developer Tools.

Troubleshooting

Connection fails with “check your API Key”

Check that you pasted the full key and that it was created for the correct Loop shop. cx shows “We couldn’t connect to Loop Returns. Please check your API Key.” when Loop rejects the key.

Connection fails because of the scope

cx shows “This Loop Returns API Key cannot read returns.” Loop can also report a key without the right scope as an invalid key, so if the invalid-key message persists with a correct key, check its scopes too. Create a new key with the Returns scope in Loop Developer Tools and connect again.

”We couldn’t reach Loop Returns”

Loop did not answer. The key may be fine. Wait a moment and try again. If it keeps failing, check Loop’s status page.

The agent says it cannot find a return

Check that:
  • the order number or return ID is correct, for example a shop order number like 1001
  • the return exists in the Loop Admin
  • the customer’s email on the return matches an email on the ticket’s contact
  • the agent has the Loop Returns account selected on the action
This applies to the lookup and to flag, note, and cancel — a write action answers “not found” under the same conditions, and makes no change in Loop.

A refund shows as unknown

Open the return in the Loop Admin and check whether a refund was issued. If it was, contact your Chatarmin CX account team.

A write action fails with a message from Loop

Flag, note, and cancel pass through Loop’s own error message, for example when the return is already closed or a note is too long. Common cases:
  • Note is rejected as too long — Loop notes are limited to 255 characters. Tell the agent to keep notes short, or shorten the note and try again.
  • “Already closed” or a similar state error — the return’s current state in Loop does not allow that action anymore. Open the return in the Loop Admin to see its state before trying again.
  • An unrecognised response — cx could not understand what Loop sent back. Wait a moment and try again; if it persists, check Loop’s status page.
If the connection or action still fails, contact your Chatarmin CX account team with the error message and the step that failed. Do not include your API key.