Create a callout template
Learn how to create callout templates in the Zuora UI.
- Navigate to Extension Studio > Events & Notifications in the left navigation menu.
- Click the Callout Templates tab.
- On the Callout Templates page, click + Add New Callout Template.
- In the displayed Create Callout Template dialog, configure the following settings:
-
Basic information:
Field Required? Description Name Yes Specify the name of the callout template.
The name must be unique across all callout templates.
Related Event Yes Select a standard or custom event associated with the callout template from the dropdown list.
In the dropdown list, events are grouped into the following categories:-
- Billing
-
Finance
-
Payments
-
System
Description Specify the description of the callout template. Active Switch the toggle to activate or inactivate the callout template.
Zuora will not trigger callout notifications if the associated callout template is inactive.
-
-
Available merge fields:
Field Required? Description Field Type Select an object on which the merge field you want to use is defined.
The available objects vary depending on the callout template's related event.
Field Select the merge field.
You must select the field type before specifying the merge field.
Merge Field Tag When the Field Type and Field fields are specified, Zuora auto-generates and displays the corresponding merge field string in this field.
You can copy the merge field tag and paste it into the Request URL and Request Body fields or the Header Name and Header Value fields of custom callout headers.
-
Request information:
Field Required? Description Http Method Yes Select the HTTP method to use with the callout. The default value is
POST
. Zuora supports the following methods:- POST
- GET
- PUT
- PATCH
- DELETE
The customer API response to the Zuora callout must be HTTP status code 200, or the system considers the callout as a failure.
Request URL Yes Specify the path to the receiver service of the callout.
You must specify a URL using the HTTP Secure (https://) protocol. Zuora uses port 443 to send callout notifications by default. If you want to use other ports, submit a request at Zuora Global Support.
Zuora supports adding merge fields to the request URL. For example, you can specify a request URL as
https://mywebsite.com/zuora/{{DataSource.Account.Id}}
.A maximum of 1000 characters is allowed for the request URL.
-
Request body:
Field Required? Description Merge Fields Select the merge fields you want to include in the callout request body from the list.
-
Request Authentication: Some fields in the following table apply only to specific authentication types. For more information, see Callout authentication.
Field Required? Description Authentication Type Select the callout authentication type from the list. Valid options are as follows:
- None
- Username/Password (Basic and NTLM authentication)
- OAuth 2.0
Username This field is required if the Authentication Type is Username/Password. Specify the username associated with the callout receiver service.
This field applies only to the Username/Password authentication type.
Password This field is required if the Authentication Type is Username/Password. Specify the password associated with the username.
This field applies only to the Username/Password authentication type.
Domain Specify the domain that contains multiple users in an NTLM-authentication-enabled system.
This field applies only to the Username/Password authentication type.
Enable Preemptive Authentication If this checkbox is selected, Zuora transmits credentials in the Authentication header field in the first HTTP request when sending callout notifications to the callout receiver.
The credential is a combination of username and password in base64 format. Note that Zuora does not provide the Authorization field in the first HTTP request by default. For more information, see Message sequence for callout basic authentication.
This field applies only to the Username/Password authentication type.
Provider Name This field is required if the Authentication Type is OAuth 2.0. Select an OAuth 2.0 provider from the dropdown list.
This field applies only to the OAuth 2.0 authentication type.
-
Additional settings: Field Required? Description Retriable Select this checkbox to apply the callout retry rules. The default number of retry attempts is three at intervals of 30 minutes. You can configure the default retry number and intervals. For more information, see Configuring callout settings
Field Required? Description Retriable Select this checkbox to apply the callout retry rules.
The default number of retry attempts is three at intervals of 30 minutes. You can configure the default retry number and intervals. For more information, see Configure callout settings.
HMAC Select this checkbox to enable Hash-based Message Authentication Code (HMAC). For more information, see HMAC authentication. Algorithm This field is required if HMAC is selected. Select the hash function Zuora uses to generate the signed data.
Valid options are as follows:
- MD5
- SHA-1
- SHA-224
- SHA-256
- SHA-384
- SHA-512
This field is available only if the HMAC checkbox is selected.
Output Text Format This field is required if HMAC is selected. Select the format of the signed data.
Valid options are as follows:
- BASE64
- HEX
This field is available only if the HMAC checkbox is selected.
Secret Key This field is required if HMAC is selected. Specify the shared secret key that Zuora uses to generate the signed data.
This field is available only if the HMAC checkbox is selected.
Data This field is required if HMAC is selected. Specify the message to be authenticated. You can use merge fields in the Data value:
{{Request.Headers.<header_name>}}
: Refers to the value of a particular request header. For example,{{Request.Headers.Date}}
refers to the value of the request header calledDate
.{{Request.Body}}
: Refers to the request body.- Other merge fields supported by callout templates.
This field is available only if the HMAC checkbox is selected.
Header Key This field is required if HMAC is selected. Specify the header key that Zuora uses to send the header value, which typically contains the signed data.
This field is available only if the HMAC checkbox is selected.
Header Value This field is required if HMAC is selected. Specify the header value. You can use merge fields in this value:
{{Request.HMAC.Signed}}
: Refers to the signed data.- Other merge fields supported by callout templates.
The following is a header value example:
The algorithm is SHA-256 and the signed data is {{Request.HMAC.Signed}}.
This field is available only if the HMAC checkbox is selected.
SSL Certificate Select this checkbox and enter the SSL certificate of your callout receiver server's domain in the expanded text area.
The value must be in Privacy-Enhanced Mail (PEM) format, which typically starts with
-----BEGIN CERTIFICATE-----
and ends with-----END CERTIFICATE-----
.You can eliminate SSL certificate errors (HTTP status code 495) for callout notifications by specifying the SSL certificate.
-
- (Optional) Add custom callout headers:
- In the Additional Settings section, click + Add Custom Callout Header .
- Specify the following fields. You can add merge fields in the header name or header value.
-
Header Name: Enter the header name of the custom callout header.
-
Header Value: Enter the header value of the custom callout header.
-
- Repeat steps a and b to add more custom callout headers.
- (Optional) Preview the callout request. For more information, see Preview the callout request of a callout template.
- Click Save.