Interaction APIs

MXOAction

Actions are the objects, or containers, that hold the messages, marketing content, agent scripts, app alerts, and so on that you want to present to visitors to customers to your Touchpoints. Actions are the things that MXO does in order to affect the customer's experience. MXO provides both online and offline Actions.

@interface MXOAction : NSObject
@property (nonatomic, copy, nullable, readonly) NSString *name;
@property (nonatomic, strong, nullable, readonly) MXOAsset *asset;
@property (nonatomic, strong, nullable, readonly) MXOProposition *proposition;
@end
PropertyTypeDescription
nameNSStringThe name of the Action.
assetMXOAssetThe Asset for this Action.
propositionMXOPropositionThe optional Proposition for this Action.
Note: For more information, see how to retrieve an Interaction response.

MXOAsset

Assets are the content, or bundles of content, that are delivered to the customer via an MXO Action. Assets can be graphics, HTML files, XML, text, or external Assets that are available for display.

@interface MXOAsset : NSObject
@property (nonatomic, copy, nullable, readonly) NSString *markup;
@property (nonatomic, strong, nullable, readonly) NSArray<MXOAssetResponse *> *responses;
@property (nonatomic, assign, readonly) MXOMimeType mimeType;
@property (nonatomic, strong, nullable, readonly) NSString *contentUrl;
@end
PropertyTypeDescription
markupNSStringThe language markup for presenting the Asset.
responsesNSArray<MXOAssetResponse *>The optional responses for informing MXO of a user Interaction with the Asset.
mimeTypeMXOMimeTypeThe markup language type.
contentUrlNSStringA remote location the Asset represents.
Note: For more information, see how to retrieve an Interaction response.

MXOAssetResponse

MXO Asset response for tracking.

@interface MXOAssetResponse : NSObject
@property (nonatomic, strong, nullable, readonly) MXOResponseCode *code;
@property (nonatomic, assign, readonly) MXOAssetResponseSentiment sentiment;
@property (nonatomic, strong, nullable, readonly) NSString *label;
@property (nonatomic, strong, nullable, readonly) NSString *imageUrl;
@property (nonatomic, strong, nullable, readonly) NSString *targetUrl;
@property (nonatomic, assign, readonly) MXOAssetResponseTarget target;
@end
PropertyTypeDescription
codeMXOResponseCodeThe code to send to MXO when an Asset is responded to.
sentimentMXOAssetResponseSentimentThe type of response to track.
labelNSStringThe label to show if desired.
imageUrlNSStringThe image to load if desired.
targetUrlNSStringThe target URL to load if desired.
targetMXOAssetResponseTargetThe location the sentiment should send the user.
Note: For more information, see how to retrieve an Interaction response.

MXOAssetResponseSentiment

This is how a user responded to an MXO Asset response.

typedef NS_ENUM(NSInteger, MXOAssetResponseSentiment) {
    	MXOAssetResponseSentimentPositive,
    	MXOAssetResponseSentimentNeutral,
    	MXOAssetResponseSentimentNegative,
    	MXOAssetResponseSentimentUnknown
};
EnumDescription
MXOAssetResponseSentimentPositiveThe positive tap on an Asset.
MXOAssetResponseSentimentNeutralThe Asset is dismissed or ignored.
MXOAssetResponseSentimentNegativeThe Asset is rejected.
MXOAssetResponseSentimentUnknownUnknown response.
Note: For more information, see how to retrieve an Interaction response.

MXOAssetResponseTarget

The location of an MXO Asset response.

typedef NS_ENUM(NSInteger, MXOAssetResponseTarget) {
	MXOAssetResponseTargetInApp,
    	MXOAssetResponseTargetExternal,
    	MXOAssetResponseTargetContext,
    	MXOAssetResponseTargetUnknown
};
EnumDescription
MXOAssetResponseTargetInAppThe Asset is targeted to the same app.
MXOAssetResponseTargetExternalThe Asset is targeted to an external URL.
MXOAssetResponseTargetContextThe Asset is targeted to an Action context.
MXOAssetResponseTargetUnknownUnknown response.
Note: For more information, see how to retrieve an Interaction response.

MXOCaptureActivityPoint

Capture user Activity when they interact with an MXO Interaction.

@interface MXOCaptureActivityPoint : NSObject
@property (nonatomic, copy, nullable, readonly) NSString *identifier;
@property (nonatomic, copy, nullable, readonly) NSString *path;
@end
PropertyTypeDescription
identifierNSStringThe internal MXO id of the point.
pathNSStringThe location of Activity to capture, such as a button click.
Note: For more information, see how to retrieve an Interaction response.

MXOCaptureAttributePoint

Capture user Attribute when they interact with an MXO Interaction.

@interface MXOCaptureAttributePoint : NSObject
@property (nonatomic, copy, nullable, readonly) NSString *identifier;
@property (nonatomic, copy, nullable, readonly) NSString *path;
@property (nonatomic, assign, readonly) MXOCaptureElementType elementType;
@property (nonatomic, copy, nullable, readonly) NSString *elementName;
@property (nonatomic, copy, nullable, readonly) NSString *elementAttributeName;
@property (nonatomic, readonly) NSInteger captureDelay;
@property (nonatomic, assign, readonly) MXOCaptureType captureType;
@property (nonatomic, assign, readonly) MXOCapturePhase capturePhase;
@end
PropertyTypeDescription
identifierNSStringThe internal MXO id of the point.
pathNSStringThe location of Attribute to capture, such as a button click.
elementTypeMXOCaptureElementTypeThe type of the element.
elementNameNSStringThe name of the element.
elementAttributeNameNSStringThe name of the element Attribute to capture.
captureDelayNSIntegerHow long to wait to capture the value.
captureTypeMXOCaptureTypeThe type of capture.
capturePhaseMXOCapturePhaseThe lifecycle time to capture the value.
Note: For more information, see how to retrieve an Interaction response.

MXOCaptureElementType

The type of an element.

typedef NS_ENUM(NSInteger, MXOCaptureElementType) {
    	MXOCaptureElementTypeTextField,
    	MXOCaptureElementTypeCheckboxRadio,
    	MXOCaptureElementTypeDisplayElem,
    	MXOCaptureElementTypeDropDown,
    	MXOCaptureElementTypeUnknown
};
EnumDescription
MXOCaptureElementTypeTextFieldInput value for the text or search field.
MXOCaptureElementTypeCheckboxRadioInput value for the selected checkbox/radio button.
MXOCaptureElementTypeDisplayElemDisplay value for the selected display element.
MXOCaptureElementTypeDropDownInput value for the selected dropdown list.
MXOCaptureElementTypeUnknownThe unknown Attribute capture element type.
Note: For more information, see how to retrieve an Interaction response.

MXOCapturePhase

The phase in which to capture an Attribute.

typedef NS_ENUM(NSInteger, MXOCapturePhase) {
    	MXOCapturePhaseLoad,
    	MXOCapturePhaseOnClick,
    	MXOCapturePhaseParameter,
    	MXOCapturePhaseUnknown
};
EnumDescription
MXOCapturePhaseLoadThe Attribute is captured whenever a page is loaded.
MXOCapturePhaseOnClickThe Attribute is captured once clicked or tapped.
MXOCapturePhaseParameterThe Attribute is captured for a query parameter.
MXOCapturePhaseUnknownThe unknown Attribute capture phase.
Note: For more information, see how to retrieve an Interaction response.

MXOCaptureType

The type of value to capture from an element.

typedef NS_ENUM(NSInteger, MXOCaptureType) {
    	MXOCaptureTypeAttribute,
    	MXOCaptureTypeText,
    	MXOCaptureTypeValue,
    	MXOCaptureTypeCookie,
    	MXOCaptureTypeUnknown,
};
EnumDescription
MXOCaptureTypeAttributeName of the Attribute.
MXOCaptureTypeTextCaptures a text.
MXOCaptureTypeValueCaptures a Boolean value.
MXOCaptureTypeCookieCaptures data from a cookie on the current page.
MXOCaptureTypeUnknownThe unknown Attribute capture type.
Note: For more information, see how to retrieve an Interaction response.

MXOInteraction

Interactions are the key elements of the customer experience, representing the ongoing conversation between your customer and your organization at any of your Touchpoints. Interaction Points let you to capture customer Activity, capture customer input, and return optimized content to your customer during those interactions.

In a mobile app, an Interaction Point represents an individual screen or context.

@interface MXOInteraction : NSObject
@property (atomic, strong, readonly, nullable) NSURL *value;
@end
PropertyTypeDescription
valueNSURLThe UIR representation of the Interaction.
Note: For more information, see how to retrieve an Interaction response.

MXOIntractionRequest

The Interaction request object for sending interaction data from the MXO SDK.

@interface MXOInteractionRequest : MXORequest
@property (nonatomic, strong, readonly, nullable) MXOInteraction *interaction;
@property (nonatomic, strong, readonly, nullable) NSDictionary<NSString *, NSString *> *properties;
@property (nonatomic, copy, readonly, nullable) MXORequestOnErrorBlock onError;
@property (nonatomic, copy, readonly, nullable) MXORequestOnSuccessBlock onSuccess;
@end
PropertyTypeDescription
interactionMXOInteractionThe Interaction to be sent to MXO.
propertiesNSDictionary<NSString *, NSString *>Properties map to be sent with the Interaction.
onErrorMXORequestOnErrorBlockProvide an MXO Error handler.
onSuccessMXORequestOnSuccessBlockProvide an MXO Interaction response.

Create an instance using the Builder as shown below:

MXOInteractionRequest *interactionRequest = [MXOInteractionRequest initWithBuilder:^(MXOInteractionRequestBuilder * _Nonnull builder) {
	builder.interaction = [MXOInteraction initWithString:@"/" error:&error];
	builder.properties = @{@"name": @"value"};
	builder.onError = ^(NSError *error) {
		// process error
	}
        builder.onSuccess = ^(MXOInteractionResponse *response) {
		// process response
	}
}];
sendinteraction
Note: For more information, see how to retrieve an Interaction response.

MXOIntractionResponse

MXO Interaction response data.

@interface MXOInteractionResponse : NSObject
@property (nonatomic, strong, nullable, readonly) MXOInteraction *interaction;
@property (nonatomic, copy, nullable, readonly) NSString *tid;
@property (nonatomic, strong, nullable, readonly) NSArray<MXOOptimizationPoint *> *optimizationPoints;
@property (nonatomic, strong, nullable, readonly) NSArray<MXOCaptureAttributePoint *> *captureAttributePoints;
@property (nonatomic, strong, nullable, readonly) NSArray<MXOCaptureActivityPoint *> *captureActivityPoints;
@end
PropertyTypeDescription
interactionMXOInteractionThe interaction this response is for.
tidNSStringThe unique id for this user's interaction.
optimizationPointsNSArray<MXOOptimizationPoint *>The MXO Interaction Response for Optimization Points.
captureActivityPointsNSArray<MXOCaptureActivityPoint *>The MXO Interaction Response for Activity Points.
captureAttributePointsNSArray<MXOCaptureAttributePoint *>The MXO Interaction Response for Attribute Points.
Note: For more information, see how to retrieve an Interaction response.

MXOMimeType

Possible types of MXO Assets.

typedef NS_ENUM(NSInteger, MXOMimeType) {
    	MXOMimeTypeJSON,
    	MXOMimeTypeTXT,
    	MXOMimeTypeHTML,
    	MXOMimeTypeXML,
    	MXOMimeTypeExternal,
    	MXOMimeTypeUnknown
};
EnumDescription
MXOMimeTypeJSONThe Asset of a json type.
MXOMimeTypeTXTThe Asset of a text type.
MXOMimeTypeHTMLThe Asset of a html type.
MXOMimeTypeXMLThe Asset of a xml type.
MXOMimeTypeExternalThe Asset of a external type.
MXOMimeTypeUnknownUnknown Asset type.
Note: For more information, see how to retrieve an Interaction response.

MXOOptimizationPoint

MXO Interaction response data.

@interface MXOOptimizationPoint : NSObject
@property (nonatomic, copy, nullable, readonly) NSString *path;
@property (nonatomic, strong, nullable, readonly) NSArray<MXOAction *> *actions;
@property (nonatomic, assign, readonly) MXOOptimizationPointDirectives directives;
@end
PropertyTypeDescription
pathNSStringThe location to optimize.
actionsNSArray<MXOAction *>The set of MXO Actions available to take for the Optimization.
directivesMXOOptimizationPointDirectivesThe position of the Optimization.
Note: For more information, see how to retrieve an Interaction response.

MXOOptimizationPointDirectives

The position to place an Optimization.

typedef NS_ENUM(NSInteger, MXOOptimizationPointDirectives) {
    	MXOOptimizationPointDirectiveReplace,
    	MXOOptimizationPointDirectiveBefore,
    	MXOOptimizationPointDirectiveAfter,
    	MXOOptimizationPointDirectiveUnknown
};
EnumDescription
MXOOptimizationPointDirectiveReplaceThe Asset replaces the content area.
MXOOptimizationPointDirectiveBeforeThe Asset is inserted before the content area.
MXOOptimizationPointDirectiveAfterThe Asset is inserted after the content area.
MXOOptimizationPointDirectiveUnknownThe unknown directives for the Asset.
Note: For more information, see how to retrieve an Interaction response.

MXOProposition

Propositions are the products or services that you want to promote to customers. For example, a 0% balance transfer offer on credit cards.

Use Propositions to set up the long-term and short-term campaigns, offers, invitations, and parent-child hierarchies to use for your marketing initiatives.

@interface MXOProposition : NSObject
@property (nonatomic, copy, nullable, readonly) NSString *name;
@property (nonatomic, copy, nullable, readonly) NSString *code;
@property (nonatomic, assign, readonly) MXOPropositionType type;
@end
PropertyTypeDescription
nameNSStringThe proposition name.
codeNSStringThe business code associated with the proposition.
typeMXOPropositionTypeThe type of proposition.
Note: For more information, see how to retrieve an Interaction response.

MXOPropositionType

The type of a proposition.

Products are typically items you can see and touch, such as computers, cars (or any of the parts of a car), credit cards, car insurance, mobile phones, and so on.

Services are typically provided for you by other people, such as customer service, support, and so on.

Products and services can have parent-child relationships. For example, a product such as a credit card might have other products nested below it, such as different credit card types like platinum, gold, silver, and prepaid.

typedef NS_ENUM(NSInteger, MXOPropositionType) {
    	MXOPropositionTypeProduct,
    	MXOPropositionTypeService
};
EnumDescription
MXOPropositionTypeProductThe product Proposition.
MXOPropositionTypeServiceThe service Proposition.
Note: For more information, see how to retrieve an Interaction response.

MXORequestOnErrorBlock

The MXO request sent on error.

typedef void (^MXORequestOnErrorBlock)(
	NSError *error
);
PropertyTypeDescription
errorNSErrorUsed to handle errors.
Note: For more information, see how to retrieve an Interaction response.

MXORequestOnSuccessBlock

The MXO request sent on success.

typedef void (^MXORequestOnSuccessBlock)(
	MXOInteractionResponse *response
);
PropertyTypeDescription
responseMXOInteractionResponseThe response for the Interaction.
Note: For more information, see how to retrieve an Interaction response.

MXOResponseCode

The response code object containing the response code value. This is used as part of the MXOResponseCodeRequest object. Response code values is sent to the MXO API as a property value.

@interface MXOResponseCode : NSObject
@property (nonatomic, copy, nullable) NSString *value;
@end
PropertyTypeDescription
valueNSStringThe response code string value.
Note: For more information, see how to send a response code.

MXOResponseCodeRequest

The response code request object for sending the response code to the MXO SDK.

@interface MXOResponseCodeRequest : MXORequest
@property (nonatomic, strong, readonly, nullable) MXOInteraction *interaction;
@property (nonatomic, strong, readonly, nullable) MXOResponseCode *responseCode;
@property (nonatomic, copy, readonly, nullable) MXORequestOnErrorBlock onError;
@property (nonatomic, copy, readonly, nullable) MXORequestOnSuccessBlock onSuccess;
@end
PropertyTypeDescription
interactionMXOInteractionThe URI value containing the Interaction path.
responseCodeMXOResponseCodeResponse code object containing the response code value.
onErrorMXORequestOnErrorBlockProvide an MXO error handler.
onSuccesMXORequestOnSuccessBlockProvide an MXO Interaction response.

Create an instance using the Builder as shown below:

MXOResponseCodeRequest *request = [MXOResponseCodeRequest initWithBuilder:^(MXOResponseCodeRequestBuilder * _Nonnull builder) {
        builder.interaction = [MXOInteraction initWithString:@"/" error:&error];
        builder.responseCode = [MXOResponseCode initWithResponseCode:responseCode error:nil];
        builder.onError = ^(NSError *error) {
		// process error
	}
       	builder.onSuccess = ^(MXOInteractionResponse *response) {
		// process response
	}
}];
Note: For more information, see how to send a response code.