Invite B2B Customer
invite_b2b_customerInvite a customer contact to the B2B store, as the B2B Customers page does: records an invitation and, once committed, emails the contact a link to set a password and sign in. The contact buys for the customer named by customerId (a customer business partner id; find it with lookup_business_partners) and sees that customer's prices and orders. The store must be set up and open, and the email must not already have a store login. The preview names the customer and store and warns when earlier invitations to the email are still waiting. Requires an operator (unpinned) credential with Write + storefront.execute and the Admin role.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"customerId": "<customerId>",
"email": "<email>",
"firstName": "<firstName>",
"lastName": "<lastName>"
},
"name": "invite_b2b_customer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | The contact's email address; the invitation is sent here. | ||
| preview | No | Step 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing changes until the commit call. | |
| lastName | Yes | The contact's last name. | |
| firstName | Yes | The contact's first name. | |
| customerId | Yes | The customer (business partner) id (GUID) the contact buys for. | |
| idempotencyKey | No | Caller-generated idempotency key; required with previewReceipt to commit. | |
| previewReceipt | No | Step 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| preview | No | ||
| warning | No | ||
| emailSent | No | ||
| expiresAt | No | ||
| invitation | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| idempotentReplay | No |