Your Returns & Refund Processing Data Template
Your Returns & Refund Processing Data Template
- Recommended attributes to collect
- Key activities to track
- NetSuite extraction guidance
Returns & Refund Processing Attributes
| Name | Description | ||
|---|---|---|---|
| Activity Name ActivityName | The name of the specific business event or step that occurred within the returns process, such as 'Item Inspected' or 'Refund Processed'. | ||
| Description The Activity Name describes a distinct step or milestone in the returns and refund lifecycle. These events are ordered by their timestamps to build the process flow. Analyzing the sequence and frequency of activities helps identify the most common process paths, bottlenecks between steps, and any rework or repeated activities. Examples include 'Return Authorization Created', 'Item Received', and 'Credit Memo Approved'. Why it matters This attribute defines the steps of the process. It is essential for visualizing the process map, analyzing flow variations, and identifying bottlenecks or rework loops. Where to get This attribute is typically derived from the status changes of transaction records like Return Authorizations and Credit Memos, or from specific user actions recorded in system notes or custom event logs. Examples Return Authorization CreatedItem ReceivedItem InspectedRefund ProcessedReturn Authorization Closed | |||
| Event Timestamp EventTimestamp | The precise date and time when the activity occurred, serving as the chronological backbone of the process. | ||
| Description The Event Timestamp records the exact moment an activity took place. This data is critical for sequencing events correctly and for all time-based analysis. It is used to calculate durations between activities, total case cycle times, and waiting times, which are fundamental for performance monitoring, bottleneck analysis, and SLA compliance checks. Timestamps must be accurate to ensure the reliability of process mining insights. Why it matters This attribute provides the chronological order of events, which is necessary for discovering the process flow and calculating all performance metrics like cycle times and waiting times. Where to get This information is typically sourced from the 'Date Created' or 'Last Modified Date' fields on NetSuite records or from timestamps in the System Notes sublist associated with transactions. Examples 2023-10-26T10:00:00Z2023-10-26T14:35:10Z2023-10-27T09:12:05Z | |||
| Return Case ID ReturnCaseId | The unique identifier for a single customer return or refund case, linking all related activities from initiation to closure. | ||
| Description The Return Case ID serves as the primary identifier for tracking the end-to-end journey of a return. Each unique ID corresponds to a single return authorization, allowing for the comprehensive analysis of all associated events, such as item receipt, inspection, and refund processing. In process mining, this ID is essential for reconstructing the complete process flow for each return, enabling the calculation of cycle times and the identification of case-level deviations. Why it matters This is the fundamental attribute for process mining, as it connects all individual events into coherent end-to-end process instances, making it possible to analyze process flows and performance. Where to get This is typically the Internal ID or Transaction ID of the Return Authorization record in NetSuite. Examples RMA-0012345RMA-0012346RMA-0012347 | |||
| Last Data Update LastDataUpdate | The timestamp indicating the last time the data for this process was refreshed or updated. | ||
| Description This attribute records when the dataset was last updated from the source system. It is a critical piece of metadata that informs users about the freshness of the analysis. Displaying this information in dashboards helps manage expectations and ensures that decisions are made based on an understanding of the data's timeliness. Why it matters Provides transparency about the data's freshness, which is essential for users to trust the analysis and understand its relevance to the current state of operations. Where to get This timestamp is generated and added during the data extraction, transformation, and loading (ETL) process. Examples 2024-05-21T02:00:00Z2024-05-22T02:00:00Z | |||
| Source System SourceSystem | The system from which the data was extracted, used for tracking data provenance. | ||
| Description This attribute identifies the origin of the process data. In this context, it will typically be 'NetSuite'. Specifying the source system is important in environments where data might be merged from multiple systems, ensuring clear data lineage and traceability. Why it matters Identifies the data's origin, which is crucial for data governance, troubleshooting, and in scenarios where data from multiple systems is combined for a holistic process view. Where to get This is a static value ('NetSuite') that is typically added during the data extraction and transformation process. Examples NetSuiteNetSuite ERP | |||
| Actual Refund Amount ActualRefundAmount | The final monetary amount that was actually refunded to the customer. | ||
| Description This attribute represents the actual value credited or refunded to the customer, as recorded on the Credit Memo or refund transaction. This amount may differ from the requested amount due to adjustments like restocking fees, shipping costs, or partial refunds for damaged goods. This attribute is critical for financial reporting and for calculating the 'Refund Amount Discrepancy Rate' KPI. Why it matters Represents the true financial impact of the return and is essential for financial reconciliation and analyzing refund accuracy. Where to get This value is sourced from the 'Total' field on the Credit Memo transaction that is generated from the Return Authorization. Examples 99.99140.000.00 | |||
| Cycle Time CycleTime | The total time elapsed from the creation of the return request to its final closure. | ||
| Description Cycle Time is a key performance indicator calculated for each return case. It measures the duration from the very first event to the very last, providing a high-level view of process efficiency. This metric is the foundation for the 'Return Process End-to-End Cycle Time' dashboard and the 'Average Return Cycle Time' KPI. It is calculated by subtracting the timestamp of the first activity from the timestamp of the last activity for each case. Why it matters This is a primary measure of process performance. High cycle times often point to inefficiencies, bottlenecks, or excessive manual work, which lead to higher operational costs and poor customer experience. Where to get This is not a field in the source system. It is a metric calculated during process mining analysis by subtracting the minimum timestamp from the maximum timestamp for each case. Examples 10 days 4 hours5 days 12 hours21 days 2 hours | |||
| Department Department | The business department or team responsible for handling the return case at a given stage. | ||
| Description This attribute assigns process activities to a specific department, such as 'Customer Service', 'Warehouse', or 'Finance'. It is essential for understanding handoffs between teams and identifying departmental bottlenecks. By analyzing the time cases spend within or waiting for a specific department, organizations can pinpoint sources of delay and optimize resource allocation. This is a primary dimension for the 'Departmental Return Process Performance' dashboard. Why it matters Allows for analysis of process performance by functional area, highlighting inter-departmental handoff delays and departmental bottlenecks. Where to get This can be derived from the user or employee record associated with an activity, or from a 'Department' field on the transaction itself. It is often configured in employee records in NetSuite. Examples WarehouseCustomer SupportFinanceQuality Assurance | |||
| Processing Agent ProcessingAgent | The employee or user who performed a specific activity in the return process. | ||
| Description The Processing Agent identifies the individual responsible for executing a given task, such as approving a return or inspecting an item. This attribute is crucial for performance analysis at the user level. It helps in identifying high-performing employees, areas where additional training may be needed, and workload distribution imbalances across a team. Analyzing activities by agent is key for the 'Departmental Return Process Performance' dashboard. Why it matters Enables analysis of individual and team performance, workload balancing, and identification of training needs, directly impacting operational efficiency. Where to get This can be sourced from fields like 'Created By', 'Approved By', or user fields in the System Notes sublist on NetSuite transactions. Examples Alice JohnsonBob WilliamsCharlie Brown | |||
| Return Status ReturnAuthorizationStatus | The current status of the return authorization, such as 'Pending Approval', 'Approved', or 'Closed'. | ||
| Description This attribute indicates the current state of the return case within its lifecycle. It is fundamental for understanding the progress of returns and for segmenting cases. For example, analyzing the time spent in the 'Pending Receipt' status can highlight shipping delays, while a long duration in 'Pending Approval' might indicate an internal bottleneck. It is also used to determine the final outcome of a return, such as 'Closed' or 'Rejected'. Why it matters Provides a snapshot of where each return is in the process, enabling analysis of case distribution, status durations, and process outcomes. Where to get This corresponds to the 'Status' or a similar field on the NetSuite Return Authorization record. Examples Pending ApprovalPending ReceiptApprovedRejectedClosed | |||
| Return Type ReturnType | The classification of the return based on the reason provided by the customer. | ||
| Description Return Type categorizes returns based on the underlying reason, such as 'Defective Item', 'Wrong Size', 'Changed Mind', or 'Not as Described'. This categorization is vital for root cause analysis. By analyzing process metrics across different return types, a business can identify product quality issues, description inaccuracies, or fulfillment errors. This attribute is key for the 'Returns Performance By Type And Channel' dashboard. Why it matters Helps identify the root causes of returns, enabling targeted improvements in products, marketing descriptions, or the fulfillment process to reduce return volumes. Where to get This is typically a custom field or a standard list/record field on the Return Authorization form where the return reason is captured. Examples Defective ProductIncorrect Item ShippedCustomer DissatisfactionWrong Size/Color | |||
| Customer ID CustomerId | The unique identifier for the customer initiating the return. | ||
| Description The Customer ID links a return transaction to a specific customer. This enables customer-centric analysis, such as identifying customers with frequent returns, which could indicate dissatisfaction or fraudulent behavior. It also allows for segmentation of process performance by customer type or value, helping to prioritize service for key accounts. Why it matters Facilitates customer-level analysis of return behavior and allows for process segmentation based on customer attributes like segment or lifetime value. Where to get This is the 'Customer' or 'Entity' field on the header of the Return Authorization record in NetSuite. Examples CUST-001CUST-002CUST-003 | |||
| Is Automated IsAutomated | A boolean flag indicating if an activity was performed automatically by the system. | ||
| Description This attribute indicates whether an activity was executed by a user or by an automated system, script, or workflow. For instance, an initial 'Return Authorization Created' event might be automated via a customer portal, while 'Item Inspected' is a manual activity. Tracking automation helps in identifying opportunities to automate manual steps and in measuring the efficiency gains from existing automations. Why it matters Helps distinguish between manual and automated tasks, which is key for identifying automation opportunities and measuring the impact of digital transformation efforts. Where to get This can be inferred from the user associated with an event. System-generated events in NetSuite are often associated with a specific system user or a script ID. Examples truefalse | |||
| Is SLA Compliant IsSlaCompliant | A calculated flag that indicates whether the refund was processed within the defined SLA target. | ||
| Description This boolean attribute is derived by comparing the 'Refund Processed' timestamp against the 'Refund SLA Target Date'. If the refund was processed on or before the target date, the value is true, otherwise it is false. This flag simplifies the creation of compliance reports and dashboards, such as the 'Refund SLA Compliance Monitoring' dashboard, and is used to calculate the 'Refund SLA Achievement Rate' KPI. Why it matters Provides a clear, binary outcome for SLA performance on a case-by-case basis, making it easy to track, report, and analyze compliance rates over time. Where to get This attribute is calculated during data transformation or within the process mining tool. The logic is: Examples truefalse | |||
| Policy Adherence ReturnPolicyAdherence | Indicates whether the return complies with the established company return policies. | ||
| Description This boolean or categorical attribute flags if a return meets all predefined criteria, such as return window, item condition, and proof of purchase. It is used to monitor compliance and manage exceptions. The 'Return Policy Adherence Exceptions' dashboard relies on this attribute to highlight cases that require special handling or review, helping to minimize risk and ensure consistent application of rules. Why it matters Helps in monitoring and enforcing return policies, reducing financial risk from non-compliant returns and ensuring fairness and consistency. Where to get This would almost certainly be a custom field, possibly a checkbox or list, on the Return Authorization record, managed through a workflow. Examples CompliantNon-Compliant - Out of WindowException Approved | |||
| Product Identifier ProductIdentifier | The unique identifier for the product being returned, such as SKU or Item Number. | ||
| Description This attribute identifies the specific item involved in the return. Analyzing returns at the product level is crucial for identifying items with high return rates, which may indicate quality defects, poor descriptions, or other issues. This data allows for deep-dive analysis into product performance and can inform decisions related to product development, sourcing, and marketing. Why it matters Links return process data to specific products, enabling root cause analysis of product-related issues and helping to reduce overall return rates. Where to get This is found on the 'Items' sublist of the Return Authorization record. It corresponds to the 'Item' field. Examples SKU-TEE-BL-LPROD-00543ITEM-987123 | |||
| Refund Amount Discrepancy RefundAmountDiscrepancy | The calculated difference between the requested refund amount and the actual refunded amount. | ||
| Description This metric is calculated by subtracting the 'Actual Refund Amount' from the 'Requested Refund Amount'. A non-zero value indicates an adjustment was made during the process, such as for restocking fees or damaged goods. This attribute is used to power analysis for the 'Refund Amount Discrepancy Rate' KPI, helping to flag cases with significant financial adjustments for further review. Why it matters Highlights financial adjustments made during the return process, enabling analysis of why discrepancies occur and whether they are consistent and justified. Where to get This is a calculated attribute. The formula is: Examples 0.0010.00-5.00 | |||
| Refund SLA Target Date RefundSlaTargetDate | The target date by which the refund is expected to be processed according to service level agreements. | ||
| Description The Refund SLA Target Date is a calculated timestamp representing the commitment to the customer for processing their refund. It is typically calculated by adding a predefined period, such as 5 business days, to a key event like 'Item Received' or 'Refund Approved'. This attribute is essential for the 'Refund SLA Compliance Monitoring' dashboard and the 'Refund SLA Achievement Rate' KPI, allowing the business to measure performance against its promises. Why it matters Enables quantitative measurement of performance against customer commitments, which is crucial for maintaining customer satisfaction and trust. Where to get This date is usually not a standard field. It must be derived by adding a predefined SLA period (e.g., 5 days) to a key timestamp, such as the 'Item Received' date. Examples 2023-11-01T23:59:59Z2023-11-05T23:59:59Z2023-11-10T23:59:59Z | |||
| Requested Refund Amount RequestedRefundAmount | The monetary amount of the refund initially requested or expected for the return. | ||
| Description This attribute stores the expected refund value at the beginning of the process. It is typically based on the original purchase price of the returned items. This amount serves as a baseline for comparison against the final refunded amount. The 'Refund Amount Discrepancy Rate' KPI directly compares this value with the Actual Refund Amount to identify variances caused by restocking fees, partial refunds, or other adjustments. Why it matters Provides a baseline for financial analysis, helping to track discrepancies between expected and actual refund values and identify reasons for adjustments. Where to get This value is derived from the 'Amount' or 'Rate' fields on the line items of the Return Authorization transaction. Examples 99.99150.0025.50 | |||
| Return Channel ReturnChannel | The channel through which the original purchase was made or the return was initiated. | ||
| Description The Return Channel indicates the origin of the return, for example, 'Online', 'In-Store', or 'Marketplace'. Different channels may have distinct return processes, costs, and customer expectations. Analyzing performance by channel helps businesses optimize each specific process, allocate resources effectively, and understand channel-specific issues. This is a core attribute for the 'Returns Performance By Type And Channel' dashboard. Why it matters Enables performance comparison across different business channels, revealing inefficiencies or best practices specific to how returns are initiated and handled. Where to get This information is often sourced from the original Sales Order record associated with the return. It might be stored in a 'Channel' or 'Location' field. Examples Web StoreRetail StoreAmazon MarketplacePhone Order | |||
| Return Condition ReturnCondition | The assessed condition of the returned item upon inspection, such as 'New', 'Damaged', or 'Used'. | ||
| Description This attribute captures the outcome of the physical inspection of the returned item. The condition determines the subsequent steps, such as whether a full refund is issued, the item is restocked, or it needs to be discarded. Analyzing the consistency and processing times of this assessment is the focus of the 'Return Condition Assessment Quality' dashboard and is crucial for financial reconciliation and inventory management. Why it matters Directly impacts the financial outcome of the return and subsequent inventory actions. Inconsistent assessments can lead to financial loss and process rework. Where to get This is likely a custom field on the Item Receipt record or the Return Authorization record that is filled in by warehouse staff during inspection. Examples ResalableDamaged - In BoxUsed - Good ConditionMissing Parts | |||
Returns & Refund Processing Activities
| Activity | Description | ||
|---|---|---|---|
| Credit Memo Created | This activity signifies that the financial part of the return has been initiated by creating a Credit Memo. This document details the amount to be refunded to the customer and is created from the Return Authorization after the item is received and approved. | ||
| Why it matters The creation of the Credit Memo is a key financial milestone. The time between item receipt and credit memo creation reveals the efficiency of the inspection-to-credit process. Where to get This event is the creation timestamp of the CreditMemo transaction. The 'Created From' field on the Credit Memo links it back to the ReturnAuthorization. Capture Record creation date of the NetSuite CreditMemo transaction. Event type explicit | |||
| Item Received | This activity marks the physical receipt of the returned item at the warehouse or processing center. In NetSuite, this is explicitly recorded by creating an Item Receipt transaction linked to the original Return Authorization. | ||
| Why it matters This is a critical milestone that transitions the process from customer action to internal processing. The time between 'Return Approved' and 'Item Received' measures customer return speed, while the time after this event measures internal efficiency. Where to get This event is the creation timestamp of the ItemReceipt transaction. This record is directly linked to the originating ReturnAuthorization. Capture Record creation date of the NetSuite ItemReceipt transaction linked to the RA. Event type explicit | |||
| Refund Processed | This is the final financial settlement where the funds are returned to the customer. It is captured explicitly by the creation of a Customer Refund transaction, which is generated from the Credit Memo. | ||
| Why it matters This activity is critical for measuring SLA compliance and customer satisfaction. The duration from 'Credit Memo Approved' to 'Refund Processed' directly reflects the speed of the treasury or finance department. Where to get This event is the creation timestamp of the CustomerRefund transaction. The 'Created From' field on this transaction links it back to the CreditMemo. Capture Record creation date of the NetSuite CustomerRefund transaction. Event type explicit | |||
| Return Authorization Approved | This activity represents the formal approval of the customer's return request by an employee, allowing the process to move forward. It is typically captured by inferring a change in the status field of the Return Authorization record, such as from 'Pending Approval' to 'Pending Receipt'. | ||
| Why it matters Tracking this approval step is crucial for identifying bottlenecks in the initial review phase. Delays here directly impact the time it takes to inform the customer and receive the returned item. Where to get Inferred from the system notes or workflow history for the ReturnAuthorization record, specifically when the 'Status' field is updated to an approved state (e.g., 'Pending Receipt'). Capture Detect status change on the ReturnAuthorization record to an 'Approved' state. Event type inferred | |||
| Return Authorization Closed | This is the final activity, marking the administrative closure of the return case after all processing is complete. This is inferred from the final status change on the Return Authorization record to a 'Closed' state. | ||
| Why it matters As the definitive end point of the process, this activity is essential for calculating end-to-end cycle times and identifying cases that remain open long after the refund has been processed. Where to get Inferred from the system notes or workflow history for the ReturnAuthorization record when the 'Status' field is updated to its final terminal state, such as 'Closed'. Capture Detect status change on the ReturnAuthorization record to a 'Closed' state. Event type inferred | |||
| Return Authorization Created | This activity marks the initiation of the return process when a customer requests to return an item. It is captured explicitly in NetSuite through the creation of a new Return Authorization (RA) record, which serves as the primary case identifier for the return. | ||
| Why it matters As the starting point of the process, this activity is essential for measuring the total return cycle time and analyzing the volume of incoming return requests over time. Where to get This event is the creation timestamp of the ReturnAuthorization record in NetSuite. The user, date, and initial status (e.g., 'Pending Approval') are typically captured on this record. Capture Record creation date of the NetSuite ReturnAuthorization transaction. Event type explicit | |||
| Credit Memo Applied | This activity represents an alternative to a cash refund, where the credit memo is applied to an open customer invoice. It is inferred from the 'Applied To' link on the Credit Memo, indicating the credit has been used. | ||
| Why it matters Distinguishing between cash refunds and credit applications is important for financial analysis. This path represents a different type of process resolution compared to a direct refund. Where to get Inferred from the system notes or related records of the CreditMemo, specifically when it is linked to an Invoice transaction to offset a customer's balance. Capture Detect application of a CreditMemo to an Invoice transaction. Event type inferred | |||
| Credit Memo Approved | Represents the formal approval of the credit memo, often required for high-value refunds or as part of financial controls. This is inferred from a status change on the Credit Memo record, indicating it is ready for application or payment. | ||
| Why it matters If financial approvals are required, this step can be a significant bottleneck. Analyzing its duration helps streamline financial controls without delaying customer refunds. Where to get Inferred from the system notes for the CreditMemo record, specifically when an approval status field is updated from 'Pending Approval' to 'Approved' or 'Open'. Capture Detect status change on the CreditMemo transaction to an 'Approved' state. Event type inferred | |||
| Customer Notified | Represents sending a notification to the customer about a key status update, such as approval, receipt of item, or refund processed. This is typically inferred from the timestamp of a system-generated email logged under the communication tab of the record. | ||
| Why it matters Timely communication is key to customer satisfaction. Measuring the lag between a milestone and the customer notification helps identify gaps in the customer experience. Where to get Requires system analysis. Captured from the timestamp of an outbound email or user note on the Communication subtab of the ReturnAuthorization or CreditMemo. Capture Timestamp of an email or communication log entry linked to the case. Event type inferred | |||
| Exchange Order Created | This activity represents an exchange scenario where a new sales order is created for the customer instead of a refund. This event is typically captured by the creation of a Sales Order that is linked back to the original Return Authorization. | ||
| Why it matters Tracking exchanges as a distinct path helps analyze customer preferences and the efficiency of the exchange process versus the refund process. It is a common and important variant. Where to get This event is the creation timestamp of a new SalesOrder transaction. The link to the ReturnAuthorization may be in a standard or custom field, requiring system analysis. Capture Record creation date of a SalesOrder linked to the ReturnAuthorization. Event type explicit | |||
| Item Inspected | This conceptual activity represents the completion of the physical inspection of the returned item to assess its condition. As NetSuite lacks a standard 'Inspection' object, this is typically inferred from a custom field or status update on the Return Authorization or Item Receipt. | ||
| Why it matters Inspection is often a major bottleneck. Tracking its completion time is vital for analyzing agent performance, decision consistency, and its impact on the subsequent refund approval. Where to get Requires system analysis. This may be inferred from a change to a custom 'Inspection Status' field on the ReturnAuthorization record, or it might be an offline process that is not recorded. Capture Inferred from a custom status field change on the Return Authorization or Item Receipt. Event type inferred | |||
| Return Authorization Rejected | This represents the decision to deny a customer's return request, often due to policy violations. This event is captured by inferring a status change on the Return Authorization record to a 'Rejected' or 'Closed' state without further processing. | ||
| Why it matters Analyzing rejections helps identify common reasons for non-compliant return requests, which can inform customer communication and policy clarification. It's a key deviation from the happy path. Where to get Inferred from the system notes or workflow history for the ReturnAuthorization record when the 'Status' field is updated to a terminal 'Rejected' state. Capture Detect status change on the ReturnAuthorization record to a 'Rejected' state. Event type inferred | |||
Extraction Guides
Steps
- Navigate to Saved Search Creation: Log in to NetSuite. Navigate to Reports > New Search. On the New Saved Search page, click on 'Transaction'.
- Define Primary Criteria: On the Saved Search setup page, under the 'Criteria' tab and 'Standard' subtab, set the following filters to isolate the return authorization records:
TypeisReturn AuthorizationMain LineisYes- Add a
Date Createdfilter and set it to your desired date range, for example, 'within last 3 months'. This is critical for managing data volume.
- Configure Results Columns for Attributes: Go to the 'Results' tab. Add the following fields which will become the attributes in your event log. Use 'Custom Label' to rename them as needed for clarity.
- Case ID:
Document NumberorTranID(Custom Label: ReturnCaseId) - Return Status:
Status(Custom Label: ReturnAuthorizationStatus) - Processing Agent:
Created Byor a custom field if applicable (Custom Label: ProcessingAgent) - Department:
Department(Custom Label: Department) - Return Type: A custom field like
[Your Return Reason Field](Custom Label: ReturnType) - Refund Amount:
Amount(Custom Label: ActualRefundAmount)
- Case ID:
- Add Formula Columns for Event Timestamps: This is the most critical step. For each of the 12 activities, you will add a 'Formula (Date/Time)' column. Each formula uses a CASE statement to return a timestamp only if that specific event occurred. See the 'query' section for the exact formulas to use for each activity.
- Add Static Columns: Add two 'Formula (Text)' columns to your results:
- For
SourceSystem, use the formula:'NetSuite'. - For
LastDataUpdate, use a formula representing the run date, like{today}. For a precise timestamp, this will be the export time.
- For
- Save and Export the Search: Give your search a descriptive name, like 'ProcessMind Returns Extraction'. Click 'Save & Run'. Once the results are displayed, click the Export icon and choose 'CSV'.
- Transform Data into an Event Log: The exported CSV will be in a 'wide' format, with one row per return case and many columns for different event timestamps. You must transform this into a 'long' format event log. Use a tool like Microsoft Excel Power Query (Unpivot Columns), Python, or another scripting tool to perform this transformation.
- For each row in your CSV, create multiple new rows, one for each non-empty event timestamp column.
- The new, transformed table should have columns like
ReturnCaseId,ActivityName, andEventTimestamp. TheActivityNamecomes from the header of the original timestamp column (e.g., 'Return Authorization Created'), andEventTimestampis the value from that column.
- Finalize for Upload: Ensure the final CSV file has the required headers:
ReturnCaseId,ActivityName,EventTimestamp,SourceSystem,LastDataUpdate, plus any recommended attributes. The file is now ready for upload into ProcessMind.
Configuration
- Search Type: The Saved Search must be a
Transactionsearch. - Date Range: It is crucial to apply a date range filter on the
Date Createdfield of the Return Authorization. A range of 3-6 months is recommended to balance data completeness with performance. - Primary Filter: The search must be filtered for
TypeisReturn AuthorizationandMain LineisYesto ensure one initial record per return case. - Custom Fields: The accuracy of this extraction, especially for conceptual events like 'Item Inspected' or attributes like 'Return Type', depends heavily on your organization's use of custom fields on transaction records. The provided formulas include placeholders like
{custbody_...}which must be adjusted to match your NetSuite configuration. - User Permissions: The user running the search needs view permissions for all transaction types involved: Return Authorization, Item Receipt, Credit Memo, Customer Refund, and Sales Order.
- Performance: For accounts with a very high volume of returns, this comprehensive search can be slow. Consider running it during off-peak hours or scheduling it to export automatically to the file cabinet.
a Sample Query config
This configuration represents the settings in the NetSuite Saved Search UI. The 'Results' tab should be configured with the following columns and formulas.
**Criteria Tab:**
* `Type` = `Return Authorization`
* `Main Line` = `true`
* `Date Created` = `[Specify Desired Date Range]`
**Results Tab (Columns):**
| Custom Label | Field / Formula Type | Formula / Field ID |
|---|---|---|
| `ReturnCaseId` | Formula (Text) | `{tranid}` |
| `SourceSystem` | Formula (Text) | `'NetSuite'` |
| `LastDataUpdate` | Formula (Date/Time) | `{today}` |
| `ReturnAuthorizationStatus` | Field | `Status` |
| `ProcessingAgent` | Field | `Created By` |
| `Department` | Field | `Department` |
| `ReturnType` | Field | `{custbody_return_reason}` |
| `ActualRefundAmount` | Field | `Amount` |
| `CycleTime` | Formula (Numeric) | `CASE WHEN {status} = 'Closed' THEN {lastmodifieddate} - {datecreated} ELSE NULL END` |
| `Activity_ReturnAuthorizationCreated` | Field | `Date Created` |
| `Activity_ReturnAuthorizationApproved` | Formula (Date/Time) | `MIN(CASE WHEN {systemnotes.newvalue} = 'Pending Receipt' AND {systemnotes.field} = 'Status' THEN {systemnotes.date} ELSE NULL END)` |
| `Activity_ReturnAuthorizationRejected` | Formula (Date/Time) | `MIN(CASE WHEN {systemnotes.newvalue} = 'Rejected' AND {systemnotes.field} = 'Status' THEN {systemnotes.date} ELSE NULL END)` |
| `Activity_ItemReceived` | Formula (Date/Time) | `{applyingtransaction.trandate}` |
| `Activity_ItemInspected` | Formula (Date/Time) | `CASE WHEN {custbody_inspection_status} = 'Complete' THEN {custbody_inspection_date} ELSE NULL END` |
| `Activity_CreditMemoCreated` | Formula (Date/Time) | `{createdfrom.trandate}` |
| `Activity_CreditMemoApproved` | Formula (Date/Time) | `MIN(CASE WHEN {createdfrom.systemnotes.newvalue} = 'Open' AND {createdfrom.systemnotes.field} = 'Status' THEN {createdfrom.systemnotes.date} ELSE NULL END)` |
| `Activity_RefundProcessed` | Formula (Date/Time) | `{createdfrom.appliedtotransaction.trandate}` |
| `Activity_CreditMemoApplied` | Formula (Date/Time) | `CASE WHEN {createdfrom.status} = 'Fully Applied' AND {createdfrom.appliedtotransaction.type} = 'Invoice' THEN {createdfrom.appliedtotransaction.date} ELSE NULL END` |
| `Activity_ExchangeOrderCreated` | Formula (Date/Time) | `{custbody_exchange_order.trandate}` |
| `Activity_CustomerNotified` | Formula (Date/Time) | `MAX({messages.messagedate})` |
| `Activity_ReturnAuthorizationClosed` | Formula (Date/Time) | `MIN(CASE WHEN {systemnotes.newvalue} = 'Closed' AND {systemnotes.field} = 'Status' THEN {systemnotes.date} ELSE NULL END)` | Steps
- Enable SuiteAnalytics Connect: Ensure you have a SuiteAnalytics Connect license for your NetSuite account. An administrator must enable the feature under Setup > Company > Enable Features > Analytics.
- Assign User Permissions: Grant the connecting user role the 'SuiteAnalytics Connect' permission. This user will also need view permissions for all records being queried, such as Transactions, Employees, and Customers.
- Install the ODBC Driver: Download and install the appropriate NetSuite ODBC driver for your operating system from the SuiteAnalytics Connect download page in NetSuite.
- Configure the DSN: Set up a Data Source Name (DSN) on the machine where you will run the query. Input your Service Data Source, Server Hostname, Port, Role ID, Account ID, and credentials.
- Connect Your SQL Client: Use a SQL client, such as DBeaver or Microsoft SQL Server Management Studio, to connect to NetSuite using the DSN you configured.
- Prepare the SQL Query: Copy the provided SQL query into your client. This query is designed to extract all key events in the returns and refund process.
- Customize the Query: Modify the placeholder values in the query. At a minimum, you must update the date range in the
ReturnAuthorizationsCommon Table Expression (CTE) to filter for the desired time period. You may also need to adjust custom field names, likeCUSTBODY_RETURN_TYPE, or specific status values to match your NetSuite configuration. - Execute the Query: Run the customized SQL query against the NetSuite database replica. The execution time may vary depending on the date range and data volume.
- Review and Export Data: Once the query completes, review the results to ensure they appear correct. Export the entire result set to a CSV file.
- Finalize for Upload: Ensure the CSV file headers match the required attributes:
ReturnCaseId,ActivityName,EventTimestamp,SourceSystem,LastDataUpdate, etc. Verify theEventTimestampcolumn is in a consistent date/time format. The file is now ready for upload to ProcessMind.
Configuration
- Prerequisites: A NetSuite license with the SuiteAnalytics Connect add-on module is required. The user running the connection must have a role with the 'SuiteAnalytics Connect' permission and read-access to transaction, entity, and employee records.
- Data Source Configuration: You must configure a DSN (Data Source Name) using the NetSuite ODBC driver. This requires your Account ID, Role ID, and credentials. The service host is typically
odbcserver.netsuite.comfor production environments. - Date Range Filtering: It is critical to apply a date range filter to the initial CTE that selects Return Authorizations. Without a filter, the query will attempt to pull all returns data and will likely be very slow or time out. A range of 3 to 6 months is recommended for initial analysis.
- Key Transaction Types: The query targets several core transaction types: ReturnAuthorization, ItemReceipt, CreditMemo, CustomerRefund, and SalesOrd (for exchanges). Ensure your process uses these standard objects.
- Custom Field Dependencies: Activities such as 'Item Inspected' and attributes like 'Return Type' are often captured in custom fields. The provided query uses placeholders like
CUSTBODY_INSPECTION_STATUSandCUSTBODY_RETURN_TYPE. You must identify the correct custom field IDs in your system and update the query accordingly. - Performance Considerations: This is a complex query with multiple joins and a large
UNION ALLstructure. Execute it during off-peak hours to minimize impact on system performance. For very large datasets, consider running the query for smaller time increments and appending the results.
a Sample Query sql
WITH ReturnAuthorizations AS (
SELECT
T.TRANSACTION_ID AS ReturnCaseId,
T.TRANDATE
FROM
TRANSACTION T
WHERE
T.TYPE = 'ReturnAuthorization'
AND T.TRANDATE BETWEEN TO_DATE('[YYYY-MM-DD]', 'YYYY-MM-DD') AND TO_DATE('[YYYY-MM-DD]', 'YYYY-MM-DD')
)
SELECT
RA.ReturnCaseId AS "ReturnCaseId",
'Return Authorization Created' AS "ActivityName",
T.CREATED_DATE AS "EventTimestamp",
'NetSuite' AS "SourceSystem",
CURRENT_TIMESTAMP AS "LastDataUpdate",
T.STATUS AS "ReturnAuthorizationStatus",
E.full_name AS "ProcessingAgent",
D.full_name AS "Department",
T.CUSTBODY_RETURN_TYPE AS "ReturnType",
NULL AS "ActualRefundAmount",
NULL AS "CycleTime"
FROM TRANSACTION T
INNER JOIN ReturnAuthorizations RA ON T.TRANSACTION_ID = RA.ReturnCaseId
LEFT JOIN EMPLOYEE E ON T.CREATED_BY_ID = E.EMPLOYEE_ID
LEFT JOIN DEPARTMENT D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID
UNION ALL
SELECT
RA.ReturnCaseId,
'Return Authorization Approved' AS "ActivityName",
SN.NOTE_DATE AS "EventTimestamp",
'NetSuite' AS "SourceSystem",
CURRENT_TIMESTAMP AS "LastDataUpdate",
SN.NEW_VALUE AS "ReturnAuthorizationStatus",
E.full_name AS "ProcessingAgent",
D.full_name AS "Department",
T.CUSTBODY_RETURN_TYPE AS "ReturnType",
NULL AS "ActualRefundAmount",
NULL AS "CycleTime"
FROM SYSTEM_NOTES SN
INNER JOIN TRANSACTION T ON SN.TRANSACTION_ID = T.TRANSACTION_ID
INNER JOIN ReturnAuthorizations RA ON T.TRANSACTION_ID = RA.ReturnCaseId
LEFT JOIN EMPLOYEE E ON SN.AUTHOR_ID = E.EMPLOYEE_ID
LEFT JOIN DEPARTMENT D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID
WHERE SN.FIELD = 'TRANSACTION.STATUS' AND SN.NEW_VALUE = 'Pending Receipt'
UNION ALL
SELECT
RA.ReturnCaseId,
'Return Authorization Rejected' AS "ActivityName",
SN.NOTE_DATE AS "EventTimestamp",
'NetSuite' AS "SourceSystem",
CURRENT_TIMESTAMP AS "LastDataUpdate",
SN.NEW_VALUE AS "ReturnAuthorizationStatus",
E.full_name AS "ProcessingAgent",
D.full_name AS "Department",
T.CUSTBODY_RETURN_TYPE AS "ReturnType",
NULL AS "ActualRefundAmount",
NULL AS "CycleTime"
FROM SYSTEM_NOTES SN
INNER JOIN TRANSACTION T ON SN.TRANSACTION_ID = T.TRANSACTION_ID
INNER JOIN ReturnAuthorizations RA ON T.TRANSACTION_ID = RA.ReturnCaseId
LEFT JOIN EMPLOYEE E ON SN.AUTHOR_ID = E.EMPLOYEE_ID
LEFT JOIN DEPARTMENT D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID
WHERE SN.FIELD = 'TRANSACTION.STATUS' AND SN.NEW_VALUE IN ('Rejected', 'Closed')
UNION ALL
SELECT
RA.ReturnCaseId,
'Item Received' AS "ActivityName",
IR.CREATED_DATE AS "EventTimestamp",
'NetSuite' AS "SourceSystem",
CURRENT_TIMESTAMP AS "LastDataUpdate",
T_RA.STATUS AS "ReturnAuthorizationStatus",
E.full_name AS "ProcessingAgent",
D.full_name AS "Department",
T_RA.CUSTBODY_RETURN_TYPE AS "ReturnType",
NULL AS "ActualRefundAmount",
NULL AS "CycleTime"
FROM TRANSACTION IR
INNER JOIN TRANSACTION T_RA ON IR.CREATED_FROM_ID = T_RA.TRANSACTION_ID
INNER JOIN ReturnAuthorizations RA ON T_RA.TRANSACTION_ID = RA.ReturnCaseId
LEFT JOIN EMPLOYEE E ON IR.CREATED_BY_ID = E.EMPLOYEE_ID
LEFT JOIN DEPARTMENT D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID
WHERE IR.TYPE = 'ItemReceipt'
UNION ALL
SELECT
RA.ReturnCaseId,
'Item Inspected' AS "ActivityName",
SN.NOTE_DATE AS "EventTimestamp",
'NetSuite' AS "SourceSystem",
CURRENT_TIMESTAMP AS "LastDataUpdate",
T.STATUS AS "ReturnAuthorizationStatus",
E.full_name AS "ProcessingAgent",
D.full_name AS "Department",
T.CUSTBODY_RETURN_TYPE AS "ReturnType",
NULL AS "ActualRefundAmount",
NULL AS "CycleTime"
FROM SYSTEM_NOTES SN
INNER JOIN TRANSACTION T ON SN.TRANSACTION_ID = T.TRANSACTION_ID
INNER JOIN ReturnAuthorizations RA ON T.TRANSACTION_ID = RA.ReturnCaseId
LEFT JOIN EMPLOYEE E ON SN.AUTHOR_ID = E.EMPLOYEE_ID
LEFT JOIN DEPARTMENT D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID
WHERE SN.FIELD = 'TRANSACTION.CUSTBODY_INSPECTION_STATUS' AND SN.NEW_VALUE = 'Completed'
UNION ALL
SELECT
RA.ReturnCaseId,
'Credit Memo Created' AS "ActivityName",
CM.CREATED_DATE AS "EventTimestamp",
'NetSuite' AS "SourceSystem",
CURRENT_TIMESTAMP AS "LastDataUpdate",
T_RA.STATUS AS "ReturnAuthorizationStatus",
E.full_name AS "ProcessingAgent",
D.full_name AS "Department",
T_RA.CUSTBODY_RETURN_TYPE AS "ReturnType",
NULL AS "ActualRefundAmount",
NULL AS "CycleTime"
FROM TRANSACTION CM
INNER JOIN TRANSACTION T_RA ON CM.CREATED_FROM_ID = T_RA.TRANSACTION_ID
INNER JOIN ReturnAuthorizations RA ON T_RA.TRANSACTION_ID = RA.ReturnCaseId
LEFT JOIN EMPLOYEE E ON CM.CREATED_BY_ID = E.EMPLOYEE_ID
LEFT JOIN DEPARTMENT D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID
WHERE CM.TYPE = 'CreditMemo'
UNION ALL
SELECT
RA.ReturnCaseId,
'Credit Memo Approved' AS "ActivityName",
SN.NOTE_DATE AS "EventTimestamp",
'NetSuite' AS "SourceSystem",
CURRENT_TIMESTAMP AS "LastDataUpdate",
SN.NEW_VALUE AS "ReturnAuthorizationStatus",
E.full_name AS "ProcessingAgent",
D.full_name AS "Department",
T_RA.CUSTBODY_RETURN_TYPE AS "ReturnType",
NULL AS "ActualRefundAmount",
NULL AS "CycleTime"
FROM SYSTEM_NOTES SN
INNER JOIN TRANSACTION CM ON SN.TRANSACTION_ID = CM.TRANSACTION_ID
INNER JOIN TRANSACTION T_RA ON CM.CREATED_FROM_ID = T_RA.TRANSACTION_ID
INNER JOIN ReturnAuthorizations RA ON T_RA.TRANSACTION_ID = RA.ReturnCaseId
LEFT JOIN EMPLOYEE E ON SN.AUTHOR_ID = E.EMPLOYEE_ID
LEFT JOIN DEPARTMENT D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID
WHERE CM.TYPE = 'CreditMemo' AND SN.FIELD = 'TRANSACTION.APPROVAL_STATUS' AND SN.NEW_VALUE = 'Approved'
UNION ALL
SELECT
RA.ReturnCaseId,
'Refund Processed' AS "ActivityName",
REF.CREATED_DATE AS "EventTimestamp",
'NetSuite' AS "SourceSystem",
CURRENT_TIMESTAMP AS "LastDataUpdate",
T_RA.STATUS AS "ReturnAuthorizationStatus",
E.full_name AS "ProcessingAgent",
D.full_name AS "Department",
T_RA.CUSTBODY_RETURN_TYPE AS "ReturnType",
ABS(REF.TOTAL) AS "ActualRefundAmount",
NULL AS "CycleTime"
FROM TRANSACTION REF
INNER JOIN TRANSACTION CM ON REF.APPLIED_TO_TRANSACTION_ID = CM.TRANSACTION_ID
INNER JOIN TRANSACTION T_RA ON CM.CREATED_FROM_ID = T_RA.TRANSACTION_ID
INNER JOIN ReturnAuthorizations RA ON T_RA.TRANSACTION_ID = RA.ReturnCaseId
LEFT JOIN EMPLOYEE E ON REF.CREATED_BY_ID = E.EMPLOYEE_ID
LEFT JOIN DEPARTMENT D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID
WHERE REF.TYPE = 'CustomerRefund'
UNION ALL
SELECT
RA.ReturnCaseId,
'Credit Memo Applied' AS "ActivityName",
SN.NOTE_DATE AS "EventTimestamp",
'NetSuite' AS "SourceSystem",
CURRENT_TIMESTAMP AS "LastDataUpdate",
SN.NEW_VALUE AS "ReturnAuthorizationStatus",
E.full_name AS "ProcessingAgent",
D.full_name AS "Department",
T_RA.CUSTBODY_RETURN_TYPE AS "ReturnType",
NULL AS "ActualRefundAmount",
NULL AS "CycleTime"
FROM SYSTEM_NOTES SN
INNER JOIN TRANSACTION CM ON SN.TRANSACTION_ID = CM.TRANSACTION_ID
INNER JOIN TRANSACTION T_RA ON CM.CREATED_FROM_ID = T_RA.TRANSACTION_ID
INNER JOIN ReturnAuthorizations RA ON T_RA.TRANSACTION_ID = RA.ReturnCaseId
LEFT JOIN EMPLOYEE E ON SN.AUTHOR_ID = E.EMPLOYEE_ID
LEFT JOIN DEPARTMENT D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID
WHERE CM.TYPE = 'CreditMemo' AND SN.FIELD = 'TRANSACTION.STATUS' AND SN.NEW_VALUE = 'Fully Applied'
UNION ALL
SELECT
RA.ReturnCaseId,
'Exchange Order Created' AS "ActivityName",
SO.CREATED_DATE AS "EventTimestamp",
'NetSuite' AS "SourceSystem",
CURRENT_TIMESTAMP AS "LastDataUpdate",
T_RA.STATUS AS "ReturnAuthorizationStatus",
E.full_name AS "ProcessingAgent",
D.full_name AS "Department",
T_RA.CUSTBODY_RETURN_TYPE AS "ReturnType",
NULL AS "ActualRefundAmount",
NULL AS "CycleTime"
FROM TRANSACTION SO
INNER JOIN TRANSACTION T_RA ON SO.CREATED_FROM_ID = T_RA.TRANSACTION_ID
INNER JOIN ReturnAuthorizations RA ON T_RA.TRANSACTION_ID = RA.ReturnCaseId
LEFT JOIN EMPLOYEE E ON SO.CREATED_BY_ID = E.EMPLOYEE_ID
LEFT JOIN DEPARTMENT D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID
WHERE SO.TYPE = 'SalesOrd'
UNION ALL
SELECT
RA.ReturnCaseId,
'Customer Notified' AS "ActivityName",
MSG.MESSAGE_DATE AS "EventTimestamp",
'NetSuite' AS "SourceSystem",
CURRENT_TIMESTAMP AS "LastDataUpdate",
T.STATUS AS "ReturnAuthorizationStatus",
E.full_name AS "ProcessingAgent",
D.full_name AS "Department",
T.CUSTBODY_RETURN_TYPE AS "ReturnType",
NULL AS "ActualRefundAmount",
NULL AS "CycleTime"
FROM MESSAGES MSG
INNER JOIN TRANSACTION T ON MSG.TRANSACTION_ID = T.TRANSACTION_ID
INNER JOIN ReturnAuthorizations RA ON T.TRANSACTION_ID = RA.ReturnCaseId
LEFT JOIN EMPLOYEE E ON MSG.AUTHOR_ID = E.EMPLOYEE_ID
LEFT JOIN DEPARTMENT D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID
WHERE MSG.INCOMING = 'F'
UNION ALL
SELECT
RA.ReturnCaseId,
'Return Authorization Closed' AS "ActivityName",
SN.NOTE_DATE AS "EventTimestamp",
'NetSuite' AS "SourceSystem",
CURRENT_TIMESTAMP AS "LastDataUpdate",
SN.NEW_VALUE AS "ReturnAuthorizationStatus",
E.full_name AS "ProcessingAgent",
D.full_name AS "Department",
T.CUSTBODY_RETURN_TYPE AS "ReturnType",
NULL AS "ActualRefundAmount",
NULL AS "CycleTime"
FROM SYSTEM_NOTES SN
INNER JOIN TRANSACTION T ON SN.TRANSACTION_ID = T.TRANSACTION_ID
INNER JOIN ReturnAuthorizations RA ON T.TRANSACTION_ID = RA.ReturnCaseId
LEFT JOIN EMPLOYEE E ON SN.AUTHOR_ID = E.EMPLOYEE_ID
LEFT JOIN DEPARTMENT D ON E.DEPARTMENT_ID = D.DEPARTMENT_ID
WHERE T.TYPE = 'ReturnAuthorization' AND SN.FIELD = 'TRANSACTION.STATUS' AND SN.NEW_VALUE LIKE '%Closed%';