Welcome back 🙂 , In this blog post, we are going to learn how to read the details from the Business Card or Visiting card and then create either lead/contact or any custom object record.
Before we get started, if you have not gone through with the earlier blog post as those are related to this blog post.
Let’s start with the development. Fist let’s check how the UI will look like.
Create a Lightning Web Component
So, for the User Interface, we are going to use the lightning web component. Create a Lightning Web Component and you can name it anything. Here is the code for the same
Modify Our Existing Apex Class “EinsteinOCRService“
In our existing class, we have added a new method which is readBusinessCardBase64 which accepts 2 parameters sampleBusinessCard in base64 format and objectName the name of the object where you wanted to insert the record.
Find the complete code here
Remember, we discuss the new body parameter value. Let’s make the change in another existing class “EinsteinAPIService“. Here is the updated code.
Let’s check out the demo
Thanks for reading 🙂 😉