Integrating Customer Feedback

Integrating Customer Feedback#

Integrating Customer Feedback involves requesting open Feedback associated with a customer_id by calling the ListPendingCustomerFeedbackForms endpoint and calling SubmitCustomerFeedback to submit and store the answers.

The type and amount of Customer Feedback, as well as the questions in each form, can differ and must be pre-configured based on the needs of the Integrator. For example, collecting post-ride Customer Feedback with mandatory questions if there is a legal obligation.

Important

In Germany, all Autonomous Trips are under the legal obligation to collect Customer Feedback. Customers who did not provide Feedback for a previous Autonomous Trip cannot order a subsequent Autonomous Trip.

In this case, integrating Customer Feedback might be mandatory by law if your integration offers Autonomous Trips.

List Pending Customer Feedback#

You can request all Feedback questions associated with a customer_id by calling the ListPendingCustomerFeedbackForms RPC with a ListPendingCustomerFeedbackFormsRequest.

The RPC will return a ListPendingCustomerFeedbackFormsResponse which contains a list of Feedback Forms, each with its own feedback_id and a list of Questions.

# export CUSTOMER_ID="<replace with customer id>"

grpcurl \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Customer-Id: ${CUSTOMER_ID}" \
  -import-path ./protos/ \
  -proto "moia/ridepooling/feedback/v1beta1/feedback.proto" \
  ridepooling-api.int.eu-central-1.moia-group.io:443 moia.ridepooling.feedback.v1beta1.FeedbackService/ListPendingCustomerFeedbackForms

Tip

We recommend querying the endpoint after a Trip is completed and upon app start to request previously unanswered Feedback and remind the Customer about the Customer Feedback they left unfinished.

Submit Answered Customer Feedback#

Call the SubmitCustomerFeedback RPC once the Customer answered all the questions provided in the Customer Feedback form. In the SubmitCustomerFeedbackRequest you need to provide the feedback_id and the list of answers.

The type and number of answers depends on the questions from the form. An answer will always have the id of the corresponding question and be of the same type as it.

Below is an example of responses filled out by a Customer after cancelling a Trip, where the form contained two questions: the first a single-select with the cancellation reason and the second an open text.

# export CUSTOMER_ID="<replace with customer id>"
# export FEEDBACK_ID="<replace with feedback id>"
# export QUESTION_ID1="<replace with first question id id>"
# export QUESTION_ID2="<replace with second question id id>"

grpcurl \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Customer-Id: ${CUSTOMER_ID}" \
  -import-path ./protos/ \
  -proto "moia/ridepooling/feedback/v1beta1/feedback.proto" \
  -d "{\"feedback_id\":\"$FEEDBACK_ID\",\"answers\":[{\"questionId\":\"$QUESTION_ID1\",\"type\":{\"selectAnswer\":{\"selectedOptions\":[\"OTHER\"]}}},{\"questionId\":\"$QUESTION_ID2\",\"type\":{\"openTextAnswer\":{\"text\":\"testing\"}}}]}" \
  ridepooling-api.int.eu-central-1.moia-group.io:443 moia.ridepooling.feedback.v1beta1.FeedbackService/SubmitCustomerFeedback