1

We are working on a chatbot with a web-based user interface component. This web component is supposed to be hosted on a bunch of clients' websites. Each client has their own unique key (id) in our backend database by which we should be able to track their chat instances.

Technically, our chat web app (hosted on different clients' websites) submits a POST request to the action below hosted on our own Azure account. What's the best way to include the client's unique key (id) with Activity object's payload? Which property of it should be leveraged to associate any kind of metadata that we may want to process or track activities?

[ResponseType(typeof(void))]
            public virtual async Task<HttpResponseMessage> Post([FromBody] Activity activity)
            {
                // check if activity is of type message
                if (activity.GetActivityType() == ActivityTypes.Message)
                {
                    await Conversation.SendAsync(activity, () => new BasicLuisDialog());
                }
                else
                {
                    HandleSystemMessage(activity);
                }
                return new HttpResponseMessage(System.Net.HttpStatusCode.Accepted);
            }
Arash
  • 3,628
  • 5
  • 46
  • 70

1 Answers1

1

According to this Microsoft documentation "Entities" property of "Activity" class can be used to pass along metadata.

Arash
  • 3,628
  • 5
  • 46
  • 70