# Connect Data to Loop Returns and automate your tasks

## Why integrate Data with Loop Returns

The Data to Loop Returns integration helps you sync data, automate manual tasks, and keep your stack aligned — without writing code.

### Track order history across every workflow run

MESA writes order details to a private table each time one is placed. Any workflow can look up that history — for loyalty checks, repeat purchase detection, or reporting — without querying Shopify directly.

### Build a customer loyalty tracker without a CRM

Data stores a running record of each customer's purchase count, total spend, or tier status. Workflows read that record to decide which emails to send, which tags to apply, or which rewards to trigger.

### Keep a running inventory log across all activity

Each time stock moves — sale, return, or restock — MESA writes the update to a Data table. Your other workflows and BI tools can query that record at any time for accurate, current counts.

### Update Shopify customer records when a return is initiated

When a customer starts a return in Loop, MESA updates their Shopify record with the relevant details — return reason, product, order value. Your team and connected tools have the full picture before the return is even completed.

### Trigger retention workflows the moment a return is filed

When a customer initiates a return in Loop, MESA kicks off the right response — a Klaviyo win-back flow, a Slack alert to the right team member, a loyalty point adjustment in Rivo. You act on the signal while the customer relationship is still recoverable.

### Route high-value return events to your team before they escalate

When a VIP customer, a large-order return, or a repeat returner is flagged in Loop, MESA notifies the right person through Slack or email with the order context already attached. Your team responds before the situation becomes a churn event.

## Build any Data and Loop Returns automation

MESA helps you connect apps to automate repetitive tasks. A trigger is an event that starts a workflow, and actions are the steps that occur when it's running.

###### Label Created or Updated

Starts when a label is created or modified.
- Topic
- Trigger
- Return ID
- Order ID
- Provider Order ID
- Carrier
- Tracking Number
- Label Status
- Label Updated At

###### Restock Requested

Starts when a restock is requested.
- Topic
- Trigger
- ID
- Order ID
- Provider Order ID
- Restock Items

###### Return Created or Updated

Starts when a return is created or modified.
- Topic
- Trigger
- ID
- State
- Created At
- Order ID
- Order Name
- Provider Order ID
- Order Number
- Customer
- Currency
- Return Product Total
- Return Discount Total
- Return Tax Total
- Return Total
- Return Credit Total
- Exchange Product Total
- Exchange Discount Total
- Exchange Tax Total
- Exchange Total
- Exchange Credit Total
- Gift Card
- Handling Fee
- Refund
- Upsell
- Line Items
- Exchanges
- Carrier
- Tracking Number
- Label Status
- Label Updated At

###### Record Created

Triggered when a new record is added to a table.

###### Record Updated

Triggered when a record in a table is created or an existing record is updated.

###### Cancel Return

Cancel a return.

###### Close Return

Close a return.

###### Create Blacklist

Create a blacklist.
- Type
- Value
- Secondary Value

###### Create Order Link

Generate an order link that will take the user directly to their order.
- Designation
- Name
- Zip

###### Create Whitelist

Create a whitelist.
- Type
- Value
- Secondary Value

###### Delete Blacklist

Remove a blacklist.

###### Delete Whitelist

Remove a whitelist.

###### Flag Return

Mark a return.

###### List Blacklist

Obtain a list of blacklists.
- Current Page
- Data
- From
- Last Page
- Next Page URL
- Path
- Per Page
- Prev Page URL
- To
- Total

###### List Details of Return

Obtain a list of return details.
- ID
- Created At
- Order ID
- Order Name
- Order Number
- State
- Currency
- Refund
- Gift Card
- Exchange
- Return Total
- Line Items
- Customer Email
- Carrier
- Label Status
- Label Updated At
- Tracking Number

###### List Packages Return

Obtain a list of all packages by tracking statuses or timeframe.
- ID
- Created At
- Updated At
- Return Line Item ID
- Order ID
- Order Name
- State
- Customer Email
- Title
- Sku
- Carrier
- Label Status
- Label Updated At
- Tracking Number

###### List Returns Return

Obtain a list of returns that were created within a given timeframe.
- ID
- State
- Created At
- Updated At
- Order ID
- Order Name
- Provider Order ID
- Order Number
- Customer
- Currency
- Return Product Total
- Return Discount Total
- Return Tax Total
- Return Total
- Return Credit Total
- Exchange Product Total
- Exchange Discount Total
- Exchange Tax Total
- Exchange Total
- Exchange Credit Total
- Gift Card
- Handling Fee
- Refund
- Upsell
- Line Items
- Exchanges
- Carrier
- Tracking Number
- Label Status
- Label Updated At

###### List Whitelist

Obtain a list of whitelists.
- Current Page
- Data
- From
- Last Page
- Next Page URL
- Path
- Per Page
- Prev Page URL
- To
- Total

###### Process Return

Return the funds to the customer.

###### Retrieve Blacklist

Grab all details about the blacklist.
- ID
- Created At
- Type
- Value
- Secondary Value

###### Retrieve Whitelist

Grab all details about the whitelist.
- ID
- Created At
- Type
- Value
- Secondary Value

###### Create Record

Create a new record in a new or existing table.

###### Custom SQL Query

Run a custom SQL query to fetch a list of records.

###### Delete Record

Delete one or more records in a table.
- Where

###### Query

Run a query to fetch a specific list of records in a table.
- Sort by

###### Update or Create Record

Update existing record(s) if found, otherwise create a new record.
- Where

###### Update Record

Update existing record(s) in a table.
- Where
