Contact Centres

Compare and change tariff plans with a carousel

Workflow purpose

This guide demonstrates how to use Proto's AI agent to help subscribers find a better tariff plan and switch to it in the same conversation.

The workflow looks up the person's current plan, shows the available plans side by side in a carousel, and – if they'd rather be told – asks three questions about how they use their phone and recommends one plan from your catalogue, with a reason. Before anything changes, it checks eligibility through your billing system, shows any early termination fee and the date the new plan starts, and waits for an explicit yes.

Prepaid switches usually complete in the chat. Postpaid contract changes and anyone who isn't eligible go to your team, with the comparison already done.

Who can benefit from this guide:

  • Mobile network operators with several prepaid and postpaid plans
  • Retention teams trying to keep subscribers on the right plan
  • Customer care teams fielding plan comparison questions
  • Digital sales teams moving plan changes out of stores
  • Internet service providers with tiered home broadband plans

Compare and change plans

This workflow compares plans in a carousel, recommends one and switches eligible subscribers after an explicit confirmation. See how to build a tariff plan workflow.

Just starting with the platform?
For initial setup of your AI agent – including workspace setup, agent training, and channel deployment – please start here. This workflow guide assumes your AI agent is set up and ready for more advanced configurations.

1. Create a trigger

Start the flow when a subscriber wants to compare plans or change theirs.

  • Navigate to the Workflows tab in the AI agent settings.
  • Click New workflow and select Message received as the Workflow type.
  • Name the trigger (e.g. “Tariff Plans”) and add a short description (e.g. “Triggers if a subscriber asks which plans are available, wants to compare plans, upgrade or downgrade, find a cheaper plan, or move between prepaid and postpaid.”).
  • Add training phrases (e.g. “What plans do you have”, “I want to change my plan”, “Is there a cheaper plan”, “Upgrade my package”, “Compare your postpaid plans”).

One-off data and voice bundles are a different conversation – leave them to the balance and bundles workflow.

2. Look up the current plan

Start from what the person has now, so every comparison is relative to it.

On WhatsApp, add a Send message with quick replies asking whether {_channel_profile.phone_number} is the line they mean (Yes, this number | A different number). On other channels, or for a different number, add an Ask survey with one Phone field, msisdn, and verify the line with your own one-time PIN service, as in the balance and bundles workflow.

Add a Send API action:

  • HTTP method: GET
  • URL endpoint: your billing system’s subscriber plan endpoint, with {msisdn} as a parameter
  • Headers: the authorisation key your system requires
  • Resulting variable: current

On Success, parse it with Set variable: current = _.json_parse(current). Then add a Send message:

“You’re on {current[“plan_name”]} at {current[“monthly_price”]} a month, with {current[“data_allowance”]} of data. Last month you used {current[“data_used_last_month”]}.“

Showing last month’s usage is what makes the rest of the conversation useful – most people don’t know it. Under Error and Timed out, carry on without the current plan, and say so: “I can’t see your current plan right now, but I can still show you what’s available.”

3. Choose prepaid or postpaid

Narrow the catalogue before showing it.

Add a Send message action with quick replies:

“Which kind of plan are you looking at?”

Quick replies: Prepaid | Postpaid | Not sure – help me choose

Store the answer in plan_type. If current["plan_type"] is known, put that option first and add “(your current type)” to the message. Not sure goes to Step 4; the other two go to Step 5.

4. Recommend a plan from short questions

Ask three questions and let the AI agent recommend one plan, with a reason.

Add an Ask survey action. Action title: How you use your phone

Field Variable Type Invalid reply
How much mobile data do you use? data_use Text Please choose one of the options
How much do you call? call_use Text Please choose one of the options
What’s the most you want to spend a month? budget Number Please enter an amount as a number, e.g. 2000

Add quick replies to the first two fields: Light – messaging only, Medium – social media and some video, Heavy – lots of video for data, and Rarely, Every day, I call other countries for calls.

Add your plan catalogue to the AI agent’s Knowledge tab under Knowledge base – Upload file with a PDF or CSV of plans, or Add URL for your plans page. Then add an LLM Processing action:

  • Input: {data_use}, {call_use}, {budget}, {plan_type} and {current["data_used_last_month"]}
  • Use Knowledge info to provide more context: on
  • System Prompt: “Recommend exactly one plan from the plan catalogue that fits this person’s usage and budget. Never invent a plan or a price. Prefer the cheapest plan that covers their usage. Reply only with JSON: {“plan_id”: “…”, “plan_name”: “…”, “reason”: “one sentence”}.“
  • Temperature: low, e.g. 0.1
  • Resulting variable: recommendation

Parse it with Set variable: recommendation = _.json_parse(recommendation). Add a Send message with quick replies:

“Based on what you’ve told me, I’d suggest {recommendation[“plan_name”]}. {recommendation[“reason”]}“

Quick replies: Switch to this plan | Show me all plans

Switch to this plan sets chosen_plan_id from recommendation["plan_id"] and goes to Step 6. Check plan_id against your catalogue in Step 6’s eligibility call either way – the eligibility API, not the language model, decides whether the plan exists.

Put the plans side by side, so people can compare them at a glance.

Add one Show carousel action for prepaid and one for postpaid, each under its own sub-trigger. A carousel holds up to 10 cards. Each card has:

  • Image, aspect ratio 1.91 : 1 – Upload image, Image link or Chat script (an expression that returns an image URL)
  • Title and Subtitle – fixed text, or text with variables
  • Up to 3 buttons, each a Send Message or Open Link, with button text of up to 20 characters

The cards are configured in the builder – the carousel doesn’t build one card per item from an API response. So set up one card per plan you sell, and update the carousel when your plan line-up changes. What can be dynamic is the text on each card: add a Send API to your catalogue endpoint before the carousel, and put the live price and allowance in the title and subtitle, e.g. Title Smart 30 and Subtitle {catalogue["smart30"]["price"]} a month · {catalogue["smart30"]["data"]} data · unlimited calls. Mark the current plan in its subtitle with a Branch and a variable, e.g. {smart30_tag} set to “Your current plan”.

Give every card the same three buttons:

Button Type What it does
See details Send Message Sends a Send message with the plan’s full allowances, roaming and extras
Switch to this plan Send Message Sets chosen_plan_id and chosen_plan_name with Set variable, then Jump to Step 6
Full terms Open Link Opens the plan’s terms page on your website

Each Send Message button gets its own sub-trigger in the builder, which is how the AI agent knows which plan was chosen. If a plan’s details change more often than you’d update the carousel, keep the price and allowances in the catalogue API and the card text as variables, so only a new plan needs a builder change.

6. Check eligibility

Find out whether the switch can happen now, and what it costs.

Add a Send API action:

  • HTTP method: POST
  • URL endpoint: your billing system’s plan change eligibility endpoint
  • Body: msisdn, current["plan_id"] and chosen_plan_id
  • Resulting variable: eligibility

Parse the result and add a Branch:

Condition Next
chosen_plan_id == current["plan_id"] Send message: “You’re already on this plan.” Offer Show me all plans
Eligible, no fee Continue to Step 7
Eligible, early termination fee Continue to Step 7, and include the fee in the confirmation
Postpaid contract change (e.g. postpaid to prepaid, or a new contract term) Jump to Step 8
Not eligible (e.g. unpaid bill, plan not available in the area, change already scheduled) Send message with {eligibility["reason"]}, then Jump to Step 8

Under Error and Timed out, don’t offer a switch you can’t check – go to Step 8.

7. Confirm and change the plan

Say what changes, when, and what it costs – then wait for a clear yes.

Add a Send message with quick replies:

“Switch {msisdn} from {current[“plan_name”]} to {chosen_plan_name}? New price: {eligibility[“new_price”]} a month Starts: {eligibility[“effective_date”]} Early termination fee: {eligibility[“termination_fee”]} Your current allowance stays until the new plan starts.“

Quick replies: Yes, switch my plan | No, keep my plan

Only Yes, switch my plan continues. Leave the fee line out with a Branch when there isn’t one.

Add a Send API action with POST to your plan change endpoint, passing msisdn, chosen_plan_id and a unique change_ref as the idempotency key. On Success, send: “Done – you’ll move to {chosen_plan_name} on {eligibility[“effective_date”]}. Your reference is {change_ref}.“ Under Error and Timed out, don’t retry – tell the person the change hasn’t been confirmed and go to Step 8, so no one is switched twice or not at all without knowing.

8. Pass contract changes to your team

Postpaid contracts and ineligible switches need a person.

Add a Send message: “This change needs our plans team – I’ll pass on everything we’ve looked at.” Then add a Live agent handoff action to your plans or retention team, with Live agent availability check on.

Under If there is no live agent online, add an Ask survey for full name and email (Enable skip on email), then a Create ticket action:

  • Assignee: your plans or retention team
  • Subject: Plan change – {msisdn} – {current[“plan_name”]} to {chosen_plan_name}
  • Description: the current plan, the chosen plan, the recommendation reason if there was one, and the eligibility result
  • Auto-apply tags: plan-change, plus postpaid-contract, not-eligible or change-failed

Then send: “Your request is {_new_ticket.short_id}. Our team will reply here, usually within one working day.” A live agent replies from the ticket in the Inbox – there’s no automatic message when its status changes.

9. Test the flow

Validate every path before going live using the AI agent tester side panel.

  • Open the prepaid and postpaid carousels and press every button on two cards – check Switch to this plan sets the right chosen_plan_id and Full terms opens the right page.
  • Answer the survey as someone with light usage and a low budget, then with heavy data use, and confirm the recommendation is a real plan from the catalogue each time.
  • Choose the plan the person is already on, then a plan with an early termination fee, and check both messages.
  • Make the eligibility API return not eligible and the change API time out, and confirm both reach a live agent or a ticket.
  • Build and test in an undeployed version – Duplicate the live version first – then click Deploy when every path passes.

Finalise the AI agent deployment by configuring your preferred channels and languages.