Lettura dalle entità Salesforce Marketing Cloud
Prerequisito
Un oggetto di Salesforce Marketing Cloud da cui si desidera leggere. È necessario il nome dell'oggetto, come Activity o Campaigns. Nella tabella seguente sono illustrate le entità supportate.
Entità supportate come origine:
| Entità | Interfaccia | Può essere Filtrato | Supporta Limite | Supporta Ordina per | Supporta SELEZIONA * | Supporta il partizionamento |
|---|---|---|---|---|---|---|
| Callback di notifiche di eventi | REST | No | No | No | Sì | No |
| Elenco di seed | REST | No | Sì | No | Sì | No |
| Configurazione | REST | Sì | Sì | No | Sì | No |
| Verifica del dominio | REST | Sì | Sì | Sì | Sì | No |
| Oggetti tag nidificati | REST | Sì | No | No | Sì | No |
| Contatti | REST | No | Sì | No | Sì | No |
| Iscrizione alle notifiche di eventi | REST | No | No | No | Sì | No |
| Messaggistica | REST | No | Sì | No | Sì | No |
| Attività | SOAP | No | No | No | Sì | Sì |
| Evento di mancato recapito | SOAP | No | No | No | Sì | Sì |
| Evento di clic | SOAP | No | No | No | Sì | Sì |
| Area contenuti | SOAP | No | No | No | Sì | Sì |
| Estensione di dati | SOAP | No | Sì | No | Sì | Sì |
| SOAP | No | Sì | No | Sì | Sì | |
| Evento di e-mail inoltrata | SOAP | No | Sì | No | Sì | Sì |
| Inoltra e-mail OptInEvent | SOAP | No | Sì | No | Sì | Sì |
| Link | SOAP | No | Sì | No | Sì | Sì |
| Link Invia | SOAP | No | Sì | No | Sì | Sì |
| Elenco | SOAP | No | Sì | No | Sì | Sì |
| Abbonato all'elenco | SOAP | No | Sì | No | Sì | Sì |
| Evento non inviato | SOAP | No | Sì | No | Sì | Sì |
| Evento aperto | SOAP | No | Sì | No | Sì | Sì |
| Invia | SOAP | No | Sì | No | Sì | Sì |
| Evento inviato | SOAP | No | Sì | No | Sì | Sì |
| Abbonato | SOAP | No | Sì | No | Sì | Sì |
| Evento di sondaggio | SOAP | No | Sì | No | Sì | Sì |
| Evento di annullamento dell'iscrizione | SOAP | No | Sì | No | Sì | Sì |
| Eventi di audit | REST | No | Sì | Sì | Sì | No |
| Campagne | REST | No | Sì | Sì | Sì | No |
| Interazioni | REST | No | Sì | Sì | Sì | No |
| Risorse di contenuti | REST | No | Sì | Sì | Sì | No |
Esempio per REST:
salesforcemarketingcloud_read = glueContext.create_dynamic_frame.from_options( connection_type="salesforcemarketingcloud", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "Campaigns", "API_VERSION": "v1", "INSTANCE_URL": "https://**********************.rest.marketingcloudapis.com" } )
Esempio per SOAP:
salesforcemarketingcloud_read = glueContext.create_dynamic_frame.from_options( connection_type="salesforcemarketingcloud", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "Activity", "API_VERSION": "v1", "INSTANCE_URL": "https://**********************.soap.marketingcloudapis.com" } )
Dettagli dell'entità e del campo di Salesforce Marketing Cloud:
Nelle tabelle seguenti sono descritte le entità di Salesforce Marketing Cloud. Sono presenti entità REST con metadati statici ed entità SOAP con metadati dinamici.
Entità REST con metadati statici:
| Entità | Campo | Tipo di dati | Operatori supportati |
|---|---|---|---|
| Callback di notifiche di eventi | callbackId | Stringa | |
| callbackName | Stringa | ||
| url | Stringa | ||
| maxBatchSize | Numero intero | ||
| status | Stringa | ||
| statusReason | Stringa | ||
| Seed-List | id | Stringa | |
| nome | Stringa | ||
| description | Stringa | ||
| activeSeedCount | Numero intero | ||
| Configurazione | customerKey | Stringa | |
| nome | Stringa | ||
| description | Stringa | ||
| locationType | Stringa | '=' | |
| awsFileTransferLocation | Struct | ||
| Verifica del dominio | enterpriseId | Numero intero | |
| status | Stringa | '=' | |
| domainType | Stringa | '=' | |
| memberId | Numero intero | ||
| emailSendTime | DateTime | ||
| domain | Stringa | ||
| isSendable | Booleano | ||
| Oggetti tag nidificati | id | Numero intero | |
| modifiedDate | DateTime | ||
| tags | Elenco | ||
| nome | Stringa | ||
| description | Stringa | ||
| parentId | Numero intero | ||
| Contatti | values | Elenco | |
| Iscrizione alle notifiche di eventi | subscriptionName | Stringa | |
| callbackId | Stringa | ||
| callbackName | Stringa | ||
| eventCategoryTypes | Elenco | ||
| filtri | Elenco | ||
| url | Stringa | ||
| maxBatchSize | Numero intero | ||
| subscriptionId | Stringa | ||
| status | Stringa | ||
| statusReason | Stringa | ||
| Messaggistica | deliveryTime | DateTime | |
| id | Stringa | ||
| messageId | Stringa | ||
| status | Stringa | ||
| in | Struct | ||
| Interazioni | status | Stringa | '=' |
| id | Stringa | ||
| key | Stringa | ||
| nome | Stringa | ||
| lastPublishedDate | DateTime | ||
| description | Stringa | ||
| version | Numero intero | ||
| workflowApiVersion | Numero intero | ||
| createdDate | DateTime | ||
| modifiedDate | DateTime | ||
| goals | Struct | ||
| stats | Struct | ||
| entryMode | Stringa | ||
| defaults | Struct | ||
| executionMode | Struct | ||
| definitionId | Stringa | ||
| Risorse di contenuti | id | Numero intero | |
| customerKey | Stringa | ||
| objectId | Stringa | ||
| contentType | Stringa | ||
| assetType | Struct | ||
| nome | Stringa | ||
| description | Stringa | ||
| owner | Struct | ||
| createdDate | DateTime | ||
| createdBy | Struct | ||
| modifiedDate | DateTime | ||
| modifiedBy | Struct | ||
| thumbnail | Struct | ||
| category | Struct | ||
| meta | Struct | ||
| viste | Struct | ||
| availableViews | Struct | ||
| dati | Struct | ||
| legacyData | Struct | ||
| modelVersion | Numero intero | ||
| Versione | Numero intero | ||
| Locked (Bloccato) | Booleano | ||
| FileProperties | Struct | ||
| Tag | Elenco | ||
| Contenuti | Stringa | ||
| Progettazione | Stringa | ||
| SuperContent | Stringa | ||
| CustomFields | Struct | ||
| Blocchi | Struct | ||
| MinBlocks | Numero intero | ||
| MaxBlocks | Numero intero | ||
| Canali | Struct | ||
| AllowedBlocks | Elenco | ||
| Slot | Struct | ||
| BusinessUnitAvailability | Struct | ||
| sharingProperties | Struct | ||
| sharingProperties.sharedWith | Struct | ||
| sharingProperties.sharingType | Stringa | ||
| Modello | Struct | ||
| File | Stringa | ||
| GenerateFrom | Stringa | ||
| Eventi di audit | id | Numero intero | |
| createdDate | DateTime | ||
| memberId | Numero intero | ||
| enterpriseId | Numero intero | ||
| employee | Struct | ||
| objectType | Struct | ||
| operation | Struct | ||
| oggetto | Struct | ||
| transactionId | Stringa | ||
| Campagne | id | Numero intero | |
| createdDate | DateTime | ||
| modifiedDate | DateTime | ||
| nome | Stringa | ||
| description | Stringa | ||
| campaignCode | Stringa | ||
| color | Stringa | ||
| favorite | Booleano |
Entità SOAP con metadati dinamici:
| Entità | Tipo di dati | Operatori supportati |
|---|---|---|
| Attività | Stringa | LIKE,!=,= |
| Struct | ||
| Numero intero | !=,=,>=,<=,<,> | |
| Doppio | !=,=,>=,<=,<,> | |
| Booleano | !=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Evento di mancato recapito | Numero intero | !=,=,>=,<=,<,> |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Stringa | LIKE,!=,= | |
| Struct | ||
| Evento di clic | Numero intero | !=,=,>=,<=,<,> |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Stringa | LIKE,!=,= | |
| Struct | ||
| Area contenuti | Struct | |
| Stringa | LIKE,!=,= | |
| Numero intero | !=,=,>=,<=,<,> | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Booleano | !=,= | |
| Estensione di dati | DateTime | >=,<=,<,>,=,BETWEEN |
| Stringa | LIKE,!=,= | |
| Numero intero | !=,=,>=,<=,<,> | |
| Stringa | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Booleano | !=,= | |
| Struct | ||
| Evento di e-mail inoltrata | Numero intero | !=,=,>=,<=,<,> |
| Stringa | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| E-mail OptInEvent inoltrata | Numero intero | !=,=,>=,<=,<,> |
| Stringa | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Link | Numero intero | !=,=,>=,<=,<,> |
| Link invia | Numero intero | !=,=,>=,<=,<,> |
| Stringa | LIKE,!=,= | |
| Doppio | !=,=,>=,<=,<,> | |
| Elenco | Numero intero | !=,=,>=,<=,<,> |
| Stringa | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Abbonato all'elenco | Numero intero | !=,=,>=,<=,<,> |
| Stringa | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Evento non inviato | Numero intero | !=,=,>=,<=,<,> |
| Stringa | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Evento aperto | Numero intero | !=,=,>=,<=,<,> |
| Stringa | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Invia | Numero intero | !=,=,>=,<=,<,> |
| Stringa | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Booleano | !=,= | |
| Struct | ||
| Evento inviato | Numero intero | !=,=,>=,<=,<,> |
| Stringa | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Abbonato | Numero intero | !=,=,>=,<=,<,> |
| Stringa | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Evento di sondaggio | Numero intero | !=,=,>=,<=,<,> |
| Stringa | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Struct | ||
| Evento di annullamento dell'iscrizione | Numero intero | !=,=,>=,<=,<,> |
| Stringa | LIKE,!=,= | |
| DateTime | >=,<=,<,>,=,BETWEEN | |
| Booleano | !=,= | |
| Struct |
Query di partizionamento
In Salesforce Marketing Cloud, i campi del tipo di dati Integer e DateTime supportano il partizionamento basato sul campo.
È possibile fornire le opzioni Spark aggiuntive PARTITION_FIELD, LOWER_BOUND, UPPER_BOUND e NUM_PARTITIONS se si desidera utilizzare la simultaneità in Spark. Con questi parametri, la query originale viene suddivisa in NUM_PARTITIONS query secondarie che possono essere eseguite contemporaneamente dalle attività Spark.
PARTITION_FIELD: il nome del campo da utilizzare per partizionare la query.LOWER_BOUND: un valore limite inferiore inclusivo del campo di partizione scelto.Per il campo timestamp, accettiamo il formato di timestamp Spark utilizzato nelle query SQL di Spark.
Esempi di valori validi:
“2024-05-07T02:03:00.00Z"UPPER_BOUND: un valore limite superiore esclusivo del campo di partizione scelto.NUM_PARTITIONS: il numero di partizioni.
Esempio:
salesforcemarketingcloud_read = glueContext.create_dynamic_frame.from_options( connection_type="salesforcemarketingcloud", connection_options={ "connectionName": "connectionName", "ENTITY_NAME": "ListSubscriber", "API_VERSION": "v1", "PARTITION_FIELD": "CreatedDate", "LOWER_BOUND": "2023-09-07T02:03:00.000Z", "UPPER_BOUND": "2024-05-07T02:03:00.000Z", "NUM_PARTITIONS": "10" } )