Skip to content

Scheduling

Every setting on this page goes into one request: POST /api/campaign/:id/schedule. You send it once, on a DRAFT campaign. Only startDateTime is required. Anything you leave out uses the default shown below.

What you want to control Field(s) If you leave it out Section
When calling may start and stop startDateTime, endDateTime No deadline Start and end
Which days and hours calls are allowed timeWindows Mon–Fri 09:00–19:00, Sat–Sun 10:00–19:00 Calling hours
How many times to try each person, and how long to wait maxAttempts, retryInterval 1 attempt, no retry Retries
Call back people who ask for it during a call smartCallbackEnabled, smartCallbackDefaultDelayMinutes, smartCallbackAllowNextDay Off Smart Callback
Which phone number(s) the customer sees callerIds The agent’s numbers, or else Gowajee’s shared number Caller numbers
Which AI voice(s) the agent speaks with ttsVoiceKeys The agent’s own voice setup Voices
Skip people who were called recently removeDuplicates Off Remove duplicate recipients

A request that uses all of them:

POST /api/campaign/:id/schedule
{
"startDateTime": "2026-10-01T02:00:00.000Z",
"endDateTime": "2026-10-07T11:00:00.000Z",
"timeWindows": [
{ "dayOfWeek": 1, "time": [{ "start": "09:00", "end": "12:00" }, { "start": "13:00", "end": "18:00" }] },
{ "dayOfWeek": 2, "time": [{ "start": "09:00", "end": "18:00" }] },
{ "dayOfWeek": 3, "time": [{ "start": "09:00", "end": "18:00" }] },
{ "dayOfWeek": 4, "time": [{ "start": "09:00", "end": "18:00" }] },
{ "dayOfWeek": 5, "time": [{ "start": "09:00", "end": "18:00" }] }
],
"maxAttempts": 3,
"retryInterval": 7200000,
"smartCallbackEnabled": true,
"smartCallbackDefaultDelayMinutes": 60,
"smartCallbackAllowNextDay": true,
"callerIds": ["+6621234567", "+6621234568"],
"ttsVoiceKeys": ["nicha", "suda"]
}
Field Format Meaning
startDateTime ISO-8601, UTC The earliest moment the first call may be dialled. A time in the past means “start now”.
endDateTime ISO-8601, UTC, or null The deadline. Anyone not called by then gets EXPIRED, and so does the campaign. null or left out means no deadline.

After you start the campaign it is SCHEDULED. Gowajee’s scheduler checks about every 30 seconds. Once startDateTime has passed and the current time is inside a calling window, the campaign becomes RUNNING and dialling begins. It stays RUNNING between calling windows.

timeWindows lists the days and the hours on each day when calls may start. Hours are in Bangkok time (UTC+7), HH:MM, 24-hour clock.

"timeWindows": [
{ "dayOfWeek": 1, "time": [{ "start": "09:00", "end": "12:00" }, { "start": "13:00", "end": "18:00" }] },
{ "dayOfWeek": 6, "time": [{ "start": "10:00", "end": "15:00" }] }
]

This means Mondays 09:00–12:00 and 13:00–18:00 (with a lunch break), and Saturdays 10:00–15:00. No calls on any other day.

dayOfWeek 1 2 3 4 5 6 7
Day Mon Tue Wed Thu Fri Sat Sun

Rules

  • A day that isn’t in the list gets no calls.
  • Put every range for a day in one object’s time array. If the same dayOfWeek appears twice, only the first one counts.
  • start must be earlier than end, so a range can’t cross midnight.
  • Hours need two digits: 09:00, not 9:00. 9:00 is rejected with 400.
  • A day must have at least one range. "time": [] is rejected with 400.
  • The window controls when a call starts. A call that starts at 17:59 can carry on past 18:00.
  • Leave timeWindows out to get the default: Mon–Fri 09:00–19:00, Sat–Sun 10:00–19:00.

When a call ends as NO_ANSWER, BUSY or FAILED, Gowajee can call that person again.

Field Default Meaning
maxAttempts 1 Total calls per recipient, counting the first one. 3 means the first call plus up to 2 retries. 1 means no retries.
retryInterval 3600000 (1 hour) when maxAttempts is more than 1, otherwise 0 The minimum wait after an attempt ends before the next one, in milliseconds. When maxAttempts is more than 1, it must be at least 300000 (5 minutes).

A call that ends as CANCELLED, for example because it waited too long in the queue, is also called again. It doesn’t use up an attempt, so this happens even when maxAttempts is 1.

With maxAttempts: 3, retryInterval: 7200000 (2 hours) and weekday calling hours 09:00–18:00:

Attempt Ended at Result What happens next
1 Mon 09:05 NO_ANSWER A retry becomes due after 11:05.
2 Mon 11:06 BUSY A retry becomes due after 13:06.
3 Mon 13:09 COMPLETED Done: the person was reached.

The wait counts from when an attempt ends, not from when it was dialled.

If attempt 2 had ended at 17:30, the retry would be due at 19:30. That’s outside the calling hours, so it would be dialled at 09:00 the next weekday.

A person is not retried when:

  • a call reached them (COMPLETED) at any point in this campaign — VOICEMAIL is not “reached” and is retried,
  • they have used up maxAttempts, or
  • the campaign was cancelled or expired.

A person who was reached can still get one Smart Callback if they asked for it. That is not a retry.

A pause doesn’t stop retries for good. They wait while the campaign is PAUSED, and continue after resume.

Customers often answer and say “ไม่สะดวก ค่อยโทรมาใหม่” or “บ่าย 2 ได้ไหม”. With Smart Callback on, Gowajee hears that request in the call’s analysis and calls the customer back at the time they asked for, with the same agent.

Field Default Meaning
smartCallbackEnabled false Turns Smart Callback on. It is separate from retries: it works with maxAttempts: 1 too.
smartCallbackDefaultDelayMinutes 60 When the customer asks for a callback but gives no time, call back this many minutes after the call ended. One of 30, 60, 120, 180.
smartCallbackAllowNextDay false Allow a callback tomorrow. Off = same day only. Nothing is ever scheduled later than tomorrow.
POST /api/campaign/:id/schedule
{
"startDateTime": "2026-10-01T02:00:00.000Z",
"smartCallbackEnabled": true,
"smartCallbackDefaultDelayMinutes": 60,
"smartCallbackAllowNextDay": true
}
  • Only a call that reached the customer can ask for a callback. “Don’t call me again” is not a callback request.
  • One callback per recipient per round. The first round is the campaign’s own calls; each Call again starts a new round for the recipients it re-queues. The callback call itself never schedules another one.
  • Without Smart Callback, a normal campaign doesn’t call back a person who asks for it.
  • The callback is one call. If it isn’t answered, it isn’t retried.
  • It doesn’t use up maxAttempts, and it is dialled even when the recipient has used all attempts. It still adds 1 to the recipient’s callAttempt.
  • It goes ahead of first calls and retries in the queue. Your organization’s limit on calls at the same time still applies, so it can start a little after the scheduled time.
  • It uses the same agent and caller number as the call where the customer asked. If that number can’t be used any more, a number is picked the usual way (see Caller numbers). The voice is picked from the campaign’s voice list like for any other call, so with several voices it can differ from the first call.
  • The campaign doesn’t become COMPLETED while a callback is still waiting.
  • Pausing, cancelling or an expired campaign cancels the callbacks that are still waiting (CAMPAIGN_PAUSED, CAMPAIGN_CANCELLED, CAMPAIGN_EXPIRED). A resume doesn’t bring them back, because the time the customer asked for may have passed.
  • A callback that couldn’t be dialled on its scheduled day (for example, no line was free before the calling hours ended) is never dialled on a later day. It is marked CANCELLED (OUTSIDE_WINDOW) the next time the campaign runs, and until then its request may still read SCHEDULED.
  • A re-analysis never creates, moves or cancels a callback.

All times are Bangkok time. They are counted from when the call ended, not from when the analysis finished.

When the customer names a part of the day, Gowajee uses these times:

Customer says Callback at Part of the day ends
ตอนเช้า (morning) 09:00 13:00
ตอนบ่าย (afternoon) 13:00 16:00
ตอนเย็น (evening) 16:00 18:00
ตอนค่ำ (night) 18:00 24:00
The customer… Callback time If that time is outside the calling hours
names a time: “บ่าย 2” That time today. If it has already passed today, that time tomorrow. No callback (OUTSIDE_WINDOW).
names a delay: “อีกครึ่งชั่วโมง” Call end + that delay. No callback (OUTSIDE_WINDOW).
names a part of the day: “ช่วงเย็น” Its start time. If the call ended inside that part, the next full hour, as long as that isn’t after the part ends. If that part is over today, its start time tomorrow. Moved to the start of the next calling range that day. If there is none, no callback.
gives no time: “ค่อยโทรมาใหม่” Call end + smartCallbackDefaultDelayMinutes. Moved to the start of the next calling range that day. If there is none, no callback.
says “tomorrow” with no time The start of tomorrow’s calling hours. No callback if tomorrow has no calling hours.

When the customer says “tomorrow” together with a time or a part of the day (“พรุ่งนี้บ่าย 2”, “พรุ่งนี้เช้า”), the same rules apply to tomorrow.

Then:

  • A time tomorrow needs smartCallbackAllowNextDay: true. Otherwise there is no callback (NEXT_DAY_NOT_ALLOWED).
  • Anything later than tomorrow (“next week”) gets no callback (BEYOND_TOMORROW).
  • A time after the campaign’s endDateTime gets no callback (AFTER_CAMPAIGN_END).
  • If the analysis finishes after the chosen time has passed, the callback is dialled straight away when that is still inside the calling hours on the same day. Otherwise there is no callback (OUTSIDE_WINDOW).

Calling hours are the default (Mon–Fri 09:00–19:00, Sat–Sun 10:00–19:00), and smartCallbackDefaultDelayMinutes is 60.

Call ended Customer says smartCallbackAllowNextDay Result
Tue 10:05 บ่าย 2 ได้ไหม false Tue 14:00
Tue 15:00 บ่าย 2 ได้ไหม false No callback: 14:00 has passed, and tomorrow isn’t allowed (NEXT_DAY_NOT_ALLOWED)
Tue 15:00 บ่าย 2 ได้ไหม true Wed 14:00
Tue 10:05 โทรมาช่วงเย็น false Tue 16:00
Tue 17:20 โทรมาช่วงเย็น false Tue 18:00 (already evening, so the next full hour)
Tue 10:05 ไม่สะดวก ค่อยโทรมา false Tue 11:05 (call end + 60 minutes)
Tue 18:10 ไม่สะดวก ค่อยโทรมา false No callback: 19:10 is after the calling hours, and no range is left that day (OUTSIDE_WINDOW)
Tue 10:05 อีกครึ่งชั่วโมงค่อยโทรมา false Tue 10:35
Tue 10:05 โทรมาสัก 2 ทุ่ม false No callback: the customer asked for 20:00, which is outside the calling hours (OUTSIDE_WINDOW)
Sat 11:00 พรุ่งนี้เช้าค่อยโทรมา true Sun 10:00 (morning is 09:00, but Sunday calls start at 10:00)
Tue 10:05 สัปดาห์หน้าค่อยโทรมา true No callback (BEYOND_TOMORROW)
Fri 10:05, endDateTime is Fri 18:00 พรุ่งนี้ค่อยโทรมา true No callback: Sat 10:00 is after the campaign ends (AFTER_CAMPAIGN_END)
  • Every call in the webhook, /calls and GET /api/call/:id has a smartCallback object. It says whether a callback was scheduled, skipped or cancelled, and on the callback call itself, which call it came from.
  • /recipients shows smartCallbackScheduledAt while a recipient is waiting for one.
  • A recipient’s latestCallStatus keeps showing the call that reached them, even if the callback call is missed.
Term What it is
SIP account A connection to a phone line provider (your telecom provider, or Gowajee’s). It holds one or more phone numbers.
Caller ID One phone number inside a SIP account. It is the number the customer sees on their screen.
Outbound Default The caller ID marked as the default of its SIP account.

You can see all of them in the dashboard under System → Settings → Phone Numbers.

Send the phone numbers exactly as they appear on the Phone Numbers page:

You send What happens
One number: ["+6621234567"] Every call uses that number.
Several numbers: ["+6621234567", "+6621234568", "0812345678"] Shuffle: each call picks one at random.
[] (empty array) Rejected with 400. Leave the field out to use the default instead.
  • With several numbers, a retry never uses the number that person was last called from. Someone who ignored the first number sees a different one the next time.
  • The numbers may come from different SIP accounts.
  • A number that isn’t one of your organization’s numbers is rejected: 400 Unknown caller ID: <number>.

The first of these that exists is used:

  1. sipCallerId from the legacy fields below.
  2. The agent’s default outbound numbers (set by Gowajee in the agent’s configuration).
  3. If you sent only sipAccountId: that SIP account’s Outbound Default number.
  4. Gowajee’s shared number.

Legacy fields: sipAccountId and sipCallerId

Section titled “Legacy fields: sipAccountId and sipCallerId”

Older integrations pin every call to one number with two IDs (not phone numbers): sipAccountId (the SIP account) and sipCallerId (one caller ID in that account). You can copy both IDs from the Phone Numbers page. They still work, but callerIds does the same job with plain phone numbers, and it can shuffle, so use callerIds in new integrations.

You send What happens
One voice: ["nicha"] Every call uses that voice.
Several voices: ["nicha", "suda", "kanya"] Shuffle: each call picks one at random. The voice stays the same for the whole call. A retry is a new call, so it picks again.
[] (empty array) Rejected with 400. Leave the field out to use the agent’s own setup.
  • Sending ttsVoiceKeys switches the campaign’s calls to the TTS V2 voices in the table below, even if the agent uses another voice engine.
  • A key you send twice counts once.
  • With a male voice, Gowajee’s own built-in text (for example its filler words) uses ครับ instead of ค่ะ / คะ. Lines in your agent’s script are not converted, so a script written with ค่ะ usually still says ค่ะ with a male voice. Use a male version of the script for male voices.
  • An unknown or retired key is rejected: 400 Unknown voice: <key>.
  • If you leave it out: the agent’s own setup is used. If Shuffle voices is on in the agent’s configuration, each call picks from the agent’s voice list. Otherwise every call uses the agent’s single voice.
voiceKey Name Gender Note
nicha Nicha Female Recommended
supannee Supannee Female
suda Suda Female
kanya Kanya Female
narin Narin Female
nisa Nisa Female
taste Taste Female
beer Beer Male Recommended
thaksin Thaksin Male
chakrit Chakrit Male
krit Krit Male
somchai Somchai Male
carmen Carmen Female Non-native Thai accent
reflective Reflective Woman Female Non-native Thai accent

This table was last updated in September 2026. For the live list, call GET /voice-demo/catalog. It is public, so it needs no API key.

If Duplicate Call Alert is on for your organization (dashboard: System → Settings → General → Duplicate Call Alert), add "removeDuplicates": true. Before dialling, Gowajee removes everyone whose phone number the same agent already reached within your alert window (for example “this month”). The response tells you how many were removed: "removedRecipients": 12.

  • Only COMPLETED calls count. A number that was dialled but not reached (NO_ANSWER, BUSY…) is kept.
  • The phone number must match exactly, as text. 0812345678 and +66812345678 are different numbers here.
Error (400) Cause
Duplicate call alert is not enabled for this organization The feature is off for your organization.
All recipients are duplicates within the configured window Nobody would be left to call. The campaign stays DRAFT.
{ "startDateTime": "2026-10-01T02:00:00.000Z" }

Weekdays 09:00–19:00, weekends 10:00–19:00, one attempt each, the agent’s numbers and voice.