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.
We can extract the refund logic into a workflow to be used by other Superblocks applications, internal applications, or webhooks.
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.
Then we pass this information to an internal GraphQL API that processes the refund.
Finally, we send a confirmation email with tracking information to the customer.
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.