Automatic refunds on shopify-connector

Automatic refunds on shopify-connector

Availability notice: this feature is currently only available in the qualification version V63 of the shopify-connector. It is not yet available in production.

This feature automates refunds for an entire order or specific items when a refund process is initiated via OneStock.

*refund process: Configured within OneStock, the refund process triggers by a notification during a line item group transition.

Setup example:

1. Enable automatic refunds:

Enable the Automatic refunds parameter on the connector configuration page.

Other options include:

  • Notify customer on refund creation: Notifies the customer when a refund is created.

  • Refund shipping fee: Refunds shipping costs only when all items in the order are refunded. Partial refunds, such as one item out of two, do not trigger shipping fee refunds even if enabled.

Enabling Automatic refunds creates the shopify_refund topic and a webhook linked to it.

Disabling this parameter deletes the topic and its webhook.

2. Create the notification linked to the topic:

In the client's back office in Onestock, create a notification under Configuration > Outbound Messages > Notifications. Add the notification pointing to the shopify_refund topic:

{ "refund_create": { "media": { "webhook_topic": [ "shopify_refund" ] }, "time_type": "duration", "time_value": "0s" } }

(Here, refund_create is arbitrary.)

3. Attach the notification sending to a line_item_group transition:

Define when to initiate a refund by modifying the workflow at the line item group level. Add the created notification sending on the transition between states.

In the client's back office, under the Workflow > Line item group tab, to trigger a refund when a line item changes from Fulfilled to Refunded, add the action Send a notification in the Actions after section of the transition. Use the previously created notification ID.

The Send notification action appears in the Actions after.

When a line item transitions from Fulfilled > Refunded, a notification sends to the connector, triggering the refund process in Shopify.