Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -177,6 +177,12 @@ def interact_with_salesforce(mode, entry_type, quantity, extracted_text):
|
|
| 177 |
|
| 178 |
# Extract attributes from the extracted text
|
| 179 |
attributes = extract_attributes(extracted_text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
# Convert extracted keys to match Salesforce API field names
|
| 181 |
mapped_attributes = {}
|
| 182 |
for key, value in attributes.items():
|
|
|
|
| 177 |
|
| 178 |
# Extract attributes from the extracted text
|
| 179 |
attributes = extract_attributes(extracted_text)
|
| 180 |
+
|
| 181 |
+
# Extract product name explicitly
|
| 182 |
+
product_name = match_product_name(extracted_text)
|
| 183 |
+
if product_name and product_name_field in valid_fields:
|
| 184 |
+
attributes[product_name_field] = product_name
|
| 185 |
+
|
| 186 |
# Convert extracted keys to match Salesforce API field names
|
| 187 |
mapped_attributes = {}
|
| 188 |
for key, value in attributes.items():
|