opensearch send message content monitor query alert - kibana

opensearch
anyone use pattern to search and send all data to alerts by match
all messages that don't have INFO (value field)
this works in search and shows data but not able to get it in query alert , send all message fields value
paste below in search, shows all data that don't have INFO
NOT message:"?INFO?"
used below in query pattern match
“message”: “NOT message:"?INFO?"”

Related

Marketo API Open Rate & Unsubscribe status

Is there a field within the Marketo API field list that shows the status for each email address listed in a program? Like can it show ("Opened", "Bounced") etc etc. I know there is a field for bounced but I am curious about open rate etc.
How does the Unsubscribe status work with Marketo? The documentation is unclear in that it shows that it is system generated (with no explanation of HOW) and then there is an Unsubscribe Status field that is supposed to populate the email address if they personally unsubscribed? I had 2,000 contacts populate as unsubscribed but 0 populate in the Unsubscribe Status field. This is a bit worrisome given again NO documentation whatsoever in how it populates.
I tried utilizing all fields provided from Marketo on their documentation site but I feel like there has to be a field that shows the status of each email - otherwise how does it show on the dashboard when you log-in? https://developers.marketo.com/rest-api/lead-database/fields/list-of-standard-fields/

Firebase - Showing users that they have unread messages

I'm trying to determine the best way to handle showing the user that they have an unread message, in the navbar for example.
Currently I have separate documents for each conversation with data like so:
users: [ 'userId-1', 'userId-2' ]
messages: [
{
message: 'Test message',
timestamp: 12345678910,
userId: 123456
},
// etc...
]
Currently I'm thinking about adding an unread property to the message objects. Then, on page load, I would have to fetch each document where users contains the currentUser id and if any of the message objects in messages contains the unread: true property.
But then I would have to mark the message as read, but only for one of the users. So my data structure already doesn't work.
Also, this doesn't seem very performant to me, especially if the user has a great amount of conversations. Any idea on how to approach this differently?
I'm trying to determine the best way to handle showing the user that
they have an unread message, in the navbar for example
I understand that you only want to show a number of unread messages (or the information that there is a least one unread message). If this is the case you can get advantage of the new count() aggregation which takes into account any filters on the query.
Your data model is not 100% clear to me but since you have an Array of users, you could have an extra Array field containing the users that haven't read the message. So on page loading, you need to build the query of all messages where this array contains the currentUser uid and then call getCountFromServer() on this query.
Instead of being charged for each message that corresponds to the query you'll be charged one document read for each batch of up to 1000 index entries matched by the query.

Firebase Cloud Firestore request

I have a MESSAGERECAP collection which includes a unique id for each message, the id of the receiver of the message, the id of the sender and the message itself. In my application, when the user clicks on a friend to chat with him, I want the chat activity to start with the list of messages they have both sent.
I did this but obviously it does not give the desired result :
Query query = messageRef.orderBy("mssgId",Query.Direction.DESCENDING);
// with messageRef a reference to the MESSAGERECAP collection
Here is an overview of my database
You are getting the whole list because you are not filtering the data, just ordering it. If you check the Querying documentation for Firestore, also provided by #FrankVanPuffelen on the comments of your question, you can see that you have to use .where() to filter the data that you want to retrieve.
Also, as pointed out by #Jay in the comments, you can use Compound Queries to create a logical AND on your query to retrieve the data you want.
So if you do something like:
messageRef.where("senderId", "==", [currentUserId])
.where("receiver_id", "==", [receiverUserId])
.orderBy("mssgId",Query.Direction.DESCENDING)
When you execute this query you will get all the messages sent by the current user to the receiving user of the correponding id.

How to fetch email marketing insights data from Marketo using API?

I am trying to fetch "Email Performance Report" from the platform
using API to analyze the KPI's like CTR etc by type of the email
(newsletter,email marketing etc).
I went through the documentation, however I didn't find endpoint from
which I can fetch the same.
Does anyone know if there is a way to get this information?
There is no endpoint to query reports directly. However, the good news is, that the “things” that make up an “Email Performance Report”, namely: email delivery, bounce, open and click are available to query via the API.
This means that you have to build the report yourself, but you can fetch the dataset to work on.
These “things” are called activity types (activity measured on a Lead) and can be fetched by querying against the Get Lead Activities endpoint, which is also mentioned as the Query in the API docs.
It sits at the GET /rest/v1/activities.json url and you have to pass a nextPageToken and the activityTypeIds as query parameters.
The nextPageToken indicates a datetime. Activities after that date will be returned by the call. To obtain one, you have to make a call to GET /rest/v1/activities/pagingtoken.json, where you have to specify the earliest datetime to retrieve activities from. See more about Paging Tokens.
To figure out the value of activityTypeIds, you first need to get the internal Ids of the activity types you are interested in. In order to do so, you have to query the GET /rest/v1/activities/types.json endpoint and look for the activity types with names like Send Email, Email Delivered, Email Bounced, Unsubscribe Email, Open Email and Click Email. (I don't know if these Ids are changing from instance to instance, but in ours these are from #6 to #11).
Once you have all of these bits at hand, you can make your request like that:
GET https://<INSTANCE_ID>.mktorest.com/rest/v1/activities.json?activityTypeIds=<TYPE_ID>&nextPageToken=<NEXTPAGE_TOKEN>&access_token=<ACCESS_TOKEN>
The result it gives is an array with items like below. Items can be filtered to specific email based on the primaryAttributeValue property and processed further accordingly.
{
"id":7370416,
"marketoGUID":"7170506",
"leadId":291305,
"activityDate":"2017-12-17T00:00:00Z",
"activityTypeId":11,// #11 = `Click Email`
"campaignId":1790,
"primaryAttributeValueId":1638,
"primaryAttributeValue":"EMAIL_NAME",// Name of the Email as seen in Marketo
"attributes":[
// …
]
}

Querying Thunderbird's SQLite message database from C#

I want to query email messages stored by Thunderbird from a C# application I am developing.
Currently I can get some message parts such as From address and Subject by querying the SQLite database, global-messages-db.sqlite.
SELECT subject FROM messagesText LIMIT 10;
I have not been able to locate the body of messages. I have searched for documentation of Thunderbird's storage but I can't find anything that describes where this is stored.
Where are the bodies of messages stored?
From my own experimentation, it seems you can get the list of messages with the below.
select * from messages;
In that result set, you'll notice each message has an id. To get the content of a particular message you can do the following.
select c0body,c1subject,c2attachmentNames,c3author,c4recipients from messagesText_content where docid = 1234;
This is assuming the id of the message you want is 1234.

Resources