Skip to content

Destination Monetate - #285

Merged
arnab-p merged 11 commits into
masterfrom
destination/monetate
Sep 9, 2020
Merged

arnab-p merged 11 commits into
masterfrom
destination/monetate

Conversation

@dhawal1248

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread __tests__/data/monetate_output.json Outdated
"Content-Type": "application/json"
},
"params": {},
"body": "{\"monetateId\":\"1234\",\"events\":[{\"eventType\":\"monetate:context:IpAddress\",\"ipAddress\":\"0.0.0.0\"},{\"eventType\":\"monetate:context:ScreenSize\",\"height\":22,\"width\":11}],\"customerId\":\"newUser\",\"channel\":\"channel\"}",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a json..we need to pass json?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check also the type of each key, seems need string
refer the api spec once

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the type to JSON.
And also checked for key types and made necessary changes.

"targetChildType": "object",
"targetFormat": {
"eventType": "monetate:context:PageView",
"url": "sourceKeyValue.url",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may add an explicit type for the individual target keys instead.
Can discuss it in our broader refactoring plan

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes 👍

[
{
"destKey": "events",
"sourceKeys": "context.screen",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the screen location in mobile sdk payload?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

"sourceKeys": ["properties.page", "context.page"],
"metadata": {
"targetType": "Array",
"isTargetTypePrimitive": false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may not require another key and find it from the "targetType"
Can discuss it in our broader refactoring plan

Comment thread __tests__/monetate.test.js Outdated

inputData.forEach((input, index) => {
it(`${name} Tests: payload - ${index}`, () => {
it(`${name} Tests: payload - ${index}`, async () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is async/await required here?
@Manashi-1881

@arnab-p
arnab-p merged commit 5b18b96 into master Sep 9, 2020
@arnab-p
arnab-p deleted the destination/monetate branch September 9, 2020 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants