Happy Business Starts Here

Workflow- For electronic payment, effective date should be today's date or the payment should fail

Zuora Support

Workflow- For electronic payment, effective date should be today's date or the payment should fail

Problem

Customer built a workflow to add a credit card fee, as part of which a debit memo is created and an electronic payment is created. This workflow is scheduled to execute daily at 11 PM EST. We have observed an issue with setting effectiveDate in CreatePayment call to Data.Workflow.ExecutionDate. Hence it was updated to "2019-01-30 11:11 UTC". But, when the workflow execution gets delayed due to some issue the effective date remains same as previous day due to which the Create Payment API fails with error: "message" : "For electronic payment, effective date should be today's date or the payment should fail."

Tags (1)
1 REPLY 1
Zuora Support

Re: Workflow- For electronic payment, effective date should be today's date or the payment should fa

Solution

 

It is observed in this request that Tenant time zone is set as Pacific(PST) and the workflow is scheduled to execute daily at 11 PM EST. due to the time zone difference the effective date is set as previous date during the task execution

User was suggested to use the below modified liquid code set for the effective date and it worked

 

{{ "now" | date: "%Y-%m-%d %H:%M:%S %Z" | timezone: "%Y-%m-%d %H:%M:%S %Z", "%Y-%m-%d %H:%M:%S %Z", "Pacific Time (US & Canada)" | date: "%Y-%m-%d"}}