Automation Anywhere RFQ Challenge Solution
1. AI Skill – Extraction Prompts
Objective:
Add the original System Prompt and User Prompt to the AI Skill action.
Steps:
- 1. Open the ExtractionSkill AI Skill in Automation Anywhere.
- 2. In the Prompt configuration section we will add our extraction prompt:
System Prompt:
You are provided with a plain text email regarding an inquiry about a Request for Quote (RFQ)for insurance. Your task is to extract key details about the insurance policy from this text and format them in a structured JSON output.
User Prompt:
Specifically, you need to extract: 1. Policy Category: The category of the insurance policy, such as "Business", "Personal", etc. 2. Policy Type: The specific type of insurance policy being discussed, such as "General Liability Insurance", "Cyber Liability Insurance", "Personal Property Insurance", etc. 3. Coverage Amount: The total coverage amount specified for the insurance policy, only include the number with no currency sign or additional formatting. 4. Policy Start Date: The time frame given for when the policy will begin, such as "2 months", "5 months", etc. 5. Policy Duration: How long the policy will remain active in a year value, such as "12" for 12 Months Duration will have a value of 1, or "6", for 6 months duration will have a value of .5 (Point 5 is half a year), etc. 6. Margin: This needs to be an empty string Value, the node is needed to insert data at a later stage. 7. FlatCost: This needs to be an empty string Value, the node is needed to insert data at a later stage. 8. StrategicAlignment: This needs to be an empty string Value, the node is needed to insert data at a later stage. 9. Reasoning: This needs to be an empty string Value, the node is needed to insert data at a later stage. 10. Profit: This needs to be an empty string Value, the node is needed to insert data at a later stage. 11. WinProbability: This needs to be an empty string Value, the node is needed to insert data at a later stage. 12. NumWinRate: This needs to be an empty string Value, the node is needed to insert data at a later stage. Conversion Examples for “Policy Duration” Guardrail If the email text says: “Duration: 12 months” → your JSON must contain "policy_duration": "1". “Duration: 6 months” → your JSON must contain "policy_duration": "0.5". “Duration: 18 months” → your JSON must contain "policy_duration": "1.5". Plain Text Email: $Email$ Output this information in the this EXACT JSON format, include NO extra commentary, or text outside of the JSON format, do NOT use markdown. {"rfq_number": "", "policy_category": "", "policy_type": "", "coverage_amount": "", "policy_start_date": "", "policy_duration": "", "Margin": "" , "FlatCost": "" , "StrategicAlignment": "" , "Reasoning": "" , "Profit": "" , "WinProbability": "", "NumWinRate" : "" } Use the information from the email provided to populate this JSON structure. Ignore any irrelevant details and only return the populated JSON structure and nothing else.
We're including blank JSON fields as handy placeholders so later steps can easily fill them in and keep our data organized and automation running smoothly. - Click Apply or Save to confirm changes.
2. Restore API Task – ExtractionAPITask
Objective:
Add the AI Skill to the API task that invokes the ExtractionSkill AI Skill.
Steps:
- 1. Locate the API Task named:
ExtractionAPITask
- 2. Click the AI Skill: Execute action to open the parameters on the right hand side.
- 3. Ensure that it is linked to the AI Skill you just created, and the following is added as input value:
Value:
$strCurrentRFQ$
- 4. Click Save.
3. Putting together the process
- 1. Open the RFQ Process file.
- 2. Drag in an API Task from the Elements pane, and place it between element number 3 and 4, in the Tasks swimlane.
- 3. Enter the following as Element ID:
ExtractionAPITask
- 4. Enter the following as Task name:
Identify key details
- 5. Browse for the ExtractionAPITask.
- 6. Select the input values field and enter the output value from RFQCollection:
$&RFQCollection{output}{listRFQ}$
- 7. Drag in a Form element from the Elements pane, and place it between element number 4 and 5.
- 8. Drag the Form element to the Output swimlane.
- 9. For the element and task name, enter:
Extraction Task Output
- 10. Browse for the Debug Form.
- 11. Select Read-only as the form mode. li>
- 12. Select the input values field and enter the output value from ExtractionAPITask: $&ExtractionAPITask{output}{listRFQJSON}.List:toString$
- 13. Select the 6th element - Profitability Calculator Task bot - and replace the existing input value with:
$&ExtractionAPITask{output}{listRFQJSON}$
- 14. Now click Save and Run!