Magnews mette a disposizione diverse tabelle interrogabili tramite MQL, utili per leggere i dati presenti nella piattaforma. Le query su queste tabelle sono consentite solo in lettura; per modificare i dati è necessario utilizzare funzioni specifiche dell'api rest o soap.
L'accesso ad alcune tabelle può richiedere permessi specifici, ad esempio quello per l’esportazione dei dati dal database.
CONTACTS
La tabella di sistema contacts contiene tutti i tuoi contatti.
Ogni riga rappresenta un contatto, con colonne che includono informazioni come email
, status
, timezone
e metriche di interazione (stats.*
).
Alcune colonne speciali:
Colonna | Tipo | Descrizione |
---|---|---|
idcontact | Integer | ID del contatto |
iddatabase | Integer | ID del database dei contatti |
status | Integer |
Stato del contatto: Per usarlo come condizione nella where, usa il valore testuale: |
String | Email del contatto | |
stats.idchannel | Integer | ID del canale di inviostats.idchannel=0 for EMAIL stats.idchannel=1 for SMS
|
stats.ipaddress | Datetime | Indirizzo IP della spedizione dell'ultimo messaggio aperto |
stats.totalsent | Integer | Numero di messaggi inviati usando deliveries. Se non è specificato il canale (usando stats.idchannel ) otterrai un record per ogni canale con cui è stato inviato almeno un messaggio |
stats.totalreceived | Integer | Numero di messaggi email ricevuti |
stats.totalhardbounced | Integer | Numero degli hard-bounced dei messaggi email inviati |
stats.totalsoftbounced | Integer | Numero dei soft-bounced dei messaggi email inviati |
stats.totalopened | Integer | Numero dei messaggi email aperti |
stats.totalclicked | Integer | Numero dei messaggi email cliccati |
stats.totalcomplainted | Integer | Number of complained email |
stats.totalforwarded | Integer | Numero dei messaggi email inoltrati |
stats.totalunsubscribed | Integer | Numero dei disiscritti da messaggi email |
stats.totalconverted | Integer | Numero dei messaggi email convertiti |
stats.totalopens | Integer | Numero delle aperture totali |
stats.totalclicks | Integer | Numero dei click totali |
stats.firstsent | Datetime | Timestamp of delivery of the first sent message using deliveries |
stats.firstreceived | Datetime | Timestamp of delivery of the first sent message which has been received using deliveries |
stats.firstopen | Datetime | Timestamp of delivery of the first opened message deliveries |
stats.firstclick | Datetime | Timestamp of delivery of the first clicked message deliveries |
stats.firstforwarded | Datetime | Timestamp of delivery of the first forwarded message deliveries |
stats.firstcomplainted | Datetime | Timestamp of delivery of the first complained message deliveries |
stats.firstunsubscribed | Datetime | Timestamp of delivery of the first unsubscribed message deliveries |
stats.firstconverted | Datetime | Timestamp of delivery of the first converted message deliveries |
stats.lastsent | Datetime | Timestamp of delivery of the last sent message using deliveries |
stats.lastreceived | Datetime | Timestamp of delivery of the last sent message which has been received using deliveries |
stats.lastopen | Datetime | Timestamp of delivery of the last opened message deliveries |
stats.lastopenevent | Datetime | Timestamp of the last event which is considered an open |
stats.lastclick | Datetime | Timestamp of delivery of the last clicked message deliveries |
stats.lastforwarded | Datetime | Timestamp of delivery of the last forwarded message deliveries |
stats.lastcomplainted | Datetime | Timestamp of delivery of the last complained message deliveries |
stats.lastunsubscribed | Datetime | Timestamp of delivery of the last unsubscribed message deliveries |
stats.lastconverted | Datetime | Timestamp of delivery of the last converted message deliveries |
stats.engagementlevel | int | Numeric representation of the engagement level: 10 = Contact not subscribed, 20 = Out of recency, 30 = Never-openers, 40 = Ex-openers, 50 = New, 60 = Opener, 70 = Clicker |
slistsubscription.list_IDLIST.subscriptionstatus | String | Status of explicit subscription for special list IDLIST |
slistsubscription.list_IDLIST.subscriptiondate | Datetime | Timestamp of subscription for special list IDLIST |
slistsubscription.list_IDLIST.unsubcriptiondate | Datetime | Timestamp of unsubscription for special list IDLIST |
slistsubscription.list_IDLIST.subscriptionlastmoddate | Datetime | Timestamp of subscription last modification date for special list IDLIST |
GROUPS
Include tutte le audience di contatti, sia dinamiche che statiche. Le colonne principali sono:
Tipo | Descrizione | |
---|---|---|
idgroup | Integer | ID della audience |
name | String | Nome della audience |
creationdate | Datetime | Data-ora di creazione della audience |
lastmodificationdate | Datetime | Data-ora di ultima modifica della audience |
STATICGROUPMEMBERS
Contiene i membri delle audience statiche. Ogni riga rappresenta l'associazione tra un contatto e un'audience statica. Colonne principali:
Colonna | Tipo | Descrizione |
---|---|---|
idgroup | Integer | ID della audience |
idcontact | String | ID del contatto |
CONTENTS
Contiene tutti i contenuti presenti nella piattaforma. Le colonne includono:
Colonna | Tipo | Descrizione |
---|---|---|
idcontent | Integer | ID del contenuto |
name | String | Nome del contenuto |
creationdate | Datetime | Data-ora di creazione del contenuto |
lastmodificationdate | Datetime | Data-ora di ultima modifica del contenuto |
taglist | String | Lista dei tag associati al contenuto (solo per la clausola WHERE, non per SELECT) |
template | String | Tipo di contenuto, ad esempio articolo 'article' |
totalclicks | Integer | Conteggio totale dei clic sui messaggi inviati (solo sulle spedizioni, non sui messaggi transazionali) |
NEWSLETTERS
Include tutte le comunicazioni create. Le colonne principali sono:
Colonna | Tipo | Descrizione |
---|---|---|
idnewsletter | Integer | ID della comunicazione |
idworkflow | Integer | ID del workflow a cui appartiene la comunicazione (solo per i messaggi di notifica che appartengono a un workflow) |
idcampaign | Integer | ID del journey |
name | String | Nome della comunicazione |
subject | String | Subject della comunicazione (canale email) |
emailfrom | String | Mittente della comunicazione (canale email) |
creationdate | Datetime | Data-ora di creazione della comunicazione |
sentdate | Datetime | Data-ora della prima spedizione definitiva della comunicazione |
sent | Boolean | True means the communication has been sent at least once (using deliveries, not transactional messages) |
draft | Boolean | True means the communication has never been sent (using deliveries, not transactional messages) |
template | Boolean | True means the communication is a transactional communication |
emailchannelenabled | Boolean | True means the communication can be used to send email messages |
smschannelenabled | Boolean | True means the communication can be used to send SMS messages |
faxchannelenabled | Boolean | True means the communication can be used to send fax messages |
status | String | 'Active' or 'deleted' |
designertype | String | 'Titano' or 'giotto' |
WEBPAGES
Contiene tutte le pagine web create. Le colonne includono:
Colonna | Tipo | Descrizione |
---|---|---|
idwebpage | Integer | ID della webpage |
idwebsite | Integer | ID del website |
name | String | Nome della webpage |
SURVEYS
Include tutti i survey creati. Le colonne principali sono:
Colonna | Tipo | Descrizione |
---|---|---|
idsurvey | Integer | ID del survey |
name | String | Nome del survey |
status | String | 'Active' o 'deleted' |
creationdate | Datetime | Data-ora di creazione del survey |
lastmodificationdate | Datetime | Data-ora di ultima modifica del survey |
SURVEYSESSIONS
Contiene le sessioni dei survey. Ogni riga rappresenta una sessione di compilazione di un survey da parte di un contatto. Colonne principali:
Colonna | Tipo | Descrizione |
---|---|---|
idsurvey | Integer | ID del survey |
idsurveysession | Integer | ID della sessione del survey (da comporre con idsurvey) |
contact | Integer | ID del contatto |
completed | Boolean | True significa che la sessione è stata contrassegnata come completata ('completed'), false significa che la sessione è attiva e non ancora completata ('completed') |
status | String | 'Completed' significa che la sessione è stata contrassegnata come 'completed', 'active' la sessione è attiva e non ancora completata 'completed', 'deleted' significa che la sessione è stata nascosta/eliminata |
startdate | Datetime | Data-ora dell'inizio della sessione |
lastevent | Datetime | Data-ora dell'ultimo evento della sessione (utile per scaricare dati in modo incrementale) |
ipaddress | String | Indirizzo IP del broswer (in caso di utilizzo di indirizzi dinamici, si tratta del primo indirizzo IP utilizzato nella sessione) |
testsession | Boolean | True significa che la sessione è stata contrassegnata come sessione di 'test'. |
WORKFLOWS
Contiene tutti i workflow presenti nella piattaforma. Le colonne includono:
Colonna | Tipo | Descrizione |
---|---|---|
idworkflow | Integer | ID del workflow |
name | String | Nome del workflow |
idcampaign | Integer | Id del journey a cui appartiene il workflow |
creationDate | Datetime | Data di creazione del workflow |
WORKFLOWSESSIONS
Include le sessioni attive dei workflow. Ogni riga rappresenta una sessione in corso di un workflow per un contatto. Colonne principali:
Colunna | Tipo | Descrizione |
---|---|---|
idworkflowsession | Integer | ID della sessione |
contact | Integer |
ID del contatto |
idworkflow | Integer | ID del workflow |
idstartingnode | Integer | Nodo di partenza |
startdate | Datetime | Data di inizio della sessione |
lastevent | Datetime | Data di ultima modifica della sessione |
testsession | Boolean | True significa che è una sessione di test |
WORKFLOWSESSIONSFINISHED
Contiene le sessioni concluse dei workflow. Le colonne includono:
Colonna | Tipo | Descrizione |
---|---|---|
idworkflowsession | Integer | ID della sessione |
contact | Integer | ID del contatto |
idworkflow | Integer | ID del workflow |
status | String | Stato della sessione. Valori: positive, neutral, error, negative, other |
idstartingnode | Integer | Nodo di partenza |
startdate | Datetime | Data di inizio della sessione |
lastevent | Datetime | Data di ultima modifica della sessione |
testsession | Boolean | True significa che è una sessione di test |
SIMPLEMESSAGES
Include tutti i messaggi transazionali processati. Le colonne principali sono:
Colonna | Tipo | Descrizione |
---|---|---|
idsimplemessage | Integer | ID del messaggio |
idcontact | Integer | ID del contatto |
messagetype | String | Tipo di messaggio ('email','sms',fax') |
sentts | Datetime | Data-ora di invio |
opened | Boolean | True significa che il messaggio è stato aperto dal destinatario |
clicked | Boolean | True significa che il messaggio è stato cliccato dal destinatario |
complainted | Boolean | True significa che il contatto ha segnalato come spam il messaggio |
idmessagetype | Integer | ID del tipo di messaggio |
status | String | Status of sent messages, used only to make a filter (can be 'notsent' or 'error'). It doesn't consider bounced messages). Example: SELECT idsimplemessage from SIMPLEMESSAGES where status = 'notsent' or status='error' |
notsentcause | String | Not sent cause as String for the message. Values: 'unknown', 'blacklisted_recipient', 'cancelled', 'unsubscribed', 'forbidden_from', 'forbidden_replyto', 'maxsize_exceeded', 'phonerecipient_notallowed', 'empty_recipient', 'forbidden_smsfrom', 'forbidden_smsnumericfrom', 'no_credit' |
idbouncecategory | Integer | Bounce category id. Use describeBounceCategories to get the category id mapping |
lastupdatets | Datetime | Timestamp of the last event on the message (such as delivery, bounce receipt, click...) |
externalID | String | The external assigned ID of the message |
idnewsletter | Integer | Id of the transactional communication |
destination | String | Tipo di messaggio ('backendusers' for user messages, 'contacts' for contact messages) |
idwfsession | Integer | Id of the workflow session for which the message was sent |
RECEIVEDMESSAGES
Represents all the received messages
Colonne:
Colonna | Tipo | Descrizione |
---|---|---|
idreceivedmessage | Integer | Id of the received message |
msgfrom | String | From of the message |
messagetype | String | Tipo di messaggio (può essere 'email' o 'sms') |
msgto | String | Destinatario del messaggio |
msgbody | String | (Processed) body del messaggio |
idfolder | Integer | ID del MESSAGERECEIVEDFOLDER |
msgsubject | String | Subject del messaggio (solo per email) |
msgreplyto | String | Reply-to del messaggio (solo per email) |
creationdate | Datetime | Data e ora di ricezione del messaggio |
lastmodificationdate | Datetime | Data e ora di ultima modifica del messaggio |
status | String | Stato del messaggio (può essere 'active' o 'deleted'), usato solo per le clausole WHERE |
RECEIVEDMESSAGESFOLDERS
Contiene tutti i messaggi ricevuti tramite il servizio Message Receiver. Le colonne includono:
Colonna | Tipo | Descrizione |
---|---|---|
idreceivedmessagefolder | Integer | ID della cartella |
name | String | Nome della cartella |
status | String | Stato della cartella (può essere 'active' o 'deleted'), usato solo per le clausole WHERE |
CONTENTTAGSTATS
Statistiche dei contatti relative ai tag di contenuto. Le colonne includono:
Colonna | Tipo | Descrizione |
---|---|---|
idcontact | String | ID del contatto |
tagname | String | Tag name |
lastclick | Datetime | Last click on a content with the specified tag |
lastopen | Datetime | Last open on a content with the specified tag |
totalclicks | int | Number of clicks on a content with the specified tag |
totalopens | int | Number of openings on a content with the specified tag |
NEWSLETTERTAGSTATS
Statistiche dei contatti relative ai tag di comunicazione. Le colonne principali sono:
Colonna | Tipo | Descrizione |
---|---|---|
idcontact | String | ID del contatto |
tagname | String | Tag name |
lastclick | Datetime | Last click on a communication with the specified tag |
lastopen | Datetime | Last open on a communication with the specified tag |
totalclicks | int | Number of clicks on a communication with the specified tag |
totalopens | int | Number of opens on a communication with the specified tag |
CONVERSIONEVENTS
Contiene tutti gli eventi di conversione registrati. Le colonne includono:
Colonna | Tipo | Descrizione |
---|---|---|
idcontact | Integer | ID del contatto che ha convertito |
iddelivery | Integer | ID della spedizione, if the conversion occurred from a delivered communication |
idsimplemessage | Integer | ID del messaggio transazionale, if the conversion occurred from a transactional communication or workflow message |
idsurvey | Integer | ID del survey, if the conversion occurred from a landing page |
idgoal | Integer | ID dell'obiettivo di conversione |
goalname | String | Nome dell'obiettivo di conversione |
eventts | Datetime | Data-ora dell'evento |
value | Decimal | Valore della conversione (separatore decimale '.') |