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. The agent looks up the return in Loop Returns and replies with its status, return method, shipping label progress, returned items, and refund status.
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 such as:
  • “Did you receive my return?”
  • “Where is my return label?”
  • “Has my refund been issued?”
  • “Why was my return rejected?”
The integration is read-only. It does not create, approve, or change returns in Loop.

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.
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 action on an agent

Open AI Agents, choose your agent, and enable Get Loop Returns return in its actions. Select the connected Loop Returns account the agent may use.

AI Agent 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.

Who can see which return

On a ticket, the agent only gets returns whose customer email matches an email address on the ticket’s contact. If the order number belongs to someone else, the action answers “not found”. This stops a customer from reading another customer’s return by guessing an order number. 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 it.

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.

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 an escalation rule for unknown 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 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.

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 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 is the shop order number, for example 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

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. 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.