Happy Business Starts Here

Highlighted
Valued Scholar

Problem with send usage with REST API on sandbox

Hi!
When I try send csv file i get error:
{'processId': 'FFFC85B05B2C1C22', 'reasons': [{'code': 50000000, 'message': 'Exception happens when import usage records by UI/Rest'}], 'success': False}
If i try just upload this file with UI - nothing happens - new records don't added

Example of file:
ACCOUNT_ID,UOM,QTY,STARTDATE,ENDDATE,SUBSCRIPTION_ID,CHARGE_ID,DESCRIPTION
100002,Impressions,20769574.0,03/01/2016,03/31/2016,A-S00000139,C-00000376,Booking1

Tags (2)
10 REPLIES 10
Support SME

Re: Problem with send usage with REST API on sandbox

Hi @netpastor , in order to get the full error message via email after a failed usage import, please configure the following notification on your tenant:

 

- Navigate to Settings > Z-Billing Settings > Setup Profiles, Notifications and Email Templates

- Scroll down to the notification called Import Processed | Failed Status , enable it and configure it to your email address (if the "To Email" is set to run owner's work email, it should be fine as long as the notification is enabled)

- Re-try uploading the usage, and let me know what's the error message you receive via email

 

Thanks!



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Valued Scholar

Re: Problem with send usage with REST API on sandbox

I added my email to import email templates. After import with UI i got this email:

 

Dear Customer,
The import operation you requested has completed with an error.
Import Request Information
Import ID:                                 2c92c0f954a999f50154c1389a750e63
Import Status:                           Failed
Status Description:                     There are some invalid records in this import.
Import Completed On:                17.05.2016 17:16:34
Total Records Attempted:            164
Total Records Imported:              0

 

There was also link to submited file with comments
There is one line from this file

idMessageACCOUNT_IDUOMQTYSTARTDATEENDDATESUBSCRIPTION_IDCHARGE_IDDESCRIPTION
 The STARTDATE format is invalid;The ENDDATE format is invalid100002Impressions20769574.003/01/201603/31/2016A-S00000139C-00000376Booking1


I can't understand what is the problem with date format - it's MM/DD/YYYY like in documentation API Usage Post Doc

Support SME

Re: Problem with send usage with REST API on sandbox

Thanks for the details @netpastor

 

The article also states Date format is based on locale of the current user - meaning, it does not necessarily align with the rest of the Zuora date formats.

 

So in case your Windows / Mac locale is set up differently, you might need to use the DD/MM/YYYY format, or alternatively, re-configure your operation system's locale.

 

Let me know if this helps resolving your issue.



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Valued Scholar

Re: Problem with send usage with REST API on sandbox

@Viktor I don't understand...
I'm trying to work with sandbox from my local computer, stage server - they can have different locale settings
Production server may have own locale settings too.
I think date format shouldnt depend on local date format settings.

Support SME

Re: Problem with send usage with REST API on sandbox

@netpastor I understand your concerns regarding this feature being dependant on your OS's locale - I suggest navigating to the IDEAS > BILLING & PAYMENT IDEAS board and opening a topic there, as those boards are monitored by our Product Management team, responsible for changing, adding and enhancing features of our product.

 

In the mean time, could you confirm if swapping the MM/DD format to DD/MM resolves your issue?



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Valued Scholar

Re: Problem with send usage with REST API on sandbox

@Viktor Unfortunely i dont.
I change data format to DD/MM and have the same error:

Dear Customer,

The import operation you requested has completed with an error.

Import Request Information
Import ID:                                 2c92c0f854c23d880154c917884e1685
Import Status:                           Failed
Status Description:                     There are some invalid records in this import.
Import Completed On:                19.05.2016 05:57:24
Total Records Attempted:            160
Total Records Imported:              0

For additional Import details, please visit: https://apisandbox.zuora.com/apps/api/file/2c92c08554c239510154c9178dfe7e1e


idMessageACCOUNT_IDUOMQTYSTARTDATEENDDATESUBSCRIPTION_IDCHARGE_IDDESCRIPTION
 The STARTDATE format is invalid;The ENDDATE format is invalid100002Impressions3652741.027/03/201631/03/2016A-S00000139C-00000376Booking1
Valued Scholar

Re: Problem with send usage with REST API on sandbox

@Viktor And i didn't receive any emails about wrong import of usages through API

Valued Scholar

Re: Problem with send usage with REST API on sandbox

@Viktor any ideas?

Support SME

Re: Problem with send usage with REST API on sandbox

@netpastor I am doing some tests right now on my own tenant, and will be with you shortly once I have more information.



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √