Reschedule Contact

Node

Reschedule Contact

Description

This node RESCHEDULE.png reads the final result of a contact attempt and, when that result matches a rule you configure, puts the contact back in line to be tried again after a delay.

Overview

  • Takes the message coming out of a delivery result (typically the Dial or CCX Cisco Dialer Delivery Notification output) and compares payload.body.status and payload.body.reasonCode with the rules on the node.

  • A match reschedules the campaign contact: status goes back to UNDELIVERED, scheduleAfter is set to now plus the configured delay, and rescheduleCount is increased by one. A later pass of the campaign can pick that contact up again once scheduleAfter is due.

  • The message is always sent on the single output. A reschedule does not stop the flow. No match, a missing contact, a reached retry limit, and a failed update all forward the message as well.

  • With no complete rules, or with Max retries left at 0, nothing is rescheduled.

Category

Inputs

Outputs

Default Label

Flow Control

1

1

Node name, or "Reschedule Contact" if left blank

Outputs

Output

Label

Carries

1

(single output)

The same message that came in. After a successful reschedule, outboundMetadata.contact on that message also has the new status, scheduleAfter, and rescheduleCount.

Configuration Options

Setting

Default

What it does

Name

(blank)

Optional label for the node.

Reschedule when

One empty rule row

The status and reason pairs that should be retried. Each row needs both a status (for example FAILED) and a reason (for example NO_ANSWER). A row is kept only when at least one of the two is filled in.

Delay

0 minutes

How long to wait before the contact is eligible again. Amount plus a unit: minutes, hours, or days.

Max retries

0

How many times this contact may be rescheduled. The contact’s current rescheduleCount is compared with this number. 0 means a contact that has never been rescheduled is already at the limit, so set this above 0 for any retry to happen.

Match Rules

Rule shape

Result

Both status and reason filled in

Matches when the incoming status and reason both equal that row. Comparison ignores letter case. NO_ANSWER does not match NOANSWER.

Several rows

Any one complete row is enough. Rows are combined with OR.

Status or reason left blank on a row

That row never matches.

No rows, or every row incomplete

Nothing matches. The message is forwarded and the contact is not updated.

Incoming status or reason missing

No match, even when a rule exists.

What Happens When This Node Runs

The node reads:

  • msg.payload.body.status

  • msg.payload.body.reasonCode

  • msg.outboundMetadata.contact._id

  • msg.outboundMetadata.contact.rescheduleCount (treated as 0 when missing)

Then:

  1. If status and reason do not match any complete rule, the node shows No match and forwards the message. The contact is not updated.

  2. If they match but contact._id is missing, the node shows Missing contact id, logs a warning, and forwards the message.

  3. If rescheduleCount is already greater than or equal to Max retries, the node shows Retry limit reached and forwards the message. The contact is not updated.

  4. Otherwise it computes scheduleAfter as now plus the delay, in the campaign timezone, and updates the campaign contact:

Field written

Value

status

UNDELIVERED

scheduleAfter

Campaign-local time YYYY-MM-DDTHH:mm:ss (no timezone suffix)

rescheduleCount

Current count plus 1

The update is PATCH /contacts/{contactId} on the campaigns service. The same three fields are written onto msg.outboundMetadata.contact before the message is forwarded. The node status shows the new time, the timezone used, and the attempt count, for example 1/3.

If that update fails, the node shows Update failed, logs the error, and still forwards the original message. The contact fields on the message stay unchanged.

Delay

Unit

How the next time is calculated

minutes

Now plus that many minutes. Seconds are kept. 0 minutes schedules for the current time.

hours

Now plus that many hours. Seconds are kept.

days

That many calendar days later in the campaign timezone, at the same hour, minute, and second.

Prerequisites

  • Place this node on the delivery-result path, where payload.body.status and payload.body.reasonCode are present (the Dial or CCX Cisco Dialer delivery output).

  • The message must carry the campaign contact id on outboundMetadata.contact._id. That is the id in the campaigns contacts collection.

  • Add at least one rule with both a status and a reason.

  • Set Max retries to the number of extra attempts you want. Left at 0, a matching result is forwarded and the contact is not rescheduled.

  • A contact becomes eligible again only after scheduleAfter. The undelivered-contact check uses that time.

RESCHEDULE CONTACT NODE.png