Skip to main content
Creates or updates the professional details record attached to a seller. Also run as a step by createSellerAccountWorkflow when professional details are provided at registration.

Usage

import { updateSellerProfessionalDetailsWorkflow } from "@mercurjs/core/workflows"

const { result } = await updateSellerProfessionalDetailsWorkflow(container).run({
  input: {
    seller_id: "sel_123",
    data: { corporate_name: "Acme GmbH", tax_id: "DE123456789" },
  },
})

Input

seller_id
string
required
Id of the seller whose professional details are updated.
data
UpdateProfessionalDetailsDTO
required
Fields to set; all optional.
additional_data
object
Custom data passed through to the workflow hooks.

Result

result
ProfessionalDetailsDTO
The updated professional details.

Hooks

  • professionalDetailsUpdated — runs after the update with { professional_details, additional_data }.
updateSellerProfessionalDetailsWorkflow.hooks.professionalDetailsUpdated(
  async ({ professional_details }) => {
    // e.g. re-run KYB checks
  }
)