I've been trying to send back a normal text reply plus a Facebook's receipt template, but the template always ends up outside of the fulfillmentMessagespart of the JSON response.
I was not able to see the template so I checked in DialogFlow and it clearly sits outside of the fulfillmentMessages under unspecified. Any idea how that might happen?
My BE is in Lumen. The method that builds the response:
public function history()
{
$this->dialogAgent->reply('The following, ' . $this->user->first_name . ' is you order history');
$history = $this->user->getOrders();
$historyReceipt = FacebookTemplates::receipt($history, $this->user);
$this->dialogAgent->reply($historyReceipt);
return response()->json($this->dialogAgent->render());
}
I've been trying to send back a normal text reply plus a Facebook's receipt template, but the template always ends up outside of the
fulfillmentMessages
part of the JSON response.I was not able to see the template so I checked in DialogFlow and it clearly sits outside of the
fulfillmentMessages
underunspecified
. Any idea how that might happen?My BE is in Lumen. The method that builds the response:
And the method that build the receipt:
Just putting dummy data in the template so far.
The template I'm trying to mimic is this one https://developers.facebook.com/docs/messenger-platform/send-messages/template/receipt