Zuora Import Usage

The Zuora Import Usage Function imports usage data files from Usage Engine to Zuora Billing. It handles data using the Zuora Import Usage API as documented by the service. By implementing this service in a stream the users can build custom logic to handle responses or errors from Zuora. 

The relevant usage data file needs to be specified — the CSV format is currently supported. 

Note!

  • The name of a usage file cannot be longer than 50 characters, including the length of the file name extension.
  • The maximum size of the usage file uploaded must not exceed 18 MB. If the size of the file exceeds 18 MB, it will be split into multiple files.
  • After configuring the Zuora Import Usage Function, it is important to remember that the data that is displayed initially in the Preview is mock data. Mock data refers to fake data that is displayed to avoid unnecessary usage creation. You must run the stream to produce the actual results.

Configuration

To configure the Zuora Import Usage Function:

  1. In Environment, to access the Zuora tenant environment, specify:

    FieldDescription
    TenantThe name of the Zuora environment.
    URLThe base URL for the REST endpoint. If the Custom tenant is selected, specify the appropriate endpoint.

    If the Zuora tenant is available, you can access the Zuora REST API using the following endpoints:

    TenantBase URL for REST Endpoints
    US Productionhttps://rest.zuora.com
    US API Sandboxhttps://rest.apisandbox.zuora.com
    US Performance Testhttps://rest.pt1.zuora.com
    EU Productionhttps://rest.eu.zuora.com
    EU Sandboxhttps://rest.sandbox.eu.zuora.com
    CustomYou can also access your own custom tenant environment. Specify the URL for your endpoint.

    Note!

    The Zuora endpoint that we are using for the Zuora Import Usage Function is POST to /usage-imports.
  2. In Credentials, you can choose to authenticate using two methods. In Authenticate by specifying:

    Authentication TypeFieldDescription

    OAuth

    Client IDThe client ID that is displayed when the OAuth client is created in Zuora. 
    Client SecretThe client secret ID that is displayed when the OAuth client is created in Zuora.
    API KeyAccess Key IDThe identifier that is used to sign the requests sent to Zuora. It is displayed when the API User is created in Zuora.
    Secret Access KeyThe key that is used along with the Access Key ID to cryptographically sign the Zuora requests.

    Note!

    You can also use the Secrets Wallet toggle button to select a predefined Zuora secret from your Secrets Wallet.

  3. In File Information, specify the name of the usage file that is sent to Zuora in Filename and provide a Description. 

    Note!

    • Filename field supports Variable Insertion.  
    • If Filename is not specified, the filename from the collector function will be used. If no file is collected from the collector function, UsageData.csv will be used as the filename.

  4. In Entity, if you have the Zuora Multi-entity feature enabled, you can specify the name of the entity you want access to. Zuora Multi-entity provides the capability to create and manage multiple entities within a single Zuora tenant. For more information on Zuora Multi-entity, refer to https://knowledgecenter.zuora.com/Billing/Tenant_Management/Multi-entity.
     
  5. In Field Mapping, you must specify the Source Field based on the input from the previous function for the appropriate Target Field. There are five Target Fields that must be mapped to the Source Fields: AccountNumber, Tag, UnitOfMeasure, StartDateTime and Quantity. The target fields are defined according to the template of the usage file. To add a custom field mapping, click + Add custom field mapping. You can also add multiple custom field mappings.

    Note!

    The format of the custom Target Field must follow Zuora's naming guidelines. When adding a Target Field in a custom field mapping, you must always begin with CustomFields. as the prefix. For example, CustomFields.<key_value>

  6. After configuring the Zuora Import Usage Function, click Preview to preview your data before running the stream. 

    Note!

    When you preview the Zuora Import Usage Function, it always represents the request.fileContent data in the Buffer/binary format to improve performance of the engine.