Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In order to assist with the Data Integration (DI) efforts with 3rd party systems (ex: graphQL, Prismic, GraphCMS, BigQuery, PlentyMarkets, GCS, Contentful, etc), Boxalino is presenting the Data Transformer service https://boxalino-di-transformer-krceabfwya-ew.a.run.app/

Use this service to:

  1. Identify the required request BODY for content integration https://boxalino-di-transformer-krceabfwya-ew.a.run.app/transformer/view

  2. Identify the required request BODY for API request https://boxalino-di-transformer-krceabfwya-ew.a.run.app/api/view

  3. Identify if your project`s connector (headless CMS/BQ/etc) is supported. If not, please provide a service request.

Tip

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.

...

When exporting other content to Boxalino ecosystem your project is opening up to further features:

  1. Dynamic content ( top brands/categories/blogs, etc) as part of your API integration/layout

    Image Modified

  2. Mixed API response for search/listing (ex: blogs, promotions, campaigns alongside products)

    Image Modified

  3. Dynamic pages for your project content (ex: blog pages driven by the personalization/AI engine)

    Image Modified

  4. More personalized content to keep your customer`s engaged (as part of our omnichannel approach)

    Image Modified

  5. Relevant statistics for each of your content reach (performance impact)

  6. A/B testing as to identify what content your customers have a higher response towards

INTEGRATION FLOW

  1. Review the Transformer services:

    1. is your connector type is not yet supported, please get in touch with Boxalino.

  2. Use the https://boxalino-di-transformer-krceabfwya-ew.a.run.app/transformer/view service to identify the body content requested for the API request.

  3. Identify the content types (blog, banner, categories, etc) that must be integrated from your 3rd party source.

  4. Prepare the connector options https://boxalino.atlassian.net/wiki/spaces/BPKB/pages/662536193/Transformer#CONNECTOR with content from your 3rd party system.

  5. Do a test request https://boxalino.atlassian.net/wiki/spaces/BPKB/pages/662536193/Transformer#TEST-REQUEST

  6. Prepare the mappinghttps://boxalino.atlassian.net/wiki/spaces/BPKB/pages/662536193/Transformer#MAPPING for each content type you want to export.

  7. Do a sample request https://boxalino.atlassian.net/wiki/spaces/BPKB/pages/662536193/Transformer#REQUEST-DEFINITION

8. Repeat step 6-7 until all desired content is part of the response.

...

Endpoint

full data sync

https://boxalino-di-transformer-krceabfwya-ew.a.run.app

1

 

delta data sync

TBC

2

 

instant data sync

TBC

3

Action

/sync

4

Method

POST

5

Body

use the public endpoint
https://boxalino-di-transformer-krceabfwya-ew.a.run.app/transformer/view
to check the required BODY structure for your integration use-case (it depends on the content type and connector type)

6

Headers

Authorization

Basic base64<<DATASYNC API key : DATASYNC API Secret>>

note: use the API credentials from your Boxalino account that have the ADMIN role assigned

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

...

Expand
titleBody content for a single document type sync (ex: doc_content data structure for mapping)
Code Block
[
    {
        "connector": {
            "type": "prismic",
            "options": {
                "query": [],
                "method": "GET",
                "access_token": "",
                "url": "",
                "page": 1
            }
        },
        "document": {
            "type": "content"
        },
        "mapping": {
            "id": "",
            "type": "",
            "creation": "",
            "last_update": "",
            "persona_type": "",
            "persona_id": "",
            "parent_content_ids": [],
            "products": [],
            "contents": [],
            "customers": [],
            "stores": [],
            "title": [],
            "description": [],
            "short_description": [],
            "images": [],
            "link": [],
            "tags": [],
            "labels": [],
            "status": "",
            "periods": [],
            "string_attributes": {},
            "localized_string_attributes": {},
            "numeric_attributes": {},
            "localized_numeric_attributes": {},
            "datetime_attributes": {},
            "localized_datetime_attributes": {}
        },
        "languages": {},
        "options": {},
        "di": {}
    }
]

...

The connector properties are:

  1. type (select from the available options)

  2. options (gets generated based on the selected connector type)

For example, bellow is a sample of the connector properties.

...

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) :

  1. the output is the explicit type (ex: for tags, the tagging source can be tags or default) or exposed property name

  2. the input is the mapping logic (ex: all product IDs from data.product_ids[*].id are set as product_ids in localized_numeric_attributes)

c) (if you do not want to change the property name in *_attributes mapping) set a list (as array [] ) with mapping path (input)

  1. "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

  1. do a test/sample request without any mapping declaration to identify the default mappings

  2. In the case of prismic integrations, the following mappings are added by default:

    Code Block
    "id": "id",
    "type": "type",
    "creation": "first_publication_date",
    "last_update": "last_publication_date",
    "link": "uid",
    "string_attributes" : {"linked_ids":"alternate_languages[*].id"},
    "localized_string_attributes" : ["slugs", "href"],
    "raw" : {
      "localized_string_attributes" : [
        "alternate_languages",
        "linked_documents"
      ]
    }

e) export of properties as raw JSON - use the raw node in the mapping

  1. properties will be available as bxraw_<repository name>

  2. this is helpful for exporting slices and other properties that would require specific rendering in your template

f) export linked-content : either using the contents property from the Data Structure or by exporting it as raw JSON

  1. the mapping for contents is done in the following way: "contents":{"<source for input>":{"data-structure field":"prismic field"}}"

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)

  1. 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:

...

Info

At Boxalino, we try to map the way our client expects for a headless integration to work.

For this reason, if your connector integration libraries allows for content to be accessed as HTML or text (ex: data.content) - this is as well possible.

In the above sample:

  1. data.content is a RichText (editor) input

  2. when using the mapping “description”:data.content - it will be exported as TEXT

  3. when adding the mapping for localized_string_attributes - it will be exported as HTML.

  4. when adding the mapping in raw it will be exported as raw JSON


The connector response returns the requested content (results) in the following:

...