Creating Templates¶
After you create one or more partners, you can create a template. To get started, click Templates in the left navigation pane.
A template describes a file structure in sufficient detail to enable FeedXChange to validate and process it correctly during an integration run. Templates include detailed field definitions, validation rules, and response file generation rules.
Each template is associated with an RCX process and a partner.
FeedXChange provides three ways to create templates:
- Copy an existing template
- Create one from scratch
- Import a template
In this tutorial, you create a template from scratch for Acme Pet Shop, and you import a template for PAWs Resorts.
Creating the Acme Pet Enrollment Template¶
- Click Templates in the left navigation pane.
-
Click + Create New in the upper-right corner of the screen. The Template Configuration screen opens.
-
Fill in the fields as described:
Property Name Property Description Name Type Acme Pet Enrollment.RCX Process Select Enrollment.Partner Select Acme Pet Shop. -
Click Input File to expand it. The Input File Properties panel is displayed.
-
Fill in the fields as described:
Property Name Property Description Format Select Fixed.Header Select Yes.Body Select Yes.Footer Select No. -
Click the Header tab. A New Field is created with default values.
- Set the Field Name to
channelName, the Fixed Length to11, the Data Type toString, Required toYes, the Minimum Length to1, and the Maximum Length to11. -
Click + Add to add a header field for each of the following with values shown:
- acquisitionChannel
- Fixed Length: 18
- Data Type: String
- Required: Yes
- Minimum Length: 1
- Maximum Length: 18
- enrollChannel
- Fixed Length: 13
- Data Type: String
- Required: Yes
- Minimum Length: 1
- Maximum Length: 13
- enrollDate
- Fixed Length: 10
- Data Type: Date
- Date Format:
YYYY-MM-DDTHH:mm:ss.SSSZ - Required: Yes
- Minimum Length: 1
- Maximum Length: 10
- memberStatus
- Fixed Length: 12
- Data Type: String
- Required: Yes
- Minimum Length: 1
- Maximum Length: 12
- memberType
- Fixed Length: 10
- Data Type: String
- Required: Yes
- Minimum Length: 1
- Maximum Length: 12
- acquisitionChannel
-
Click the Body tab. The required fields are autocreated based on the RCX process selected.
-
Update the follow fields with values shown:
- channelName
- Fixed Length: 11
- Data Type: String
- Required: Yes
- Minimum Length: 1
- Maximum Length: 11
- member.acquisitionChannel
- Fixed Length: 18
- Data Type: String
- Required: Yes
- Minimum Length: 1
- Maximum Length: 21
- member.enrollChannel
- Fixed Length: 13
- Data Type: String
- Required: Yes
- Minimum Length: 1
- Maximum Length: 13
- enrollDate
- Fixed Length: 10
- Data Type: Date
- Required: Yes
- Date Format: YYYY-MM-DDTHH:mm:ss.SSSZ
- memberStatus
- Fixed Length: 12
- Data Type: String
- Required: Yes
- Minimum Length: 1
- Maximum Length: 12
- memberType
- Fixed Length: 10
- Data Type: String
- Required: Yes
- Minimum Length: 1
- Maximum Length: 10
- channelName
Configuring the Response File¶
- Click Response File to expand it. The Response File Properties panel is displayed.
-
Fill in the fields as described:
Property Name Property Description Format Select Delimited.Delimiter Type a comma ( ,)Quote Strings Select single quote Header Select No.Body Select Yes.Footer Select No. -
Click the Body tab. A
New Fieldis created with default or empty values. -
Fill in the fields as described:
Property Name Property Description Field Name Error Code Data Type String Value Error Code -
Click + Add twice to add two more fields:
- Error Message
- Field Name: Error Message
- Data Type: String
- Value: Error Message
- HTTP Status
- Field Name: HTTP Status
- Data Type: String
- Value: HTTP Status
- Error Message
-
Click Save in the upper right corner.
Fixing Errors¶
The Errors and Warnings pane opens on the right with three errors displayed.
To fix the errors:
- Click the Header tab.
- For the
memberTypefield, fix the Maximum Length according to the error message. - Click the Body tab.
- For the
member.acquisitionChannelfield, fix the Maximum Length according to the error message. - For the
enrollDatefield, click the search icon () in the RCX Field to open the RCX Field Selection dialog box. - Type
enrollDatein the Search text box. The list of fields narrows to show those with enrollDate in the name. - Click the member.enrollDate field to put a checkmark next to it.
- Click OK.
- Click Save in the upper right corner.
- Click Validate to validate the template. FeedXChange shows a success message.
Testing the Template¶
Before you publish the template, it's a good practice to test it with a file that mirrors one the server will put in the S3 bucket or SFTP server.
Download the test files:
If the files open in your browser: Right-click the page and select Save Page As or press Ctrl+S (Cmd+S on Mac).
If the files download automatically: Ensure they're saved as .txt files.
Alternatively, you can right-click the download links above and select Save Link As...
To test the Acme Pet Enrollment template:
- Click Test File in the upper right corner.
- Click Upload Sample File () and navigate to the
errorsfile on your computer. - Click Test.
-
Review the errors to understand the problems FeedXChange found.
- Body line 1 length[63] does not match with fixedLength[67]
- Body line 2 length[63] does not match with fixedLength[67]
Compare the errors file with the success file. You'll notice that the date field doesn't have fractional second value, which is expected due to the selected date format in the template. This reduces the overall length of each line by four characters (
.257). -
Close the Errors and Warnings pane.
- Click Test File again.
- Click Upload Sample File () and navigate to the
successfile on your computer. - Click Test. The test passes, and the template is ready to publish.
Creating the PAWs Resorts Activity Template¶
Sometimes, you might have a template you want to modify without changing the original. Templates are exported and imported in JSON format.
This tutorial shows you how to import a template. For information about exporting templates, see Export a Template.
-
Download the PAWs Resorts Activity template to your computer.
- If the file opens in your browser: Right-click the page and select Save Page As or press Ctrl+S (Cmd+S on Mac).
- If the file downloads automatically: Ensure it's saved as a
.jsonfile.
Alternatively, you can right-click the download link and select Save Link As...
-
On the Templates list view, click Import in the upper-right corner of the screen.
- Click Include Json File () and navigate to the
PAWS_Resorts-Activity.jsontemplate file on your computer. -
Leave the override existing template option off.
-
Click Import.
- On the Job Info dialog box, click OK.
-
Click Import Status to check the status of the import operation.
Testing the Template¶
Before you publish the template, it's a good practice to test it. Create a file with anonymous test data that resembles one that the server will put into the S3 bucket or SFTP server.
-
Download the test files to your computer:
-
Click Test File in the upper right corner.
- Click Upload Sample File () and navigate to the
PAWsResorts_activity_input_error.csvfile on your computer. - Click Test.
-
Review the errors to understand the problems FeedXChange found:
- The count of fields in the body line 1[5] does not match the specified configuration[6]
- The count of fields in the body line 2[5] does not match the specified configuration[6]
- Field date on body line 1: The date format does not align with the specified format
- Field type on body line 1: is required field
- Field date on body line 2: The date format does not align with the specified format
- Field type on body line 2: is required field
When you compare the errors file with the success file, you'll notice:
- The error file contains a header row with only 5 fields and the template wasn't configured for a header row.
- The second line in the error file has a semicolon (;) instead of a comma separating the first and second fields.
- These two issues caused all the errors displayed. Removing the header row and changing the semicolon to a comma fixes the errors.
-
Close the Errors and Warnings pane.
- Click Test File again.
- Click Upload Sample File () and navigate to the
PAWsResorts_activity_input_success.csvfile on your computer. - Click Test. The test passes, and the template is ready to publish.
Publishing the Templates¶
Now that the templates have been created and tested, you can publish them. Publishing the templates makes them available for use in integrations.
- Click Templates in the left navigation pane to open the Templates list view.
- For the Acme Pet Enrollment template, click the Edit icon () in the Actions column.
- Click Publish in the upper right corner.
- For the PAWs Resorts Activity template, click the Edit icon () in the Actions column.
- Click Publish in the upper right corner.
Next, create the integrations.
See also:



