{
"@context": "https://wrio.io/ns/workflow",
"@type": "Process",
"owner_type": "user",
"@id": "quote_request",
"name": "Autoparts Quote Request via Email",
"description": "A fully automated process that receives an email, checks inventory, and sends a quote.",
"version": "2.0.0",
"entry_point_id": "start",
"steps": [
{
"@type": "Step",
"@id": "start",
"name": "Start",
"step_type": "start",
"transitions": [
{
"target_id": "Task_ProcessQuote"
}
]
},
{
"@type": "Step",
"@id": "Task_IngestEmailData",
"name": "Ingest Email Data",
"step_type": "form",
"transitions": [
{
"target_id": "Task_ProcessQuote"
}
]
},
{
"@type": "Step",
"@id": "Task_ProcessQuote",
"name": "Process Quote and Check Inventory",
"step_type": "service",
"action": "autoparts.processQuote",
"params": {
"rawEmailBody": "{{rawEmailBody}}",
"subject": "{{subject}}",
"recipientIdentifier": "{{recipientIdentifier}}",
"inventoryCsvUrl": "https://docs.google.com/spreadsheets/d/e/2PACX-1vQa5TleDbqzUWgf9DE9or1-c4A_2lw3DJ_EDtD5g7ldaNMaQzjyxFOzI-UhQmy02StXYSC5_SYseV1S/pub?output=csv"
},
"transitions": [
{
"target_id": "Task_PreparePingContent"
}
]
},
{
"@type": "Step",
"@id": "Task_PreparePingContent",
"name": "Prepare Ping Content",
"step_type": "service",
"action": "templates.preparePingContent",
"params": {
"formId": "{{formId}}",
"recipientIdentifier": "{{recipientIdentifier}}",
"recipientName": "{{customerName}}",
"owner_identifier": "{{owner_identifier}}",
"project_id": "{{project_id}}",
"process_id": "{{process_id}}",
"instance_id": "{{instance_id}}",
"vin": "{{vin}}",
"partDescription": "{{partDescription}}",
"customerName": "{{customerName}}",
"quoteDetails": "{{quoteDetails}}"
},
"transitions": [
{
"target_id": "Task_CreatePing"
}
]
},
{
"@type": "Step",
"@id": "Task_CreatePing",
"name": "Create Sonar Ping",
"step_type": "service",
"action": "sonar.createPing",
"params": {
"pingData": "{{pingData}}",
"recipientEmail": "{{customerEmail}}",
"subject": "{{preparedSubject}}",
"body": "{{preparedHtmlBody}}"
},
"transitions": [
{
"target_id": "Task_SendEmail"
}
]
},
{
"@type": "Step",
"@id": "Task_SendEmail",
"name": "Send Email",
"step_type": "service",
"action": "email.send",
"params": {
"to": "{{customerEmail}}",
"subject": "{{preparedSubject}}",
"body": "{{preparedHtmlBody}}"
},
"transitions": [
{
"target_id": "End_ProcessComplete"
}
]
},
{
"@type": "Step",
"@id": "End_ProcessComplete",
"name": "Process Complete",
"step_type": "end"
}
]
}