Client dial time imported wrong in Cisco's Contact Center outbound campaign - cisco

Using Cisco's Unified Contact Center Express 9.0.2-11001-24 I'm attempting to create new outbound campaign with a set of clients.
Importing the clients via the REST API:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<campaignContacts>
<campaign name="test">
<refURL>https://host:8443/adminapi/campaign/23</refURL>
</campaign>
<csvdata>
Account Number, First Name, Last Name, Phone1, Phone2, Phone3, Dial Time
1, John, Doe, 1234, 5678, 9012, 14:05
2, Joe, Smith, 2222, 3333, 4444, 14:24
</csvdata>
</campaignContacts>
is successful but querying the contacts with
https://host:8443/adminapi/campaign/23/contacts
gives:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<campaignContacts>
<campaign name="test">
<refURL>https://host:8443/adminapi/campaign/23</refURL>
</campaign>
<csvdata>
account number, first name, last name, phone1, phone2, phone3, dial time
1, John, Doe, 1234, 5678, 9012, 10:5
2, Joe, Smith, 2222, 3333, 4444, 10:24
</csvdata>
</campaignContacts>
The dial time is not imported correctly and the contact is called directly.
I've tried using HHmm instead of HH:mm but that doesn't work either.
The documentation HERE clearly says that:
DialTime field is used to specify the time to dial a number for individual contacts on the current date. The format to be used for this field is HH:MM. For example, to specify the dialing time as 08:25 am, the dial time field value should be 08:25 and for 03:45 pm, the dial time field value should be 15:45.
Any ideas?

Okay, after some testing it turned out that DialTime is actually working correctly. The contacts weren't called on time because of the Callback Time Limit setting of the campaign.
Querying the contacts with https://host:8443/adminapi/campaign/{id}/contacts is broken and shows wrong DialTime values

Related

Remove timezone completely from SQL Server

EDIT: Some users noted that this is a duplicate of ADO.NET question at
How can I get DateTime data from SQL Server ignoring time zone issues?
Please DO READ my tags, and my codes. This is nodejs question,
that has nothing to do with ADO library whatsoever. It doesn't
even run on Windows. The option noted at the link provided doesn't even exists at mssql-npm
I am creating a database for company attendance, which spans for 3 timezones.
The problem with SQL Server is that I read the working hour differently from each timezone. It registered like 1969-12-31T23:00:00.000Z, and registers as 06:00 for one timeline, and 08:00 for another. I need it to be exactly at 08:00 regardless of timezone. It means, 08:00 at western part of my country, and also 08:00 at eastern part of my country.
When I try to disable UseUTC, nodejs translated my timezone twice. For example, this is when I sent masuk field as 08:00
Sent to server:
Query sent to SQL Server:
UPDATE shift SET name = 'Shift 1', masuk = '2019-10-28T01:00:00.000Z', keluar = '2019-10-28T10:00:00.000Z', tolerance = 15 WHERE id = 1
Received the result back
And shown to the user as:
My country sits at GMT+7 to GMT+9. I don't mind if I have to flatten the timezone. But how to do that? Is there a way to read the time completely ignoring the time zone? It makes my work unnecesarily complicated.
I am using:
SQL Server 2012
Material UI
date-fns
Nodejs 12
mssql module
and this is my code to get the time from user input
<MuiPickersUtilsProvider utils={DateFnsUtils}>
<KeyboardTimePicker
key={component.field.toString()}
variant="inline"
value={value}
label={component.title}
onChange={this.eventHandler(component.field).bind(this)}
format="HH:mm"
/>
</MuiPickersUtilsProvider>
Thank you for help.
THe database uses time(7) to store the time

sorting mails by subject content

I'm receiving several mails per day from different senders with different subjects. Usually, there is some identifier (integer) that is within the Subject:, and I'd like to sort mails according to that identifier. The parsing of the identifier shouldn't be a problem. However, there is no pre-define range of integers that are valid.
What I'd like to have is mail with same identifier somehow bundeled together, be it that these mails are stored in a separate folder per identifier, or listed within a conversation such that mail programs display them as connected.
What I'm running right now is a getmail/procmail combination to fetch those mails.
What I need is some idea how that could the problem could be solved. If somebody has a hint how to find a solution, preferrably with procmail, let me know. Thanks!
Example:
mail1: From: User1 Subject: message for ID 1234
mail2: From: User2 Subject: message for ID 4567
mail3: From: User3 Subject: ID 1234 finished
mail4: From: User1 Subject: starting ID 9999
mail5: From: User2 Subject: finished ID 9999
What I'd like to have is all messages with identical ID in the Subject: bundled, for the example above that would be 3 'buckets': 1234, 4567, 9999.
To extract the first integer from the Subject: header and use that as the name of the folder to save to,
:0
* ^Subject:[^0-9]*\/[0-9]+
$MATCH
If you would like for the folder to be a Maildir folder instead of a flat Berkeley mbox file, use $MATCH/. instead.
The special token \/ causes Procmail to store the input string which matches the regex after this token in the variable MATCH.

Nodejs Gmail OAuth API to get Users.threads: list

I want to get list of threads after a specific datetime, but couldn't find any way to do it.
I have stored the updated datetime in the database according to the last time the Gmail API was used to fetch the list of threads.
Then using that updated time I want to retrieve the list further.
The Gmail API allows you to list threads/messages after a specific timestamp with second accuracy.
Let's say you want to list threads with messages received after Friday, 22-Jul-16 00:00:00 UTC, you would write after:1469145600 in the q-parameter.
Request
GET https://www.googleapis.com/gmail/v1/users/me/threads?q=after%3A1469145600&access_token={YOUR_ACCESS_TOKEN}
Response
{
"threads": [
{
"id": "1561153ce695b9ab",
"snippet": "Infinite Elgintensity has uploaded Gym Idiots - Spread Eagle Rows & Mike O'Hearn 585-Lb. Squat A montage of gym fails with... Infinite Elgintensity has uploaded Gym Idiots - Spread Eagle Rows",
"historyId": "895071"
}
],
"resultSizeEstimate": 1
}

Docusign webhook callback TimeZoneOffset

I'm using Docusign's webhook event notification to get info about my envelopes. I'm getting XML back from the service, but I'm trying to convert some the timestamps in the XML payload to UTC. The XML payload includes a TimeZoneOffset as an element, i.e.:
<DocuSignEnvelopeInformation>
...
<TimeZoneOffset>-7</TimeZoneOffset>
</DocuSignEnvelopeInformation>
What happens if the offset is UTC? Is it just 0 or +0 or -0? Could it ever be something like +1030? Do positive values have + prepended?
How is this field determined anyway? Is it the last sender's timezone offset?
It is the account wide (or users) timezone. For example, I am in AEST which is UTC+10 and my XML comes through with:
<TimeZone>AUS Eastern Standard Time</TimeZone>
<TimeZoneOffset>10</TimeZoneOffset>
In Preferences --> Features if I change my API timezone to Pacific Time (US) then my offset changes to:
<TimeZone>Pacific Standard Time</TimeZone>
<TimeZoneOffset>-7</TimeZoneOffset>
It's based on UTC and the offset will be 'x' for UTC or ahead and '-x' for behind.

How do I get the number of Followers gained and lost during a selected time range from Instagram API?

I need to get number of Followers gained and lost or just the total followers during a selected time range.
For example:
if I send a request to: https://api.instagram.com/v1/users/3/
I will get this Json:
{
"data":
{
"username": "kevin",
"bio": "CEO & Co-founder of Instagram",
"website": "",
"profile_picture": "https://instagramimages-a.akamaihd.net/profiles/profile_3_75sq_1325536697.jpg",
"full_name": "Kevin Systrom",
"counts": {
"media": 1419,
"followed_by": 1138347,
"follows": 643
},
"id": "3"
}
But I can't get the "followed_by" for a select time range
I read the Instagram api documentation and I can't find anywhere a Endpoint to do a request that I want.
in MEDIA I can pass MIN_TIMESTAMP and MAX_TIMESTAMP as parameters, but I am not looking for medias, I am looking for the number of followers.
I know It's possible because there is a website https://minter.io that gets every information since the beginning of the account.
PS: I already have the Authentication with OAuth 2.0
There is no API to do this, I think you have to keep a track of your follower count and update it every day. Setup a cron job to do this via API.
I just tried minter.io, I dont know how they show followers from day 1, I can definitely tell u it is fake and not accurate, I had about 1400 followers at some point and I removed them few months ago, so its back to 200 something, and minter.io does not show this at all. I think they just show a fake linear graph for historical data and going forward they keep a track of followers every day.
It is possible to use the field 'followers_count' on the User node to get a starting point. This gives the total number of followers at the time of the request. From there you could calculate a running total by subtracting the daily follower count from the Insights api that you mention.
Get current follower count:
curl -i -X GET "https://graph.facebook.com/v8/<user id>?fields=followers_count&access_token=EAACwX..."
https://developers.facebook.com/docs/instagram-api/reference/user
Get new followers for single day:
curl -i -X GET "https://graph.facebook.com/v8/<user id>/insights?metric=follower_count&period=day&since=2020-10-5T07:00:01&until=2020-10-06T07:00:00
https://developers.facebook.com/docs/instagram-api/reference/user/insights

Resources