Change layout and data inside changed layout through api

I want to ask what is the fastest non delayed way to create correct algorithm for changing layout on screen to desired one and also edit text data immediately.

We have 2 screens both shows daily layouts. we have created a welcome layout for customer.

We want to recognise customer face and shows his name on the screen inside welcome layout.
This can be same welcome layout with different names on 2 different door entrance.

We store the customer name inside a mysql database which is automatically updated by image recognition software.
Do i need to create a dataset and update it sync with our mysql database?
or its better to change text widget through api? which is the fastest way?
Can you advise me with correct algorithm and which widget to use.(dataset,dataview, embeded or text)

Planned workflow,
Recognise Image> store in mysql table < some script which use api call to xibo> change layout to welcome layout immediately> change name tag insde welcome message to new name in welcome layout> go back to daily schedule after end of welcome layout duration.

I would be grateful if you could let me know which are the most correct api calls.