AWS for Industries

Managing Custom Clearance Risk in a Global Supply Chain

AWS_Animated_Banner_1600x200

In our previous blog, How to Build a Dynamic Supply Chain Platform: A Primer, we discussed how companies can proactively manage market events in a global supply chain using AWS. In this post, we will focus on how companies can manage customs clearance risk in the same supply chain by using AWS artificial intelligence and machine learning (AI/ML) cloud services.

The complexities of customs clearance

Customs clearance is one of the most challenging aspects of moving goods across borders in a global supply chain. One reason is the management of the various document types in international shipping, such as commercial invoices, bills of lading, airway bills, and arrival notices, as illustrated in the following figure. When information conflicts across the different documents, customs agents may open and inspect containers, thereby causing delays that ultimately lead to unhappy retail customers and consumers.

The complexities of customs clearance

Click to enlarge

An AWS solution to proactively correct conflicting data

By using AWS AI/ML cloud services to extract relationships, structure, and text from complex international shipping paperwork, freight forwarders can proactively review, compare, and correct conflicting data prior to customs clearance to avoid unnecessary inspections. This is also aided by integrating these services with other AWS services to develop dynamic web and mobile applications. Flexible pay-as-you-go approach to pricing means that companies only pay for the individual services that they need, when they use them, without long-term contracts or complex licensing.

The following figure is a sample reference architecture incorporating several AWS services that, when integrated together, can create an automated process to extract, verify, and reconcile data from customs clearance paperwork. We describe each step of the reference architecture in detail in the following section.

AWS solution to proactively correct conflicting data

Click to enlarge

  1. Customs forms and supporting documents, as shown in the first figure, are scanned and loaded into Amazon Simple Storage Service (Amazon S3). Refer to this post to learn more about how you can scan and upload documents to Amazon S3 using AWS services. Alternatively, you can look at the available products in the AWS Marketplace or conduct your own research to see what commercially available products can scan and upload documents into Amazon S3.
  1. After documents are loaded into an S3 bucket, an AWS Lambda function is triggered using Amazon S3 Event Notifications. The Lambda function calls AWS AI/ML cloud services to extract specific customs data from the documents. Depending on the complexity and format of the documents, you can choose between using predefined ML models with Amazon Textract and Amazon Comprehend, or build your own custom ML models using Amazon SageMaker. Amazon Textract is an AI/ML service with predefined ML models that can accurately extract unstructured text, data from forms and tables, as well as handwritten text —all without custom code. This post has more details on this functionality. However, Amazon Textract alone can’t be sufficient to extract data from the many different documents listed in the first figure. Amazon Textract can easily identify and categorize data from forms and tables into key-value pairs. However, for documents, that can have paragraphs of text with names and other important terms, such as the bank letter of credit, you can use Amazon Textract to extract unstructured text from a document. Then you can use Amazon Comprehend, a natural language processing service, to extract key-value pairs. This post has more information on this multi-step process.

On the other hand, if your company has data scientists with skills to build ML models, then you can use Amazon SageMaker to develop custom models to extract key information from documents. Amazon SageMaker provides purpose-built tools for every step of ML development, including labeling, data preparation, feature engineering, statistical bias detection, auto-ML, training, tuning, hosting, explainability, monitoring, and workflows.

Since extracting data from documents is a crucial step in verifying customs compliance, companies must incorporate some human oversight to review and ensure data accuracy, retrain prebuilt or custom AI and ML models when necessary, and optimize overall processes. You can use Amazon Augmented AI, an AI/ML service that readily integrates with Amazon Textract, Amazon Comprehend, and Amazon SageMaker, to enable human-review steps in the automated processes. For example, you can set thresholds for accuracy predictions that trigger a human review and correction if accuracy predictions fall below the threshold.

  1. You can save information extracted by the AI /ML models as files in Amazon S3, or you can also save key value pairs, tables, and key entities in Amazon DynamoDB. Amazon DynamoDB is a fully managed NoSQL database service that can store and retrieve any amount of data and serve any level of request traffic.
  1. You can use AWS Amplify, a set of tools (open-source framework, admin UI, console) and services (static web hosting) to create web and mobile applications that invoke microservice APIs developed with AWS Lambda and exposed via Amazon API Gateway or AWS AppSync. AWS AppSync lets you optimize application performance to enhance the user experience by providing targeted access to the data needed with a query language called GraphQL. The microservices provide the logic to perform the reconciliations on extracted data that’s stored in DynamoDB. For example, you can use the web or mobile application to verify order quantities are consistent across the purchase order, commercial invoice, certificate of origin, bill of lading, and packing list.
  1. You can load data from DynamoDB into Amazon Redshift, a cloud native data warehouse, to perform complex data analysis. Then, you can use Amazon QuickSight, a scalable, serverless, embeddable, ML-powered BI service, to build, create, and publish interactive BI dashboards and receive answers through natural language queries. The dashboards can be embedded into the web application for a seamless, robust user experience.

AWS can help you manage customs clearance risk

Using this AWS solution, companies can intelligently, efficiently, and cost-effectively extract and reconcile data from customs paperwork, thereby dramatically reducing the risk of delays at the port of entry. To get started on a proof-of-concept or implementation project using this architecture, contact your AWS account team today. To learn more about other cloud-based solutions that can transform your supply chain, visit the AWS Retail webpage.

Furthermore, stay tuned for the next installment in this blog series to learn more about how AWS is innovating across the supply chain to meet the demands of our dynamic global economy.

Sanjeev Pulapaka

Sanjeev Pulapaka

Sanjeev Pulapaka is a Senior Solutions Architect in the US Fed Civilian SA team at AWS. He works closely with customers in building and architecting mission critical solutions. Sanjeev has extensive experience in leading, architecting, and implementing high-impact technology solutions that address diverse business needs in multiple sectors, including commercial, federal, state, and local governments. He has an undergraduate degree in engineering from the Indian Institute of Technology and an MBA from the University of Notre Dame.

Dnyanesh Patkar

Dnyanesh Patkar

Dnyanesh Patkar is the Head of Transportation and Logistics in AWS Industries. In his role, he works with customers to envision, develop, and execute transformational business and operating model strategies in this space. He is a seasoned executive, and his background includes leading business transformation programs, serving in general management roles with P&L responsibility, and creating high-performance teams. He has over 25 years of experience at companies such as Schneider National, DiamondCluster, and National Semiconductor. Dnyanesh has his MBA from the Wharton School of Business and a Master of Engineering from Cornell University. Dnyanesh is based out of the AWS Atlanta office.