- Build ML Model for Selecting Courier Partner which should lead to better customer satisfaction along with Automating complete shipping process right from generating AWB no then, Editing Label as per the client's requirement and Finally sending PDF Label as an attachment via email to Printing Executive along with a WhatsApp notification to Packing Representative.
- On Razorpay webhook Trigger, we want AWS lambda + AWS CloudWatch to Schedules execution of script after 30 min
- Selecting courier partner is manual, we have to automate that with high performance courier partner ML Model build on previous data.
- Client don't want his address and contact details should be printed label.
- Sending edited PDF Label to Printing Executive over Mail so that he can print label and provide it to Packing Team.
- Sending WhatsApp Notification to Packaging Executive so that he can start packing.
- Client wants to execute entire Process to happen after 30 minutes from placing order.
- Build an ML Model which first….
- Use of PDF.CO API for Editing PDF Label as per the requirement.
- By using Google Cloud Gmail API via oAuth 2.0
- By using Twilio API using Sandbox 2.0
- Hosted complete project on AWS then after webhook request from Razorpay, Script is scheduled to run after 30 min by using AWS Lambda and AWS CloudWatch.
- Selecting Best courier partner as per the previous performance of the courier partner.
- Shipping Automation
- Fetching all orders details
- Filtering order status & storing shipping id
- Generating AWB for respective courier partner ( assisted by ML Model)
- Scheduling pickup for earliest date
- Generating Packing Label
- Removing shipper address from generated pdf label
- Download final label
- Sending Gmail to Printing Team with Label PDF attachment
- Sending WhatsApp Notification to Packing Team
- Use AWS S3 to upload
.zip
file of code to AWS Lambda because after all packages size > 30 MB - replace
main()
todef lambda_handler(event, context):
- rename
app.py
tolambda_function.py
- Don't forget to include
Google.py
(It's has oAuth 2.0 Script) - Use
pip install package-name -t directory_name
to install all required library - In Lambda function, change
timeout
configuration from by default 3 sec to 15 min (else script will stop working in between) - In AWS EventBridge, set
cron()
function as per requirement so, Refer: cron() function - Don't forget to include
token.json
(generated by OAuth 2.0) andcredentials.json
(GCloud) while making.zip
to upload it in S3
Work under progress
- Generate All your
API Keys
andCredentials
from API Links provided below - Change
Localhost Port
(If running locally) eg, 4080 - Replace the credentials within
app.py
file - Do required changes as mentioned above for AWS
- Run 🚀🚀 and Save your Time
- G-Cloud oAuth 2.0 : https://developers.google.com/gmail/api/quickstart/python
- Shiprocket API : https://apidocs.shiprocket.in/#8a56b4d6-b418-43cf-be25-ead62532aa18
- PDF.co API : https://apidocs.pdf.co/#pdfco-api-v100
- Twilio API : https://www.twilio.com/docs/conversations/quickstart
PS: This Automation will save a salary of 1 person 🚀
Approx . (20k/month) 🥳
🥂 Party toh banti hai, boss! 🥂