Please refer to the Workflows section of the Scripting User Guide for general guidance on building Workflows.
Workflows can have their Fields linked to Genesys fields, populating data from and writing data back to Genesys. Configuration is covered in the Linking Campaigns and Linking Workflow Fields articles.
Please note: if you are testing a Workflow via the Preview functionality of the Workflow Designer, then trying to utilise PureEngage functionality such as PureEngage Commands will throw errors. To test this functionality, you will need to launch the Workflow from within the Workspace via a test campaign or similar.