We have a system that imports orders from Shopify to Xero, using a script that has been written in PYTHON and used in on serverless framework to deploy into AWS.
The deployment of the script uses following AWS components
API Gateway: It is the entry point of the script. The endpoint of this is set in the SHOPIFY Notifications for order create. There is a method called WEBHOOK Listener which is called by Shopify.
Webhook listener stores the order info received into a QUEUE. i.e., AWS SQS for further processing.
There is a another method, called create Xero invoice, which starts automatically when the entry is created in the queue.
The create Xero invoice routine, does the following
a. Creates the Xero token and store it in AWS S3 file for further reference
b. And other things like searching for contact, searching for product and creates the invoice appropriately.
We need someone to help us identify bugs, and then later, provide a fix for the bugs.
We have three bugs.
1. Invoices duplicating on Xero (sometimes posting 20-30 times) - this is due to the Lambda failing (it invokes the lambda function repeatedly). We need to update SQS parameters so that repeated failures arent invoked again and again Then the Lambda needs to complete its processing within the required window otherwise it'll timeout. Finally a proper lambda response needs to be generated upon successful invoke. 2. Invoices being missed and failing to import (no validation) - Not diagnosed. 3. Delivery charges being missed (as not a product field, another field must be added to the script to capture the delivery charge). - Not diagnosed.