BEES Micro Services - general information
Description
BEES has data and business microservices. For each entity, the following steps are performed:
Generic Relay: receives data from ERP Adapter in batches, returns status 202 accepted and sends it to a queue (The zone will call one generic endpoint for all entities)
ETL Consumer: reads message from the queue, extracts, validates contracts, and transforms the data respecting BEES structure, then sends it to the Value Stream Relay or Queue.
Feedback Layer / Monitoring: Provides visibility of integrations status and errors.
Value Stream Relay: receives data from ETL Consumer in batches and sends it to an internal queue.
Value Stream Consumer: reads message from internal queues and processes to be inserted or updated in database.
API: process data receive (POST/PUT/DELETE) and retrieves data (GET).
For more details in a specific entity check the document referenced to it. This document aims to show the generic workflow and functionality for the great majority of the micro services built in this platform.
Data Ingestion Context
Integration Overview
Architecture Overview
Request Header attributes
In the table below, you will find all the request headers used in a generic way by internal BEES services. Analyze which cases apply to your scenario. If you have any questions, contact your ZSM or Professional Services team (Marketplace).
Header Requirements for MLP
Below are the rules related to the necessary headers to ensure the MLP when sending messages through BEES Sync. These rules specify the details of message forwarding as well as the essential attributes that must be included in the headers to ensure proper and personalized delivery to the end recipients.
Entity Name: REWARDS-CHALLENGES-BY-ACCOUNTS
Rule Description Detail: BEES Sync will forward message to VS Team and MLP Team simultaneously. MLP will NOT forward the message to VS Team only BEES Sync.
Header name: x-mlp-opt-in
Header value: TRUE
Header name: x-mlp-personalize
Header value: FALSE/EMPTY
Entity Name: REWARDS-CHALLENGES
Rule Description Detail: BEES Sync will forward message to VS Team and MLP Team simultaneously. MLP will NOT forward the message to VS Team only BEES Sync.
Header name: x-mlp-opt-in
Header value: TRUE
Header name: x-mlp-personalize
Header value: FALSE/EMPTY
Entity Name: PROMOTIONS
Rule Description Detail: BEES Sync will forward message to VS Team and MLP Team simultaneously. MLP will NOT forward the message to VS Team only BEES Sync.:
Header name: x-mlp-opt-in
Header value: TRUE
Header name: x-mlp-personalize
Header value: FALSE/EMPTY
Entity Name: PROMOTIONS - México, Colombia, Peru, Equador, Brazil
Rule Description Detail: BEES Sync will receive message from two different sources ERP and MAZ-MLP where:
MAZ-MLP must send Header name: x-mlp-opt-in
Header value: TRUE
MLP should NOT forward message to VS side.
Entity Name: GROW-LOCAL-MISSION
Rule Description Detail: BEES Sync will forward message to VS Team and MLP Team simultaneously. MLP will NOT forward the message to VS Team only BEES Sync.
Header name: x-mlp-opt-in
Header value: TRUE
Header name: x-mlp-personalize
Header value: FALSE/EMPTY
Entity Name: DIGI_COMMS_PRIORITY
Rule Description Detail: BEES Sync will forward message to VS Team and MLP Team simultaneously. MLP will NOT forward the message to VS Team only BEES Sync.
Header name: x-mlp-opt-in
Header value: TRUE
Header name: x-mlp-personalize
Header value: FALSE/EMPTY
Entity Name: DATA_PORTFOLIO_MODEL
Rule Description Detail: BEES Sync will forward message only to MLP Team and MLP Team will forward the message to VS Team.
Header name: x-mlp-opt-in
Header value: TRUE
Header name: x-mlp-personalize
Header value: TRUE
Entity Name: DATA_RECOMMENDATION
Rule Description Detail: BEES Sync will forward message only to MLP Team and MLP Team will forward the message to VS Team.
Header name: x-mlp-opt-in
Header value: TRUE
Header name: x-mlp-personalize
Header value: TRUE
URLs for interacting with the BEES Sync Generic Relay
Global
dev: https://services-dev.bees-platform.dev/api/v1/data-ingestion-relay-service/v1sit: https://services-sit.bees-platform.dev/api/v1/data-ingestion-relay-service/v1
uat: https://services-uat.bees-platform.dev/api/v1/data-ingestion-relay-service/v1
prod: https://services.bees-platform.com/api/v1/data-ingestion-relay-service/v1
Europe
uat: https://services.eu.uat.restricted.mybees-platform.dev/api/v1/data-ingestion-relay-service/v1
prod: https://services.eu.mybees-platform.com/api/v1/data-ingestion-relay-service/v1
DTC
IMPORTANT: Integration Best Practices
BEES Sync is indicated for Mass Data Ingestion in JSON format only. Other use-cases are not optimal.
Regardless of the robust infrastructure that the BEES platform has, all integrators are heavily encouraged to limit the size of payload in 1 Mb per request for performance reasons.
Messages may be consumed slightly out of the original order, so: Do NOT send POST/PUT requests close to DELETE requests for the SAME ENTITY AND ID. This may result in inconsistent data!
It is wise to keep the requestTraceId header saved with as much useful metadata as you can on some persistent store on the integrator side. When troubleshooting, your technical adapter team can check the flow for the same request together with the BEES Team better this way.
If sourcing data from an ERP or other large data-store, please ensure only items relevant to BEES are sent. For example, do not send ITEMS that will not be sold through BEES. This increases costs and complicates troubleshooting for both parties.
Whenever possible, prefer Delta (On-Change) integrations instead of Full Load integrations. For example, prefer sending items to BEES when they are changed inside the ERP, instead of sending every item of the ERP to BEES every day.