mParticle Integration (Implementation)

This article will assist with the implementation of the mParticle Integration.

Summary

The mParticle integration is an API integration built to support a data flow of member and guest details and sales data between Redcat and mParticle systems.

 

The Product Overview article for mParticle Integration is here



Prerequisites

To utilise the mParticle Integration, the following versions are required.


Polygon Central: 2.0.380 or later




Provisioning

A provisioning request will need to be lodged for the development team to cover.

  • Setup of AWS message queue (SQS) and Celery server for the client (if not already provisioned).

  • Supply of the following fields to complete configuration settings:
    - SQS Endpoint (with Auth)
    - SQS FIFO Queue Name
    - SQS FIFO Exchange Name
    - SQS Region
    - SQS Polling Interval

 

Obtaining Configuration Details from the Client

The client will need to provide the following information before the integration can be configured in Polygon Central.

This data will be obtained from mParticle, or from within their mParticle Dashboard.

  • mParticle API Key
  • mParticle Secret
  • mParticle Delete API Key
  • mParticle Delete Secret
  • mParticle Purchase API Key
    (optional, only needed if a unique key is required for purchase events)
  • mParticle Purchase Secret
    (optional, only needed if a unique secret is required for purchase events)
  • mParticle Plan Name 


Polygon Central Configuration

Configuration is required in Polygon Central to enable the mParticle integration.

To do this:

  • Login to Polygon Central
  • Choose Configuration | Integrations | mParticle from the menu.

mParticle ID and Endpoints

Complete the following fields.

Enable Integration
No data will be passed by the integration unless this option is on.

Client Name Identifier
Enter the client's name. This field is not currently in active use but may be utilised in the future to identify calls if a client requires a deviation from the standard integration. 

Client Country Code
Entry must be either AU or NZ.

Client Currency Code
Entry must be either AUD or NZD

mParticle API Key
Enter the API key supplied by the client

mParticle Secret
Enter the API secret supplied by the client

mParticle Delete API Key
Enter the Delete API key supplied by the client

mParticle Delete Secret
Enter the Delete secret supplied by the client

mParticle Purchase API Key
Enter the Purchase API key if one has been supplied by the client.  This field is optional, if the client does not require a unique purchase API key/secret leave this field BLANK.  Purchases will be passed using the API key listed above.

mParticle Purchase Secret 
Enter the Purchase API secret if one has been supplied by the client.  This field is optional, if the client does not require a unique purchase API key/secret leave this field BLANK.  Purchases will be passed using the API secret listed above.

mParticle Event Endpoint
Enter https://s2s.au1.mparticle.com/v2/events.  This is a global endpoint for all mParticle integrations.

mParticle Delete Endpoint
Enter https://opendsr.mparticle.com/v3/requests/. This is a global endpoint for all mParticle integrations.

mParticle Plan Number
This field is left BLANK for production environments.  During testing it can be used to specify the mParticle data plan in use.

mParticle Plan Name
Enter the plan name as supplied by the client.

mParticle Environment
Entry must be either Development or Production.  Development would be used only during testing.

Exponential Backoff Retries List
The recommended setting is [1,3,5].  This is a list of numbers that represent seconds to wait when retrying an API call.  [1,3,5] indicates a wait of 1 second before retrying if the 1st call fails, if the 2nd call fails it will wait 3 seconds before retrying and finally a wait time of 5 seconds before retrying if the 3rd call fails. 

Blacklisted Classes
Enter the RECID of any PLU Class that you want to be excluded from the packet to mParticle. Usually, system Sale Type Headers would be excluded and perhaps instructional PLUs.

These should be entered within square brackets [ ] encased by single quote marks (‘ ‘) and separated by commas (,). For example [ ‘-1', '16', '28'].

The PLU Class RECIDs can be obtained from tbl_pluclasses using the following statement:

select * from tbl_pluclasses

Include Discounts in PLU Class - System
Discounts, including POS discounts and coupon redemptions, are reported against PLU 3 which falls into the System class (-1).  If the system class is blacklisted above, discounts will still be passed in the API calls unless this option is selected.  If you want discounts excluded from the data passed to mParticle this option must be on.

Include Surcharges in PLU Class - System
Surcharges, including Delivery Fees, Service Fees and Holiday Surcharges, are reported against PLU 4 which falls into the System class (-1).  If the system class is blacklisted above, surcharges will still be passed in the API calls unless this option is selected.  If you want surcharges excluded from the data passed to mParticle this option must be on.

mParticle Queue

Use the data supplied by the development team during the provisioning process to complete these fields.

  • SQS Endpoint (with Auth)
  • SQS FIFO Queue Name
  • SQS FIFO Exchange Name
  • SQS Region
  • SQS Polling Interval

mParticle Events Control

The following settings will allow you to enable/disable specific events in the integration. 

Enable the event(s) by ensuring that the settings are ticked on.

Disable the event(s) by removing the tick.

  • Member Online and Instore Reporting (purchase event)
  • Guest Online Ordering (purchase event)
  • Coupon Redemption (coupon_redemption event)
  • Member Registration (member_registration_completed event)
  • Member Verification (member_registration_verification event)
  • Member Account Updates (member_update event)
  • Member Delete (member_delete request event) [must also have Member Account Updates]
  • Delivery Picked Up Status (delivery_order_picked_up event)
  • Delivery Approaching Status (delivery_order_approaching event)
  • Delivery Delivered Status (delivery_order_delivered event)


 

 

 

Article Change Log

Date Record of Changes Author

April 2023

First publication of this article.

STB