AppāMaestra Customer Data Exchange
Before starting this section, make sure you received technical specification from your Maestra Forward Deployed Marketer that describes all required methods for your project.
Make sure these steps are completed successfully:
To send customer action data, you need to use API methods. The technical specification with methods configured for your project is provided by your Maestra marketer.
Mindbox SDK exposes two methods for invoking methods from a mobile app:
executeAsyncOperationfor sending dataexecuteSyncOperationfor retrieving data.
Use the OperationBodyRequest constructor to create the request body.
Technical Specification
This page provides examples of how to call the SDK API to send data.
Before sending data to Maestra, the required API methods must be configured. This configuration is done individually for each project.
Your Maestra marketer configures the required methods and documents them in a specification.
Below are examples of how some requests can be integrated from a mobile app.
Copying the code as-is will not result in a working integration. Please use the methods defined in your specification.
Examples of Sent Events
Authentication in the App
Mindbox.instance.executeAsyncOperation(
operationSystemName: "Mobile.CreateCustomer",
operationBody: {
"customer": {
"mobilePhone": "<mobilePhone>",
},
},
);Sending Product and Category View Events
Mindbox.instance.executeAsyncOperation(
operationSystemName: "CheckGuide.viewProduct",
operationBody: {
"product": {
"ids": {
"website": "<product ID in Website>",
},
},
},
);
Mindbox.instance.executeAsyncOperation(
operationSystemName: "CheckGuide.viewProduct",
operationBody: {
"viewProductCategory": {
"productCategory": {
"ids": {
"website": "<Product Category ID in Website>",
},
},
},
},
);Sending Product Add and Set List Events
To work with product lists, Maestra provides two approaches:
- adding or removing items one at a time;
- setting the entire list in a single request.
Common product lists include Cart and Favorites.
Mindbox.instance.executeAsyncOperation(
operationSystemName: "CheckGuide.addProductToCart",
operationBody: {
"addProductToList": {
"product": {
"ids": {
"website": "<Product ID in Website>",
},
},
"pricePerItem": "<Price per item>",
},
},
);
Mindbox.instance.executeAsyncOperation(
operationSystemName: "CheckGuide.addProductToCart",
operationBody: {
"productList": [
{
"product": {
"ids": {
"website": "<Product ID in Website>",
},
},
"count": "<Number of products>",
"priceOfLine": "<Price of line>",
},
],
},
);Checking a Customerās Segment
This request checks whether a customer belongs to a preconfigured segment in Maestra.
Mindbox.instance.executeSyncOperation(
operationSystemName: "CheckGuide.checkSegment",
operationBody: {},
onSuccess: (success) => print(success),
onError: (error) => print(error),
);Getting Personal Recommendations
This request returns a list of products selected for the customer based on one of the configured recommendation algorithms.
Mindbox.instance.executeSyncOperation(
operationSystemName: "CheckGuide.getReco",
operationBody: {
"recommendation": {
"limit": "3",
},
},
onSuccess: (success) => print(success),
onError: (error) => print(error),
);Updated 16 days ago

