Deterministic action flows that bring predictable business logic to AI conversations
Workflows are deterministic action flows that execute business logic predictably within your scripts. While AI handles natural conversation, workflows ensure that critical operations—like calculations, conditional routing, data validation, and API calls—happen exactly as programmed, every single time.
AI is probabilistic. It generates different responses, interprets inputs creatively, and sometimes makes mistakes. This is great for natural conversation but terrible for business-critical operations.Workflows solve this by providing a deterministic execution layer that runs alongside AI conversations:
Predictable: Same input always produces same output
Auditable: Every step is logged and traceable
Reliable: No hallucinations, no guessing, no errors
Testable: Can be validated with unit tests
Think of workflows as the “business rules engine” embedded directly in your conversational AI. The AI talks, the workflow executes.
Handle failures gracefully with controlled retries:
[Attempt API Call] ↓ [Success?] ↙ ↘[Yes] [No] ↓ ↓[Continue] [Retry Counter < 3?] ↙ ↘ [Yes] [No] ↓ ↓ [Wait 2s] [Escalate to Human] ↓ [Loop back to Attempt]
Implementation pattern:
Variables: - retry_count: Type: Number DefaultValue: 0 IsEditableByAI: false - max_retries: Type: Number DefaultValue: 3 IsEditableByAI: falseWorkflow: 1. [FlowApp: Call External API] 2. If success_port → Continue 3. If failure_port: a. Increment retry_count b. If retry_count < max_retries: → Go back to step 1 c. Else: → Transfer to human agent
Always set maximum retry limits. Infinite loops will cause conversation hangs and poor user experience.
public class BusinessAppScriptEndCallToolNode : BusinessAppScriptSystemToolNode{ public BusinessAppAgentScriptEndCallTypeENUM Type { get; set; } // Immediate or AfterMessage [MultiLanguageProperty] public Dictionary<string, string>? Messages { get; set; }}
public class BusinessAppScriptSendSMSToolNode : BusinessAppScriptSystemToolNode{ public string PhoneNumber { get; set; } // Can use variables: {{ variables.user_phone }} [MultiLanguageProperty] public Dictionary<string, string> Message { get; set; }}
Use cases:
Send confirmation after booking
Deliver verification codes
Provide appointment reminders
Example: Booking confirmation
Node: Send Confirmation SMS PhoneNumber: "{{ variables.user_phone }}" Message: English: "Your appointment on {{ variables.appointment_date }} at {{ variables.appointment_time }} is confirmed. See you then!"
public class BusinessAppScriptRetrieveKnowledgeBaseNode : BusinessAppScriptSystemToolNode{ public string Query { get; set; } // Can use variables public int MaxResults { get; set; } public double SimilarityThreshold { get; set; }}
Use cases:
Find specific policy information
Retrieve product details
Look up FAQs
Example: Policy lookup
Node: Find Return Policy Query: "{{ variables.product_name }} return policy" MaxResults: 3 SimilarityThreshold: 0.75Output: Stores results in context for AI to use
PCI-DSS Payment Collection: 1. [AI: Inform about secure payment] 2. [DTMF: Collect card number (encrypted)] IsVisibleToAgent: false # AI never sees it 3. [DTMF: Collect CVV (encrypted)] IsVisibleToAgent: false 4. [DTMF: Collect expiry (encrypted)] IsVisibleToAgent: false 5. [FlowApp: Payment Gateway] # Encrypted data sent directly to gateway 6. [If success]: a. Clear all payment variables b. Log transaction ID only c. Continue 7. [If failure]: a. Clear all payment variables b. Log failure (no sensitive data) c. Retry or escalate
Iqra AI’s Secure Sessions feature creates a “clean room” for sensitive data. The workflow processes it deterministically while keeping it hidden from the AI layer.
# Good: Track workflow progressworkflow_step: "payment_collection" # Know where you areretry_count: 2 # Know how many attemptslast_error: "Payment gateway timeout" # Know what went wrong# Bad: No state tracking# If something fails, you don't know where or why
How is this different from tools like Zapier or n8n?
Feature
Iqra AI Workflows
Traditional Automation
Triggered by
Conversation flow
Events/webhooks
Context
Has full conversation state
Isolated execution
User interaction
Can ask follow-up questions
No user interaction
AI integration
Native AI decision-making
Requires custom logic
Real-time
Sub-second latency
Seconds to minutes
Voice-aware
Handles interruptions, DTMF
Not voice-capable
Iqra AI workflows are conversational automation—they run while the user is on the phone or in the chat, with full access to conversation history and the ability to ask clarifying questions.