Transformer
In order to assist with the Data Integration (DI) efforts with 3rd party systems (ex: Prismic, GraphCMS, Strapi, etc), Boxalino is presenting the Data Transformer service https://boxalino-di-transformer-krceabfwya-ew.a.run.app/ . This is an ETL-like service.
Use this service to:
Identify the required request BODY for content integration Boxalino Transformer
Identify the required request BODY for API request https://boxalino-di-transformer-krceabfwya-ew.a.run.app/api/view
Identify if your project`s connector (headless CMS/BQ/etc) is supported. If not, please provide a service request.
This is service is currently expanding. We value our integrator`s feedback.
For further service requests and integration reviews, please get in touch with Boxalino.
INTEGRATION BENEFITS
When exporting other content to Boxalino ecosystem your project is opening up to further features:
Dynamic content ( top brands/categories/blogs, etc) as part of your API integration/layout
Mixed API response for search/listing (ex: blogs, promotions, campaigns alongside products)
Dynamic pages for your project content (ex: blog pages driven by the personalization/AI engine)
More personalized content to keep your customer`s engaged (as part of our omnichannel approach)
Relevant statistics for each of your content reach (performance impact)
A/B testing as to identify what content your customers have a higher response towards
INTEGRATION FLOW
Review the Transformer services:
is your connector type is not yet supported, please get in touch with Boxalino.
Use the Boxalino Transformer service to identify the body content requested for the API request.
Identify the content types (blog, banner, categories, etc) that must be integrated from your 3rd party source.
Prepare the connector options Transformer | CONNECTOR with content from your 3rd party system.
Do a test connector request Transformer | TEST REQUEST
Prepare the mapping Transformer | MAPPING for each content type you want to export.
Do a test sample request Transformer | REQUEST DEFINITION
8. Repeat step 6-7 until all desired content is part of the response.
8. Do the sync request Transformer | REQUEST DEFINITION
REQUEST DEFINITION
As an integrator, please create the bellow request to the provided endpoint.
1 | Endpoint | full data sync | |
---|---|---|---|
2 |
| test / stage | https://boxalino-di-transformer-stage-krceabfwya-ew.a.run.app |
3 | Action | /sync | |
4 | Method | POST | |
5 | Body | use the public endpoint | |
6 | Headers | Authorization | Basic base64<<DATASYNC API key : DATASYNC API Secret>> |
7 |
| Content-Type | application/json |
8 |
| client | account name |
9 |
| mode | data sync mode: F for full, D for delta |
10 |
| type | product, user, content, user_content, order. if left empty - it will check for all tables with the given tm |
11 |
| tm | (optional) time , in format: YmdHis technical: used to identify the documents version |
12 |
| ts | (optional) timestamp, must be millisecond based in UNIX timestamp |
13 |
| dev | (optional) use this to mark the content for the dev data index |
BODY ELEMENTS
The API SYNC request BODY structure can be accessed in the public service Boxalino Transformer
CONNECTOR
The connector properties are:
type (prismic, graphcms, strapi, gcs, plentymarket, sftp)
options (gets generated based on the selected connector type)
For example, bellow is a sample of the connector properties:
Prismic Connector Properties
GraphCMS Connector Properties
Strapi Connector Properties
MAPPING
The mapping elements depend on the document that requires to be synchronized in the Boxalino ecosystem. We expect our clients to work with headless CMS / 3rd party environments for their content sync.
The mapping exposes the Boxalino Data Structure for the requested document (ex: doc_content ).
For each property, as an integrator, you have to map the connector`s output path (wildcards [*] allowed):
a) for the properties returned as “string” or that have a single value: only one mapping is allowed (ex: description, link, images, title, short_description, etc)
(ex: "persona_id": "author.data.id", "persona_type": "author.data.attributes.email", "images": "image.data.attributes.url"
)
b) (if you intend to change the name of some attributes in the export) for the properties returned as "array" ([])
or as "objects" {}
, set a list with index property name (output)
=> mapping path (input)
:
the
output
is the explicit type (ex: for tags, the tagging source can be tags or default) or exposed property namethe
input
is the mapping logic (ex: all product IDs fromdata.product_ids[*].id
are set as product_ids in localized_numeric_attributes)
(ex: "numeric_attributes": { "place_id":"place.data.id"}
, "localized_string_attributes" : {"seo_meta_title": "seo.metaTitle","img_thumbnail":"image.data.attributes.formats.thumbnail.url"}
)
c) (if you do not want to change the property name in *_attributes mapping) set a list (as array []
) with mapping path (input)
(ex: "localized_string_attributes":{"menu_title":"data.menu_title"}
can be declared as "localized_string_attributes":["data.menu_title"]
)
d) there are a series of default mappings supported which do not have to be declared in your request
do a
test/sample
request without anymapping
declaration to identify the default mappingsIn the case of Prismic integrations, the following mappings are added by default:
b. In the case of GraphCMS integrations, the following mappings are added by default:
c. In the case of Strapi integrations, the following mappings are added by default:
e) export of properties as raw JSON - use the raw
node in the mapping
properties will be available as
bxraw_<property name>
this is useful for exporting headless CMS specific content types that would require specific rendering in your template (ex: slices, sections, etc)
it does not allow wildcards/paths (export the API response node as is)
f) export linked-content : either using the contents
property from the Data Structure or by exporting it as raw JSON
the mapping for
contents
is done in the following way:"contents":{"<source for input>":{"data-structure field":"CMS field"}}"
(ex: "contents": { "data.author_link": { "content_type": "type", "content_id": "id" }, "data.categories[*].category": {"content_type": "type", "content_id": "id" }}
will access the property type
& id
from the data.author_link
& from the data.categories[*].category
to create the Referenced Schema Types | CONTENT contents
data structure)
g) in order to establish in which languages the content is available, a “language status” property is added dynamically ( value 0/1 based on language)
it will take one of the following name
_bx_locale_status
Check bellow a sample for various integrations following the designed blog logic in our public repository:
Prismic Mapping Sample (doc_content)
GraphCMS Mapping Sample (doc_content)
Strapi Mapping Sample (doc_content)
The connector response returns the requested content (results) in the following:
LANGUAGES
This must be declared in order to map the exported language (ex: “de”) with your connector defined value (ex:”en-de”).
AVAILABLE SERVICES
In order to allow our integrators to validate that the existing data available in the 3rd party systems is properly exported, a few helper services are available:
TEST CONNECTOR REQUEST /test/connector
Use a simple TEST request in order to validate that the connection to your configured endpoint (connector property) is valid.
In the sample above, the following BODY is used:
TEST SAMPLE REQUEST /test/sample
You can also use the SAMPLE trigger in order to access one element of the requested types.
The JSON response will be the JSONL structure as it is exported to Boxalino GCS.
In the sample above, the following BODY is used: