← Voltar para Flows

Booking Cancelation Flow

Name
Booking Cancelation Flow
Description
Cancelamento de booking, liberação de agenda e eventual reembolso/notificação.
Validated
Not Validated

Steps

  1. 1
    cancelBooking(Booking Service)
    Input Mapping
    reason: "$context.reason"
    userId: "$context.userId"
    authToken: "$context.authToken"
    bookingId: "$context.bookingId"
    cancelledBy: "$context.cancelledBy"
    idempotencyKey: "$context.idempotencyKey"
    requestedRefund: "$context.requestedRefund"
    Output Handlers
    Output KeyNext StepBranch To FlowMerge To Context
    successStep 2: createBlocksYes
  2. 2
    createBlocks(Calendar Service)
    Input Mapping
    blocks: "$step1.data.calendarUnblockActions"
    dryRun: false
    userId: "$context.userId"
    ownerId: "$step1.data.studioId"
    authToken: "$context.authToken"
    ownerType: "STUDIO"
    Output Handlers
    Output KeyNext StepBranch To FlowMerge To Context
    successStep 3: processRefundYes
  3. 3
    processRefund(Payment Service)
    Input Mapping
    amount: "$step1.data.refundAmount"
    reason: "booking_canceled"
    paymentId: "$step1.data.paymentId"
    idempotencyKey: "$context.idempotencyKey"
    authStripeSecretKeyRef: "$context.authStripeSecretKeyRef"
    Output Handlers
    Output KeyNext StepBranch To FlowMerge To Context
    successStep 4: sendNotificationYes
  4. 4
    sendNotification(Notification Service)
    Input Mapping
    data: "$step1.data"
    channel: "IN_APP"
    template: "booking_canceled"
    recipientId: "$context.userId"
    correlationId: "$context.correlationId"
    idempotencyKey: "$context.idempotencyKey"
    Output Handlers
    Output KeyNext StepBranch To FlowMerge To Context
    successYes