Programmatic transaction demarcation and implementation