GCP-111 · Lesson 11 of 12 · 18 min

Integrating generative AI into business applications

▶ Video coming soon A video version of this lesson is on the way.

The eleventh session took place in the customer service office, a long room on the second floor where twenty-two agents answered email, chat and the phone. Mei Lin, the customer service manager, had agreed to show Owen and Jules a typical hour. In that hour her team handled 140 contacts: about half were "where is my order" questions, a quarter were returns, and the rest were product questions, complaints and the occasional customer who wanted to tell someone about a great canoe trip. "Most of these are the same twenty questions," Mei said. "My best people spend their day on things a machine could answer, and the hard cases wait."

So far the course has looked at products one at a time. Real value usually comes from putting generative AI inside the business processes and applications a company already runs. This lesson covers the Customer Engagement Suite for customer service, common patterns for adding generative AI to existing applications, and the practical concerns of integration: APIs, data, workflows, people and measurement.

The Customer Engagement Suite

The Customer Engagement Suite is Google Cloud's set of products for customer service and contact centres. The exam guide lists four parts.

The four parts of the Customer Engagement Suite.
PartWhat it doesAt Birchline
Conversational AgentsVirtual agents that talk with customers on chat, voice and messaging, using generative AI and defined flowsAnswer order status and returns questions on chat and phone
Agent AssistHelps human agents during a conversation with suggested replies, relevant knowledge articles and summariesSuggest the right returns policy and draft a reply while the agent talks
Conversational InsightsAnalyses conversations afterwards to find topics, sentiment, trends and reasons for contactShow that a delivery partner's delays cause a spike in complaints
Google Cloud Contact Center as a ServiceA cloud-based contact centre platform for routing calls, chats and messages to the right agentPossible future replacement for Birchline's old phone system
A customer on chat, voice or web talks to a conversational agent, which hands off when needed to a human agent supported by Agent Assist, leading to resolution. Below, Conversational Insights reviews conversations afterwards to find common reasons for contact and topics to fix.
Generative AI in a customer contact flow.

Farah explained how the parts fit together. A conversational agent handles the simple, frequent questions completely, such as order status, by calling Birchline's order system as a tool. When a question is complex, the customer is upset, or the customer asks for a person, it hands off to a human with a summary, so the customer does not have to repeat themselves. Agent Assist then helps the human agent find the right answer quickly. After the conversation, Conversational Insights adds it to the analysis that shows managers what customers contact the company about and why.

Mei's question was whether customers would hate talking to a machine. Farah's answer was that customers mostly dislike machines that waste their time: menus that go in circles, answers that miss the point, and no way to reach a person. A well-designed virtual agent answers simple questions faster than a queue and always offers a way out. "Measure customer satisfaction separately for conversations the agent finished and conversations it handed off," she said. "If either one drops, you'll know where to look."

The same pattern beyond customer service

The customer service flow shows a general pattern that works in many business processes: let AI handle routine work end to end, help people with complex work, and analyse the results to improve the process. Owen listed other Birchline processes where the pattern fits.

Handle, help, analyse: one pattern across processes.
ProcessAI handles routine workAI helps people with complex workAI analyses results
Customer serviceOrder status, simple returnsSuggested replies for complaintsReasons for contact and trends
Product contentFirst drafts of product descriptionsCopy review against the style guideWhich descriptions lead to returns
Store supportAnswers to policy questions from store staffDrafting incident reportsCommon store issues by region
Buying officeSummaries of supplier emails and price listsComparing supplier proposalsPrice trends across suppliers

How generative AI gets into existing applications

Not every integration needs a new chat window. Farah described four common ways to add generative AI to applications Birchline already runs.

  • Inside the tools people already use. Gemini in Workspace and Gemini Enterprise bring AI to email, documents and search with no new application.
  • Behind an existing screen. A button in the returns system that drafts the reply email, or a summary that appears at the top of a long ticket. The application calls a model on the platform through an API.
  • As a new conversational front end. The shopping assistant on the website, or a virtual agent on the phone line.
  • As a step in an automated process. A nightly job that tags new product reviews, or a workflow that extracts fields from supplier invoices with Document AI and passes them to the finance system.

Each way calls models through APIs. Applications send a request with the prompt and data and receive a response. On Google Cloud, those calls typically go to the AI platform from code running on Cloud Run, Cloud Run functions, GKE or Compute Engine, and APIs can be managed and secured through Apigee, Google Cloud's API management platform, which GCP-102 mentioned for partner APIs. Model Armor can screen traffic at these points.

An illustrative request from an application to a model on the platform
# Illustrative only: an application calling a model through the platform's API.
# Authentication uses the application's service account, not a key in the code.
POST https://REGION-aiplatform.googleapis.com/v1/projects/bl-shop-prod/locations/REGION/publishers/google/models/MODEL_ID:generateContent
{
  "contents": [{"role": "user", "parts": [{"text": "Draft a reply to this return request: ..."}]}],
  "generationConfig": {"temperature": 0.2, "maxOutputTokens": 400}
}

Designing the workflow, not just the model call

Mei's best agent, Hamid, pointed out a problem with the draft-reply button the team had mocked up. "If it drafts a reply and I have to read every word to check it, I haven't saved anything," he said. Farah agreed that integration is mostly about workflow design. Good integrations make it easy for people to check and correct AI output, show the sources used, and keep a person responsible for anything consequential.

  • Show sources. A drafted reply should show which policy it relied on, so the agent can check in one click.
  • Make editing easy. The draft goes into the normal reply box, not a separate window.
  • Keep a human in the loop where it matters. Refunds above a limit, complaints about safety, and anything legal go to a person, always. GCP-112 covers human-in-the-loop design in more depth.
  • Capture feedback. A simple thumbs up or down, and the edits agents make, show where the AI needs improving.
  • Fail gracefully. If the model is slow or unavailable, the application still works without it.

Data and systems integration

Generative AI is only as useful as the data and systems it can reach. The shopping assistant needs the product catalogue, store stock, store hours and the customer's own order history; the service agent needs orders, returns and the knowledge base. Integration work includes giving AI secure, narrowly scoped access to these systems through APIs and tools, keeping data fresh, and respecting privacy rules about which data may be used for which purpose. Ravi's team estimated that most of the shopping assistant's build effort would go into data and integration rather than prompts.

Python Example
# Illustrative estimate: where the shopping assistant build effort goes (person-weeks).
effort = {
    "Data preparation and product data connection": 6,
    "Store systems tools (stock, hours, holds)": 5,
    "Prompt design and evaluation": 3,
    "Security review and Model Armor setup": 2,
    "Website integration and testing": 4,
    "Monitoring, feedback and launch": 2,
}
total = sum(effort.values())
for task, weeks in sorted(effort.items(), key=lambda kv: -kv[1]):
    bar = "#" * weeks
    print(f"{task:44} {weeks:2} {bar}")
print(f"{'Total':44} {total:2}")
data_and_integration = effort["Data preparation and product data connection"] + effort["Store systems tools (stock, hours, holds)"] + effort["Website integration and testing"]
print(f"Data and integration share: {data_and_integration} of {total} person-weeks")
Output
Data preparation and product data connection  6 ######
Store systems tools (stock, hours, holds)     5 #####
Website integration and testing               4 ####
Prompt design and evaluation                  3 ###
Security review and Model Armor setup         2 ##
Monitoring, feedback and launch               2 ##
Total                                        22
Data and integration share: 15 of 22 person-weeks

What this code does

Estimated build effort for the shopping assistant, in person-weeks, is listed by task and sorted from largest to smallest with a simple text bar for each. Data preparation and connecting product data is the biggest piece at 6 weeks, followed by store systems tools at 5. The point is that the AI model itself is a small part of the work compared with data, integration and testing.

Measuring business results

An integration is successful when it improves a business measure, not when it uses a clever model. Mei and Farah agreed measures for the customer service pilot planned for spring 2027 before any building started.

Measures for the customer service pilot.
MeasureWhat it showsStarting point
Containment rateShare of conversations the virtual agent resolves without a personNone today; target to be set after a month of data
Average handling timeHow long human agents spend per contactAbout 7 minutes
First-contact resolutionShare of issues solved in the first contactMeasured monthly
Customer satisfactionShort survey after contact, split by AI-only and handed-offMeasured monthly
Agent experienceAgents' own ratings of Agent Assist suggestionsNew measure

Farah warned about one common trap: a high containment rate is not good if customers give up rather than getting answers. Containment should always be read together with satisfaction and repeat contacts.

Common mistakes

  • MistakeAdding a chat window where a button in the existing screen would do.

    InsteadPick the integration pattern that fits the work, often inside existing tools or screens.

  • MistakeMeasuring only how many conversations the virtual agent handled.

    InsteadCombine containment with satisfaction, repeat contacts and resolution.

  • MistakeHiding the sources behind an AI draft.

    InsteadShow sources and make editing easy so people can check quickly.

  • MistakeUnderestimating data and integration work.

    InsteadPlan for most effort to go into data, systems and testing, not prompts.

Bringing people along

Integration changes jobs, and people notice. Mei involved her team from the start. Two experienced agents sat in on the design sessions for Agent Assist and wrote many of the example answers. The team chose which question types the virtual agent would handle first, starting with order status, which they found the most repetitive. Mei also promised that time saved would go to longer, better conversations with customers who needed help, not to cutting staff, and she reported each month on how that time was used.

Farah pointed out that this is not only kindness but good practice. People who helped design a tool trust it more, use it better and report its problems sooner. The agents' feedback in the first weeks of any pilot is usually the fastest way to find where prompts, data or workflows need fixing. GCP-112 looks at change management and adoption in more depth.

Hamid asked what happens to his job if the virtual agent handles half the contacts. Mei's answer was specific: two agents would move to a new team handling product advice and complaints about faulty gear, which had long waits, and one would help maintain the knowledge articles that Agent Assist and the virtual agent rely on. Clear answers like this, given early, reduce the fear that slows adoption.

Worked problem

Designing the customer service rollout

Mei's team gets 140 contacts an hour; about half are order status questions and a quarter are returns. Which Customer Engagement Suite parts should come first, and how should success be judged?

Show solution
  1. Order status is frequent, simple and answerable from the order system. A conversational agent with an order-lookup tool can resolve most of these end to end, with hand-off for problems.
  2. Returns often need judgement. Agent Assist, suggesting the right policy and a draft reply to human agents, helps without removing people from the decision.
  3. Conversational Insights should run from the start to show reasons for contact and to measure change. Success is judged by containment together with satisfaction, handling time and repeat contacts.

Answer: A conversational agent for order status, Agent Assist for returns, Conversational Insights throughout, judged by containment alongside satisfaction, handling time and repeat contacts.

As they left, Hamid asked whether the AI would replace his team. Mei answered before Farah could. "It'll take the twentieth "where's my order" of the hour off your plate," she said. "The customer whose tent failed on a mountain still gets you."

Summary and key terms

  • The Customer Engagement Suite includes Conversational Agents for automated conversations, Agent Assist for helping human agents, Conversational Insights for analysing conversations, and Google Cloud Contact Center as a Service for routing contacts.
  • A general pattern is to let AI handle routine work, help people with complex work, and analyse results.
  • Generative AI enters applications inside existing tools, behind existing screens, as new conversational front ends, or as steps in automated processes, through APIs often managed with Apigee.
  • Good integrations show sources, make editing easy, keep humans responsible for consequential decisions, capture feedback and fail gracefully.
  • Most effort goes into data and systems, and success is judged by business measures.
Customer Engagement Suite
Google Cloud's set of products for customer service and contact centres.
Conversational Agents
Virtual agents that converse with customers on chat, voice and messaging.
Agent Assist
A tool that helps human agents with suggestions, knowledge and summaries during conversations.
Conversational Insights
Analysis of conversations to find topics, sentiment and reasons for contact.
Contact Center as a Service
Google Cloud's cloud-based platform for routing customer contacts.
Containment rate
The share of conversations a virtual agent resolves without a person.
Apigee
Google Cloud's API management platform.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Which Customer Engagement Suite part helps human agents during a conversation?

    Show answer

    Agent Assist.

  2. Name two ways to add generative AI to an existing application.

    Show answer

    Any two of: inside existing tools, behind an existing screen, as a new conversational front end, or as a step in an automated process.

  3. Why read containment rate alongside satisfaction?

    Show answer

    A high containment rate can hide customers giving up without getting answers.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz