← Voltar para Flows

Cron: Weekly Reports Flow

Name
Cron: Weekly Reports Flow
Description
Job semanal gera relatórios e disponibiliza no admin/analytics.
Validated
Not Validated

Steps

  1. 1
    getPlatformMetrics(Analytics Service)
    Input Mapping
    period: "last_7d"
    userId: "$context.userId"
    timezone: "UTC"
    authToken: "$context.authToken"
    Output Handlers
    Output KeyNext StepBranch To FlowMerge To Context
    successStep 2: getRevenueReportYes
  2. 2
    getRevenueReport(Analytics Service)
    Input Mapping
    period: "last_7d"
    userId: "$context.userId"
    groupBy: "week"
    currency: "BRL"
    timezone: "UTC"
    authToken: "$context.authToken"
    Output Handlers
    Output KeyNext StepBranch To FlowMerge To Context
    successStep 3: sendNotificationYes
  3. 3
    sendNotification(Notification Service)
    Input Mapping
    data:
    kpis: "$step1.data"
    revenue: "$step2.data"
    userId: "$context.userId"
    channel: "email"
    priority: "normal"
    template: "weekly_reports_ready"
    authToken: "$context.authToken"
    causationId: "$context.eventId"
    recipientId: "$context.userId"
    correlationId: "$context.correlationId"
    idempotencyKey: "weekly_reports:$context.eventId:v2"
    Output Handlers
    Output KeyNext StepBranch To FlowMerge To Context
    successYes