Product View
Make a call to this endpoint when a user views a product.
Example Mutation
Make sure to set the Authorization: Bearer <Unique API Key>
on the request. For more information about obtaining a unique API Key please see the Authentication Docs
POST https://api.attentivemobile.com/v1/graphql
mutation productView($sendInput: SendProductViewEventInput!) {
productViewEvent(input: $sendInput) {
occurredAt
products {
productId
productPrices {
amount
currency
}
quantity
}
visitor {
phone
email
}
}
}
Example Input Variable
{
"sendInput": {
"occurredAt": "2022-03-30T14:38:29+00:00",
"visitor": {"email": "test@gmail.com", "phone": "8005555555"},
"products": [{
"productPrices":
[{"amount":"7.01", "currency":"CAD"},{"amount":"123.99", "currency":"USD"}]
,
"productId": "productId",
"productImage": "none.jpeg",
"productName": "Best Product",
"productVariantId": "varId",
"quantity": "1"
},
{
"productPrices":
[{"amount":"7.01", "currency":"USD"},{"amount":"123.99", "currency":"USD"}]
,
"productId": "productId2",
"productImage": "blagh2",
"productName": "pName2",
"productVariantId": "varId2",
"quantity": "1"
}]
}
}
Example Response
{
"data": {
"productViewEvent": {
"occurredAt": "2022-03-30T14:38:29Z",
"products": [
{
"productId": "productId",
"productPrices": [
{
"amount": "7.01",
"currency": "USD"
},
{
"amount": "123.99",
"currency": "USD"
}
],
"quantity": 1
},
{
"productId": "productId2",
"productPrices": [
{
"amount": "7.01",
"currency": "USD"
},
{
"amount": "123.99",
"currency": "USD"
}
],
"quantity": 1
}
],
"visitor": {
"phone": "8005555555",
"email": "test@gmail.com"
}
}
},
"extensions": {
"traceId": "00000"
}
}