Error Handling when invoking GenAI Connect

As we know, GenAI Connect can be invoked from Data Pages as well as from case automation shapes in a Flow rule. I wanted to understand the recommended best practices for error handling in these scenarios specially when invoked from case automation shape!

For example, if GenAI is being used simply to generate a case summary, we probably wouldn’t want a temporary model/service failure to block the end user or prevent the case from progressing.

When GenAI Connect is invoked through a Data Page / Utilities, it seems relatively straightforward to handle the error and provide a fallback. But how should we approach this when GenAI Connect is invoked directly through a case automation shape? or we say GenAI Connect can be compared to other connectors and is best to invoke from data page?

For such non-critical GenAI use cases, would the recommended pattern be to show a warning such as “AI summary is currently unavailable” and allow the user to continue the work manually until the service becomes available again?

I understand there may be alternative product capabilities, such as AI Agents, for achieving similar outcomes. However, my question is specifically about error-handling and graceful fallback patterns for GenAI Connect rules.

Hello Prem,

We have wrapped the genai smart shape inside a reusable flow which does automated retries by queuing to QP. The first run will also be queued to QP. So the user submits an assignment and background qp does the gen ai calls with retries and present the next assignment when ready.

If non crirical genai calls may be we can invoke these wrapper flows in parallel processes as well. As the Llm performance is low, it makes sense to get this done in the background QP with retries than in user session.

Just curious, how do you determine when to retry? Based on what condition? If the response data is NOT available in the property? or anything else?

GenAI Connect relies on external AI service. For non-critical use cases such as case summaries etc., its better to log the failure, notify the user that AI-generated content is unavailable, and allow the case to continue and in some scenarios we may need to provide a retry mechanism, either user-initiated or asynchronous, to recover from service failures without impacting case progression … As mentioned in topic, if we use GenAI Connect behind data pages we can centralize error handling, and fallback logic.