Skip to main content

Commission Tracking

If you as a merchant want to track your calls with a custom id or tag this is possible through what we call commission tracking.

Requirement
  • API Key If you haven't already gotten an API client you should ask your Bambuser contact person for one. This will enable you to make http requests to our REST API. This is the same API that you might already have interacted with in our Live Shopping product offering.

Options

There are two options to track which agent collaborated in which calls.

Agents have seperate Bambuser accounts

1. Retrieve call data

You can retrieve call data through the Bambuser LiveShopping public REST API. The documentation can be found here.

To retrieve information about a call you need to know the call id, a.k.a. session id. This can be stored on your side with help from our Tracking Events.

Example response:

{
"agentId": "7J7hWWRpROTGOzAqcOQ4gMqj5Bp2",
"callId": "001c0ac46023984otierjfldks3488b4e8",
"endTime": "December 21, 2021 at 11:07:42 AM UTC+1",
"startTime": "December 21, 2021 at 11:13:02 AM UTC+1",
}

2. Get a list all users

To retrieve a list of all users in the dashboard, you will need to call the following endpoint https://liveshopping-api.bambuser.com/v1/users. More information can be found here.

[
{
"id": "7J7hWWRpROTGOzAqcOQ4gMqj5Bp2",
"displayName": "Iris West",
"email": "iris.west@example.com",
"orgId": "6tyBD86t32MPewDByicW",
"externalReferenceId": "iris-west-384",
"roles": [
"callsAgent"
]
},
{
"id": "RpGOzA4gMqj5Bp7hWWRqcOQ2RO7Jp",
"displayName": "Cisco Ramone",
"email": "cisco@example.net",
"orgId": "6tyBD86t32MPewDByicW",
"externalReferenceId": "cisco-ramone-492",
"roles": [
"callsAgent"
]
}
]

3. Map the agent ID with the user ID

The agentId you get from retrieving call data will match one of the id you will get in listing all users. The one that gets matched is the agent that was in a call. That way you will be able to get that agent's displayName and email.


Agents are sharing the same Bambuser account

1. Contact Bambuser and ask them to enable the Metadata panel

Once enabled, your agents will have the option to fill in tracking_tag when a call has started. The tracking_tag field can have whatever label you like. For example "Sales representative id". When the agent presses "Save" the tracking_tag field will be added to the call document in our database.

2. Retrieve call data

Now you can set up your system to get data about a call. This is done through the Bambuser LiveShopping public REST API. The documentation can be found here.

To retrieve information about a call you need to know the call id, a.k.a. session id. This can be stored on your side with help from our Tracking Events.

Example response:

{
"agentId": "7J7hWWRpROTGOzAqcOQ4gMqj5Bp2",
"callId": "001c0ac46023984otierjfldks3488b4e8",
"endTime": "December 21, 2021 at 11:07:42 AM UTC+1",
"startTime": "December 21, 2021 at 11:13:02 AM UTC+1",
"trackingTag": "1234",
}

API call timing considerations

You might have noticed that both start and end time are present in the response above. This suggests that this particular call is finished. This information is updated as the call goes on though. This means that:

  • You might receive partial data if you do the request before the call has ended
  • A good practice would e.g. be to wait for the call-ended event and then do the API call
  • Another common practice among our users is the do the API request after they detect a purchase connected to a call