To view this content in our official product documentation, click here.
Introduction
A GraphQL query searches for orders in Shopify that were last modified after a given date, and are in a refunded state. The lookback date is calculated by referencing a date flow variable in the updated_at section of the GraphQL query.
The flow then searches for matching orders in NetSuite (using the order name), retrieving order details and order lines.
After this, a script determines which specific lines are being refunded by matching the return lines with their SKUs. It then creates an RMA (Return Merchandise Authorisation) from the sales order, followed by a credit memo.
The manual payload before the credit memo contains `{}` - this triggers the RMA ➤ credit memo conversion. The set variables shape sets a meta variable for `rmaid` , with the value derived from incoming Netsuite RMA IDs - this fully converts the RMA into a credit memo.
Limitations
There are no limitations to note for this flow.
Assumptions
There are no assumptions to note for this flow.
Customisation
To ensure that this process flow runs as required, some customisation options are available. These are documented in the following sections:
Flow variables
The table below summarises flow variables defined for this process flow.
| Flow variable | Summary | Default value |
|---|---|---|
date |
Set the relative time period to look back for new orders in Shopify. Update the default value as required. | -1 minute |
For information on working with flow variables, please refer to our flow variables documentation.
Process flow shapes
This process flow includes some shapes that can be configured with your own settings. Please see guidelines in the table below.
{% hint style="warning" %} Shape settings determine the outcome of process flows. Do not change shape settings unless they are listed below. {% endhint %}
| Shape | Notes |
|---|---|
| Trigger | This GraphQL query on the Shopify connector retrieves orders that have been updated since your given lookback period (based on the value of the date flow variable). You should ensure that the trigger schedule aligns with your lookback period, or run this flow manually. |
| Connector (Shopify) | If you did not add or select a Shopify instance during the blueprint installation process, the following settings must be configured:Source instance : Set to your required Shopify instance.Source endpoint : Set to POST Get refunded orders via graphqlVariables : Leave the filter variable as it defaults. This variable references your date flow variable to determine the lookback period for new orders. Make sure this flow variable is set as required. |
| Connector (NetSuite) |
If you did not add or select a NetSuite instance during the blueprint installation process, the following settings must be configured:
|
| Connector (NetSuite) |
If you did not add or select a NetSuite instance during the blueprint installation process, the following settings must be configured:
|
| Connector (NetSuite) |
If you did not add or select a NetSuite instance during the blueprint installation process, the following settings must be configured:
|
Reference
Reference information for this process flow is documented in the following sections:
- Operations count
- Scripts used in this process flow
- Cross-reference lookups used in this process flow
Operations count
The operations count for this process flow is: x per order.
Scripts in this process flow
| Script | Summary |
|---|---|
| Determine refund lines for Netsuite | Checks order lines to determine what lines are needed for the refund. |
| Pull Netsuite ID from RMA header | Pulls the NetSuite ID from response so it can be used again. |
Cross-reference lookups in this process flow
This process flow does not use cross-reference lookups.
Comments
0 comments
Please sign in to leave a comment.