doordash_join_group_order
Join a DoorDash group order as a guest to add items to a shared cart using a guest session.
Instructions
Join a group order as a guest on behalf of another user. Creates a guest session that can be used with doordash_add_to_cart.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cart_id | Yes | Group cart ID | |
| store_id | Yes | Store ID for the group order | |
| first_name | Yes | Guest's first name (shown on order labels) | |
| last_name | Yes | Guest's last name | |
| external_user_id | Yes | External user ID to associate with this guest session (e.g. Slack user ID) |
Implementation Reference
- src/tools/index.ts:896-930 (handler)The `doordash_join_group_order` tool is registered in `src/tools/index.ts`. It takes input parameters for cart/store/user details, calls `api.guests.joinGroupOrder` to create a guest session, and returns a confirmation message explaining how to use the `external_user_id` for adding items to the cart.
server.registerTool( "doordash_join_group_order", { description: "Join a group order as a guest on behalf of another user. Creates a guest session that can be used with doordash_add_to_cart.", inputSchema: { cart_id: z.string().describe("Group cart ID"), store_id: z.string().describe("Store ID for the group order"), first_name: z .string() .describe("Guest's first name (shown on order labels)"), last_name: z.string().describe("Guest's last name"), external_user_id: z .string() .describe( "External user ID to associate with this guest session (e.g. Slack user ID)", ), }, }, ({ cart_id, store_id, first_name, last_name, external_user_id }) => wrap(async () => { const session = await api.guests.joinGroupOrder({ cartId: cart_id, storeId: store_id, externalUserId: external_user_id, firstName: first_name, lastName: last_name, }); return ok( `**${session.firstName} ${session.lastName}** joined the group order.\n` + `External user ID: ${external_user_id}\n\n` + `Use doordash_add_to_cart with \`external_user_id: "${external_user_id}"\` and \`cart_id: "${cart_id}"\` to add items on their behalf.`, ); }), );