Hi, thanks. That was helpful, product import works.
I tried to import user events in a similar manner, but I am having problems - again - in creating the user event import request. I know this is not directly related to Retail API, but I cannot find any documentation or samples on how to construct the request objects in the Python client libs accordingly:
Here's my (erroneous) snippet:
user_events = {
"user_events": [
{
"event_type": "home-page-view",
"visitor_id": "visitor-1",
"event_time": "XXX" # problem
}
]
}
import_user_events_request = {
"parent": 'projects/' + PROJECT_ID + '/locations/global/catalogs/default_catalog/userEvents:import',
"input_config": {"user_event_inline_source": user_events}
}
response = user_event_service.import_user_events(import_user_events_request)
Problem seems to be the 'event_time' field - supposed to be a (protobuf) timestamp. Can't find any docs on how to create such a timestamp.
Again, thanks in advance
christian