Happy Business Starts Here

How to Schedule Workflow by filtering out subscriptions and amendments without duplications

Highlighted
Zuora Staff

How to Schedule Workflow by filtering out subscriptions and amendments without duplications

For Subscriptions :

subscription.CreatedDate at time zone 'UTC' >= TIMESTAMP '{{ Data.Workflow.LastRunDateTimeUTC | date: "%Y-%m-%d %H:%M:%S" }}'
and subscription.CreatedDate at time zone 'UTC' < TIMESTAMP '{{ Data.Workflow.ExecutionDateTimeUTC | date: "%Y-%m-%d %H:%M:%S" }}'

 

For Amendments

subscription.version = (Select max(version) from subscription c where c.originalid=subscription.originalid and c.version > 1)
and subscription.UpdatedDate at time zone 'UTC' >= TIMESTAMP '{{ Data.Workflow.LastRunDateTimeUTC | date: "%Y-%m-%d %H:%M:%S" }}'
and subscription.UpdatedDate at time zone 'UTC' < TIMESTAMP '{{ Data.Workflow.ExecutionDateTimeUTC | date: "%Y-%m-%d %H:%M:%S" }}'