# Gameball MCP MCP

> Gameball handles your entire loyalty and rewards system, automating everything from customer profile creation to point accrual and refund processing using natural conversation with any AI agent. Manage points balances, track order spending, and update user data instantly without leaving your workflow.

## Overview
- **Category:** ecommerce
- **Price:** Free
- **Tags:** loyalty-program, gamification, customer-retention, rewards, engagement

## Description

Connect this MCP to your existing AI client and handle all things related to customer loyalty. You can use it to set up new user profiles or update existing ones when a customer interacts with you. Need to know how many points a person has? It retrieves real-time balances, showing the monetary value and even which points are set to expire soon. If an order comes in, you track it automatically to award loyalty points. The system also handles temporary redemptions by holding points during checkout or reversing transactions if a refund happens. Since Vinkius hosts this MCP, your agent gets instant access to all these customer actions from one spot, making retention strategy simple to run through conversation.

## Tools

### create_or_update_customer
Creates a brand-new customer profile or updates the details of an existing one in Gameball.

### get_customer_activities
Retrieves a full log detailing all loyalty activities associated with a given customer ID.

### get_customer_balance
Checks and reports the current point balance, value, and expiration dates for any user account.

### get_order_transactions
Gets a detailed list of all loyalty points transactions tied to a specific order ID.

### hold_points
Temporarily reserves points for a customer during checkout so they can't be used twice.

### refund_transaction
Processes the necessary point adjustments when an order is returned or canceled.

### send_events
Logs specific customer actions, like signing up or viewing a product, to track behavior for marketing.

### track_order
Finalizes an order by awarding points and confirming any point redemptions that occurred at checkout.

## Prompt Examples

**Prompt:** 
```
Get the points balance for customer ID 'cust_98765'.
```

**Response:** 
```
I've retrieved the balance for customer cust_98765. They currently have 1,250 points (valued at $12.50). Note that 200 points are set to expire on the 30th of next month.
```

**Prompt:** 
```
Track a new order of $150 for customer 'cust_123' with order ID 'ORD-999'.
```

**Response:** 
```
Order ORD-999 has been successfully tracked for customer cust_123. Based on the $150 total, the customer has been awarded 150 loyalty points.
```

**Prompt:** 
```
Create a customer profile for 'Alice Smith' with email 'alice@example.com' and ID 'alice_001'.
```

**Response:** 
```
I've created the profile for Alice Smith (ID: alice_001). Her details are now synchronized with Gameball for loyalty tracking.
```

## Capabilities

### Update Customer Records
Creates or adjusts core details for a specific customer profile.

### Check Current Point Balance
Retrieves the total points amount, dollar value, and expiration dates for any user.

### Log Customer Actions
Gathers a detailed log of past customer activities within the loyalty system.

### Process Order Rewards
Takes order details to automatically award points and confirm redemptions.

### Manage Point Holds
Temporarily reserves a specified number of points during checkout to prevent double-spending.

### Reverse Transactions
Adjusts point balances by processing refunds or cancellations.

## Use Cases

### A customer asks why their points are low.
Instead of manually checking three separate systems, the agent runs get_customer_balance. The result instantly shows the current balance and clearly flags that 200 points expire next month, giving the user a concrete answer.

### A sale is completed and needs rewards applied.
The ops worker provides the order ID to track_order. The MCP uses this data to award the correct loyalty points based on the purchase total and confirms that any pre-held redemptions are finalized.

### A customer needs a profile created for an offline sale.
The agent runs create_or_update_customer, feeding it the email and name. This immediately syncs the new user into the loyalty program so they start earning points right away.

### A product is returned and needs point reversal.
The support agent uses refund_transaction with the original order details. The MCP automatically calculates and reverses the exact number of points that were initially earned, keeping the ledger accurate.

## Benefits

- Stop guessing about customer points. Use get_customer_balance to instantly check a user's total available points, dollar value, and expiration dates without switching screens.
- Streamline the entire point earning process by using track_order with just the order details. This automatically awards points and confirms redemptions in one step.
- Improve data hygiene by running create_or_update_customer whenever a new user signs up. Your agent keeps the profile accurate for immediate use.
- Handle complex financial situations easily. If an item is returned, refund_transaction reverses the points accurately, maintaining balance integrity.
- Boost marketing insight. You can send_events to log specific actions (like viewing a product page) so your growth team can track behavior over time.

## How It Works

The bottom line is that your agent handles complex reward calculations and data updates using only plain conversation.

1. Subscribe to this MCP and enter your Gameball API key into Vinkius.
2. Your agent connects, allowing it access to all loyalty tools via a natural chat interface.
3. You simply ask the AI client what you need—for example, 'What's customer X's balance?'—and the system runs the necessary operation.

## Frequently Asked Questions

**How do I get a current balance using get_customer_balance?**
You simply ask your agent to run get_customer_balance with the user ID. The response gives you the total points, its dollar value, and critical expiration dates all in one clear message.

**Can I log a new customer profile using create_or_update_customer?**
Yes, you can use create_or_update_customer. This tool allows you to build or adjust core customer details and sync them into the loyalty system right away.

**What is get_order_transactions for?**
get_order_transactions pulls a complete log of all points movements related to a specific order ID. This is useful for auditing or investigating why a balance looks off.

**Should I use hold_points before an order tracks?**
Yes, it's smart practice. Use hold_points when you know points are about to be redeemed during checkout. This reserves the funds temporarily and prevents conflicts while other parts of the transaction run.

**How do I reverse points after a cancellation using refund_transaction?**
Use refund_transaction. You provide the original order data, and the MCP calculates and processes the exact point reversal needed for the customer’s account.

**What data should I send when logging non-purchase events using the `send_events` tool?**
You must include a clear event type and associated metadata. This allows your system to distinguish between actions like 'viewed_product' or 'signed_up', providing better context for retention analysis.

**How do I check the full history of changes made to an account using `get_customer_activities`?**
This function retrieves a comprehensive, chronological audit log. You can filter this data by specific date ranges or user IDs to pinpoint exactly when and how customer profiles were updated across your system.

**If an order fails during checkout, does `track_order` still award points?**
No, the MCP only awards points if the transaction status is marked as fully successful in Gameball. Always verify the payment clearance before calling this function to maintain accurate loyalty records.

**How can I check a customer's current points balance?**
Use the `get_customer_balance` tool by providing the unique Customer ID. The agent will return the points balance, their monetary value, and any points nearing expiration.

**Can I reserve points during a checkout process to prevent double-spending?**
Yes! The `hold_points` action allows you to temporarily lock a specific amount of points for a customer, ensuring they aren't used elsewhere while the transaction is being finalized.

**How do I reward points to a customer for a new purchase?**
Use the `track_order` tool. By submitting the order ID and total price, Gameball will automatically calculate and award the appropriate loyalty points based on your configured rules.