wanted to know , how can I capture the firstName coming from WebChat in Inbound Chat architect script on PureCloud , can you please confirm if "Chat.Guest.displayName" is the correct way to capture it in Architect chat script or I should use some other variable.
No, it is not the right attribute name to capture firstName.
"Chat.Guest.customFields" is an array containing all submitted attributes. But as it is an array, you access elements via an index (integer) and not a key/name.
If you are trying to retrieve specific attributes, it is better and easier to use a "Get Participant Data" action in your Architect flow.
And use:
context.firstName to access your firstName
context.lastName to access your lastName
context.customerId to access your customerId
-> append "context." in front of the name you use on widgets/client side.