Finalize metrics verification and backlog updates
This commit is contained in:
@@ -86,6 +86,7 @@ export type LeadFunnelOutreach = {
|
||||
sendStatus?: OutreachSendStatus | null;
|
||||
responseStatus?: OutreachResponseStatus | null;
|
||||
salesStatus?: OutreachSalesStatus | null;
|
||||
doNotContactUntil?: number | null;
|
||||
};
|
||||
|
||||
export type LeadFunnelInput = {
|
||||
@@ -103,6 +104,7 @@ export type LeadFunnelInput = {
|
||||
contactPerson?: string | null;
|
||||
websiteDomain?: string | null;
|
||||
outreach?: LeadFunnelOutreach | null;
|
||||
now?: number;
|
||||
};
|
||||
|
||||
export type LeadFunnelCard = {
|
||||
@@ -303,6 +305,14 @@ function getLeadNextAction(lead: LeadFunnelInput): string {
|
||||
const stageId = getLeadFunnelStageId(lead);
|
||||
|
||||
if (stageId === "deferred") {
|
||||
if (
|
||||
lead.outreach?.salesStatus === "do_not_pursue" &&
|
||||
typeof lead.outreach.doNotContactUntil === "number" &&
|
||||
(lead.now ?? Date.now()) >= lead.outreach.doNotContactUntil
|
||||
) {
|
||||
return "Erneut prüfen";
|
||||
}
|
||||
|
||||
return "Zurückstellung prüfen";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user