Eloqua markup language version 3

Important: This topic discusses Eloqua markup language v3. Learn more about Eloqua markup language v2.

Eloqua markup language (EML) is a text-based language used to access and provide a consistent view of Eloqua data.

EML uses text to identify fields and data relationships for data-centric entities. This way, you can easily describe and access the field values, entity attributes and relations that are important to you, using intuitive language.

Available entities

EML allows you to access Contact, Account, Custom object, Event, Campaign response, and Opportunity data within your Eloqua database. You can also access related assets, providing the relationship resolves to a single entity.

Access patterns

The general access format is {{EntityName.InfoYouWant}}), where InfoYouWant is a field name or attribute. The syntax varies slightly between those two types of data: for named fields, the syntax is {{EntityName.Field(FieldName)}}, while for attributes, the syntax is {{EntityName.AttributeName}}.

EML also uses dot notation to connect related assets, in the form {{EntityName.RelatedAssetName.InfoYouWant}}.

There are some syntax requirements to bear in mind:

  • The system resolves all statements enclosed in {{ and }} if it can parse them. You must put statements that require resolution between double braces.
  • To access attributes, use brackets [ ] to delimit the requested attribute. To access fields, use parentheses ( ) to delimit the named field.
  • When specifying a field or asset using elm, you must refer to the internal name, rather than the display name. the display name is the name that appears in the eloqua ui, while the internal name is the identifier used by the system. the contact entity's email address field, for example, has the display name: "email address" and the internal name "c_emailaddress". see Field names for more information.

You can only access a related asset that resolves to a single record. For instance, since a Contact is associated with at most one Account, you can retrieve a Contact's related Account information. Conversely, since Accounts are linked to many Contacts, you cannot retrieve related Contact information for an Account.

Syntax examples

These examples use a fictional contact called Bob Smith throughout. Bob's contact information resembles the following:

Screenshot from Eloqua UI showing Edit Contact screen

Field values

To access field values, the format is {{Type.Field(fieldName)}} . For instance, to access the C_FirstName field in a Contact, the markup would resemble:

{{Contact.Field(C_FirstName)}}

For contact Bob Smith, the definition resolves to Bob.

Entity attributes

You can also access an entity's attributes. The definition is extremely similar to the markup for accessing entity fields. To access a contact's Id, the internal contact identifier that Eloqua generates and stores when you add a new contact, you would input:

{{Contact.Id}}

For Bob Smith, whose internal contact identifier is 123456, {{Contact.Id}} resolves to 123456.

Changes in version 3

Eloqua markup language v3 builds on the previous version of EML to simplify and streamline the ways you describe and access data within Eloqua. EML v3 adds support for:

  • Accessing visitor information for activities coming in from the web. For example, when someone opens an email sent through Eloqua.
  • Discovering lead scoring models and fields.
  • Including lead scoring fields in a contact export definition, and filtering on lead scoring field values.
  • Discovering events and event fields.
  • Exporting event registrants.
  • Importing event registrants.
  • Including contact fields in an activity export definition.
  • Discovering campaign response fields.
  • Exporting and importing campaign responses.
  • Discovering opportunity fields.
  • Importing opportunities.
  • Including campaign fields in an activity export definition.
  • Including user fields in an activity export definition.
  • Discovering campaign fields.
  • Including campaign fields in a campaign response export definition.

Grammar

grammar Eml;  

options {  
    language = CSharp3; 
    output = AST;
    backtrack = true;
}  

tokens {
    CUSTOMOBJECT_NAME;
    CUSTOMOBJECT_INDEX;
    FIELD_NAME;
    FIELD_INDEX;
    ACTIVITY_TYPE_ATTRIBUTE;
    ASSET_TYPE_ATTRIBUTE;
    ASSET_NAME_ATTRIBUTE;
    ASSET_ID_ATTRIBUTE;
    CAMPAIGN_ID_ATTRIBUTE;
    VISITOR_ID_ATTRIBUTE;
    VISITOR_EXTERNAL_ID_ATTRIBUTE;
    USER_ID_ATTRIBUTE;
}

@modifier{public} 
@parser::namespace { Eloqua.Markup.Version3.Grammar } 
@lexer::namespace { Eloqua.Markup.Version3.Grammar }

public dynamicEntity
    : DYNAMICSTART! (dataEntity | assetEntity) DYNAMICEND!
    ;

assetEntity
	: contactContainerAsset
	| emailGroupAsset
	| accountContainerAsset
	| cloudInstanceAsset
	| emailAddressAsset
	;

contactContainerAsset
	: CONTACTLIST INDEXED_ID
	| CONTACTFILTER INDEXED_ID
	| CONTACTSEGMENT INDEXED_ID
	;

emailAddressAsset
	: GLOBALSUBSCRIBE
	;

emailGroupAsset
	: EMAILGROUP INDEXED_ID
	| EMAIL INDEXED_ID DOT! GROUP
	;

accountContainerAsset
	: ACCOUNTLIST INDEXED_ID
	;

cloudInstanceAsset
	: CONTENTINSTANCE NAMED_ID (DOT! execution)?
	| ACTIONINSTANCE NAMED_ID (DOT! execution)?
	| DECISIONINSTANCE NAMED_ID (DOT! execution)?
	| FEEDERINSTANCE NAMED_ID
	;

dataEntity
	: relationshipToContact DOT! contactAttribute
    | relationshipToContact DOT! LEADSCORE DOT leadScoreModel DOT! leadScoreModelAttribute
    | relationshipToAccount DOT! accountAttribute 
    | relationshipToCustomObject DOT! customObjectAttribute
    | relationshipToEvent DOT! eventAttribute
    | relationshipToActivity DOT! activityAttribute
    | relationshipToEmailAddress DOT! emailAddressAttribute
    | relationshipToCampaignResponse DOT! campaignResponseAttribute
    | relationshipToCampaign DOT! campaignAttribute
    | relationshipToUser DOT! userAttribute
    | opportunity DOT! opportunityAttribute
 ;

relationshipToContact
    : CONTACT
    | customObject DOT! CONTACT
    | event DOT! CONTACT
    | ACTIVITY DOT! CONTACT
    | CAMPAIGNRESPONSE DOT! CONTACT
    | opportunity DOT! CONTACT
    ;
    
relationshipToAccount
    : ACCOUNT
    | CONTACT DOT! ACCOUNT
    | customObject DOT! ACCOUNT
    | event DOT! ACCOUNT
    | opportunity DOT! ACCOUNT
    ;

relationshipToCustomObject
    : customObject
    ;
    
 relationshipToEvent
    : event
    ;

relationshipToActivity
    : ACTIVITY
	;
	
relationshipToEmailAddress
    	:	EMAILADDRESS
    	;
    	
relationshipToCampaignResponse
    : CAMPAIGNRESPONSE
    ;
    
relationshipToCampaign
    : CAMPAIGNRESPONSE DOT! CAMPAIGN
    | ACTIVITY DOT! CAMPAIGN
    ;
    
relationshipToUser
    	:	ACTIVITY DOT! USER
    	;
    
contactAttribute
    : field
    | ID_ATTRIBUTE
    | CREATEDAT_ATTRIBUTE
    | UPDATEDAT_ATTRIBUTE
    | EMAIL! DOT! (
        | EMAIL_ISSUBSCRIBED_ATTRIBUTE
        | EMAIL_ISBOUNCED_ATTRIBUTE
        | EMAIL_FORMAT_ATTRIBUTE
    )
    ;

opportunityAttribute
    	: field
    	| ID_ATTRIBUTE
    	| CREATEDAT_ATTRIBUTE
   	| UPDATEDAT_ATTRIBUTE
   	;

accountAttribute
    : field
    | ID_ATTRIBUTE
    | CREATEDAT_ATTRIBUTE
    | UPDATEDAT_ATTRIBUTE
    ;

customObjectAttribute
    : field
    | ID_ATTRIBUTE
    | EXTERNAL_ID_ATTRIBUTE
    | CREATEDAT_ATTRIBUTE
    | UPDATEDAT_ATTRIBUTE
    ;
    
eventAttribute
    : field
    | ID_ATTRIBUTE
    | EXTERNAL_ID_ATTRIBUTE
    | CREATEDAT_ATTRIBUTE
    | UPDATEDAT_ATTRIBUTE
    ;

leadScoreModelAttribute
    : RATING
    | PROFILESCORE
    | ENGAGEMENTSCORE	
    ;
    
activityAttribute
    : field
    | ID_ATTRIBUTE
    | EXTERNAL_ID_ATTRIBUTE
	| TYPE_ATTRIBUTE -> ACTIVITY_TYPE_ATTRIBUTE
	| CREATEDAT_ATTRIBUTE
	| CAMPAIGN DOT ID_ATTRIBUTE -> CAMPAIGN_ID_ATTRIBUTE
	| VISITOR DOT (
	    | ID_ATTRIBUTE -> VISITOR_ID_ATTRIBUTE
		| EXTERNAL_ID_ATTRIBUTE -> VISITOR_EXTERNAL_ID_ATTRIBUTE
	)
	| USER DOT ID_ATTRIBUTE -> USER_ID_ATTRIBUTE
    | ASSET DOT (
        | TYPE_ATTRIBUTE -> ASSET_TYPE_ATTRIBUTE
        | NAME_ATTRIBUTE -> ASSET_NAME_ATTRIBUTE
        | ID_ATTRIBUTE -> ASSET_ID_ATTRIBUTE
    );
    
emailAddressAttribute
    : field
    | ID_ATTRIBUTE
    | CREATEDAT_ATTRIBUTE
    | UPDATEDAT_ATTRIBUTE
    ;
    
campaignResponseAttribute
    : field
    | ID_ATTRIBUTE
    | CREATEDAT_ATTRIBUTE
    ;
    
campaignAttribute
    : field
    | ID_ATTRIBUTE
    ;
    
userAttribute
    : field
    | ID_ATTRIBUTE
    ;

execution
    : EXECUTION INDEXED_ID
	;

field
    : FIELD (
		  NAMED_ID -> FIELD_NAME NAMED_ID
		| INDEXED_ID -> FIELD_INDEX INDEXED_ID
	);

customObject
    : CUSTOMOBJECT (
          NAMED_ID -> CUSTOMOBJECT_NAME NAMED_ID
        | INDEXED_ID -> CUSTOMOBJECT_INDEX INDEXED_ID
    );
    
event
    : EVENT INDEXED_ID 
    ;  

leadScoreModel
    : LEADSCOREMODEL INDEXED_ID
    ;

opportunity
    : OPPORTUNITY
    ;
    
// Lexer tokens
DYNAMICSTART : '{{' ;
DYNAMICEND   : '}}' ;
DOT          : '.'  ;

// roots
CONTACT                      : 'Contact';
ACCOUNT                      : 'Account';
CUSTOMOBJECT                 : 'CustomObject';
EVENT			     : 'Event';
OPPORTUNITY	             : 'Opportunity';
ACTIVITY                     : 'Activity';
CONTACTLIST                  : 'ContactList';
CONTACTFILTER                : 'ContactFilter';
CONTACTSEGMENT               : 'ContactSegment';
ACCOUNTLIST                  : 'AccountList';
EMAIL                        : 'Email';
EMAILGROUP                   : 'EmailGroup';
CONTENTINSTANCE              : 'ContentInstance';
ACTIONINSTANCE               : 'ActionInstance';
DECISIONINSTANCE             : 'DecisionInstance';
FEEDERINSTANCE               : 'FeederInstance';
GLOBALSUBSCRIBE              : 'GlobalSubscribe';
EMAILADDRESS                 : 'EmailAddress';
LEADSCORE                    : 'LeadScore';	
LEADSCOREMODEL		     : 'Model';
CAMPAIGNRESPONSE             : 'CampaignResponse';

// attributes
GROUP                        : 'Group';
CAMPAIGN                     : 'Campaign';
FIELD                        : 'Field';
ASSET                        : 'Asset';
VISITOR                      : 'Visitor';
ID_ATTRIBUTE                 : 'Id';
EXTERNAL_ID_ATTRIBUTE        : 'ExternalId';
EMAIL_ISSUBSCRIBED_ATTRIBUTE : 'IsSubscribed';
EMAIL_ISBOUNCED_ATTRIBUTE    : 'IsBounced';
EMAIL_FORMAT_ATTRIBUTE       : 'Format';
TYPE_ATTRIBUTE               : 'Type';
NAME_ATTRIBUTE               : 'Name';
CREATEDAT_ATTRIBUTE          : 'CreatedAt';
UPDATEDAT_ATTRIBUTE          : 'UpdatedAt';
EXECUTION                    : 'Execution';
RATING			     : 'Rating';
PROFILESCORE	             : 'ProfileScore';
ENGAGEMENTSCORE              : 'EngagementScore';
USER                         : 'User';


NAMED_ID : '(' ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|' ')+ ')';
INDEXED_ID : '[' ('1'..'9') ('0'..'9')* ']';

Learn more

Eloqua expression language