send_shipping_info
Send tracking details and shipping status to customers via the same social media platform they contacted you on, providing immediate delivery updates.
Instructions
Send shipping/tracking information to a customer via social media.
Automatically sends a tracking message through the same social platform the customer contacted you on.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customer_id | Yes | Customer ID to notify | |
| carrier | Yes | Shipping carrier (e.g., "Yurtici", "Aras", "PTT", "MNG", "DHL") | |
| tracking_code | Yes | Package tracking number | |
| org_id | No | Organization ID (uses YAPARAI_ORG_ID env var if not provided) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/yaparai/tools/crm.py:92-118 (handler)The async function `send_shipping_info` that executes the tool logic. It accepts customer_id, carrier, tracking_code, and optional org_id, resolves the org ID, and delegates to the API client's `crm_send_shipping` method.
async def send_shipping_info( customer_id: str, carrier: str, tracking_code: str, org_id: str | None = None, ) -> dict: """ Send shipping/tracking information to a customer via social media. Automatically sends a tracking message through the same social platform the customer contacted you on. Args: customer_id: Customer ID to notify carrier: Shipping carrier (e.g., "Yurtici", "Aras", "PTT", "MNG", "DHL") tracking_code: Package tracking number org_id: Organization ID (uses YAPARAI_ORG_ID env var if not provided) Returns: Dict with delivery status, carrier, and tracking_code. """ oid = resolve_org_id(org_id) client = YaparAIClient() return await client.crm_send_shipping(oid, customer_id, { "carrier": carrier, "tracking_code": tracking_code, }) - src/yaparai/client.py:295-301 (helper)The `crm_send_shipping` method on YaparAIClient that sends a POST request to the enterprise API endpoint `/api/enterprise/orgs/{org_id}/crm/customers/{customer_id}/send-shipping` with the carrier and tracking_code payload.
async def crm_send_shipping(self, org_id: str, customer_id: str, payload: dict) -> dict: """Send shipping/tracking notification.""" return await self._request( "POST", f"/api/enterprise/orgs/{org_id}/crm/customers/{customer_id}/send-shipping", json=payload, ) - src/yaparai/server.py:88-88 (registration)Import of `send_shipping_info` from `yaparai.tools.crm` into the server module.
send_shipping_info, - src/yaparai/server.py:172-172 (registration)Registration of `send_shipping_info` as an MCP tool via `mcp.tool(send_shipping_info)`.
mcp.tool(send_shipping_info) - src/yaparai/tools/crm.py:113-113 (helper)Call to `resolve_org_id(org_id)` which resolves the organization ID from the parameter or YAPARAI_ORG_ID environment variable.
oid = resolve_org_id(org_id)