Skip to main content

Refund Order with Python, GraphQL, and Email

Create a shipping label with Python, process a refund with GraphQL, and send an email to the customer

Here we have an application that includes a button to refund an order.

Make use of event triggers on UI components to call Superblocks workflows.

We can extract the refund logic into a workflow to be used by other Superblocks applications, internal applications, or webhooks.

Setting Workflow query parameters and body variables

This particular Refund_Order workflow includes a Python step that calls our shipping vendor’s API to generate a shipping label and attach a return merchandise authorization (RMA) number to it.

Business logic handled in code with JavaScript or Python

Then we pass this information to an internal GraphQL API that processes the refund.

Integrate with many services including GraphQL

Finally, we send a confirmation email with tracking information to the customer.

Send emails to users with dynamic customizable templates

We can execute the all the steps by running the workflow which will create the shipping label and tracking number, process the refund internally, and send the email to the customer.

Emails, slacks, twitter posts, send to all