GENERIC INTEGRATION MODULE (GIM) README
MINIMUM SYSTEM REQUIREMENTS
Memory: 1 GB RAM
Disk Space: as much disk space as your data set requires (typically around 10 GB)
INSTALLATION
1. Run database creation script specific to your database (e.g. MySQL, MSSQL, Postgres)
2. Edit appsettings.json file (if needed) and adjust sync schedule (see config file section below for more details)
3. Run OS-specific installation script provided by RepSpark
CONFIGURATION FILE
To avoid syncing issues, schedule syncs at least half an hour away from each other.
ClientKey : To be provided by RepSpark; specific to each client.
DevToken : To be provided by RepSpark; it should match the environment you are writing to (e.g. the dev token to write to production and development are different).
ApiUrl : Development site: https://api.dev.repspark.net/api ; UAT: https://api.uat.repspark.net/api ; Production: https://api.repspark.net/api
LogFolderAbsolutePath : The local folder path to where you want to store the outputted logs. Backslashes should be escaped e.g. C:\\Logs\\IntegrationService\\
LogLevel : The level of logging that is outputted to the log files. In descending order: Fatal, Error, Info, Debug. Everything more severe will be logged (e.g. if your loglevel is Info, Error and Fatal messages will be logged as well)
ImageFolderAbsolutePath : The local folder path from which images will be uploaded to RepSpark's servers for product images. Backslashes should be escaped e.g. C:\\images
Schedules : Used to set up sync schedules. Each sync requires 5 parameters:
StartTime : The sync start time. It should be in the format of hh:mm in military time e.g. 15:09
RepeatEvery : How often to repeat the sync after the start time; needs to be an integer
Interval : The interval used for RepeatEvery, should be day, hour or minute (e.g. a repeatEvery of 2 and an interval of hour means the sync will repeat every 2 hours)
SyncMode : Full or Delta, see Sync Modes section below.
Entity : The entity sync that should be run. Should be one of option, product, asset, customer, inventory, inventorylocation, season, sizing, invoicereport, orderreport, order, orderconfirmation, upc
DatabaseName : Should be one of "postgresql", "mssql" (Microsoft SQL), or "mysql" depending on which database you are using on the server.
DatabaseConnectionString : The database connection string used to connect to the client side server.
Examples:
MSSQL: Data Source=<IP>;Network Library=DBMSSOCN;Initial Catalog=<db name>;User=<user>;Password=<password>
MySQL: Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
Postgres: User ID=root;Password=myPassword;Host=localhost;Port=5432;Database=myDataBase;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;
FtpUsername : To be provided by RepSpark
FtpPassword : To be provided by RepSpark
SYNC MODES
IMPORTANT: BOTH sync modes will push all the data in the tables. E.g. delta syncs are not computed locally but rather on the API server.
Full : The Full SyncMode replaces all of the existing data with the incoming data.
Delta : A Delta Sync updates any data in RepSpark with the values that exist in your local database. It will not remove any data that does not exist.
ENTITIES
[R] : Required field. All other fields are optional if not pertaining to your company workflow.
Customer : This sync will pull from Customer and CustomerExtensions tables. If you have a data property that doesn't map to one of the Customer table columns, you may be able to put it into the CustomerExtensions table. Please consult RepSpark for more info.
CustomerCode[R] : An identification code for the customer
Address1[R] : the customer's primary address
Name[R] : Customer name
BrandCode : If your company has multiple brands, populate this with an identifying string.
DivisionCode : If your company has multiple divisions, populate this with an identifying string.
StoreCode : an identification code for the store
DBA : Doing business as
Address2 : the customer's secondary address
State : State abbreviation
SalesPersonCode : An identifying code for the sales person assigned to this customer.
ShippingMethodCode : e.g. FedEx, Ground, etc
DiscountPercentage : Should be decimal e.g. 0.2. This would be the set discount that this customer receives. This will apply to all orders this customer orders if the site is configured this way.
TermsCode : Terms Code (Terms associated with the customer such as NET30, NET90, CC)
TypeCode : Type Code (This would designate the customer as a certain customer type. Within RepSpark, pricing plans, product segmentation and price lists may rely on the customer type.)
PricePlanCode : Price Plan Code (This could sync back to different pricing tiers within the ERP)
BuyingGroupCode : Buying Group Code (This could sync back to different pricing tiers within the ERP)
Product : Pull from Product and ProductExtensions tables. If you have a data property that doesn't map to one of the Product table columns, you may be able to put it into the ProductExtensions table. Please consult RepSpark for more info. Note: the imageUrl column is for insignia image URLs
ProductNumber[R] : The product number
ProductName[R] : The Product name
WholesalePrice[R] : Wholesale Price
BrandCode : If your company has multiple brands, populate this with an identifying string.
SeasonCode : If your company has the concept of seasons and has season-specific products, an identifying string of the season
DivisionCode : If your company has multiple divisions and division specific products, populate this with an identifying string.
ColorCode : an identifying string for the color of the product
GenderCode : An identifying string for the gender of the product
CatalogCode : An identifying string for the catalog of the product
CategoryCode : An identifying string for the category of the product
RetailPrice : The retail price
DiscountedPrice : The discounted price
ShortDescription : A short description
LongDescription : Long Description (This could be a marketing description that would give more detail about the product.)
SizeScaleCode : Size Scale Code (This would map to the size scales sent in the Sizings table.) See Sizing entity for more detail.
ProductType: A regular/body product should be ProductType = 2. Insignia/embroidery are ProductType = 3. Embroideries are considered products and should be entered into the Products table. example: If a product Shirt can be embroidered with a logo, there would be a record for the Shirt in the Products table, as well as a record for the embroidery (the logo).
ImageURL : Used for insignia/embroidery products (ProductType = 3). Needs to follow the format "Insignias\<File Name>". The GIM does not sync the actual image files, these need to be uploaded to the Insignias subdirectory on FTP.
DimensionCode : An identifying string for the dimension of the product, typically not set
Enabled: Defaulted to true. 1: enabled, 0: disabled
AssociationsPerGroup : default will be 0. Sets how many insignias can be set on the product
Season: Pulls from the Seasons table.
SeasonCode[R] : an identifying string of the season
Description[R] : Description of the season like Holiday 2019
StartOrderDate[R] : This is the first date an order can start within a season.
EndOrderDate[R] : This is the last date an order can be placed within a season.
StartShipDate[R] : This is the first start date an order can start within a season.
EndShipDate[R] : This is the last start date an order can start within a season.
BrandCode : If your company has multiple brands, populate this with an identifying string.
DivisionCode : If your company has multiple divisions and division specific seasons, populate this with an identifying string.
ParentSeasonCode : Parent Key Code (If there is a parent/child relationship. For example, if you have multiple sub-seasons delivered under one season.)
Enabled: Defaulted to true. 1: enabled, 0: disabled
Sizing: Pulls from Sizing table. Each SizeScaleCode can have multiple SizeCodes and each Product maps to a SizeScaleCode. ex. a SizeScaleCode of SHIRTS can have SizeCodes Large, Med, Small.
SizeCode[R] : The size code e.g. S, M, L, XL
SizeIndex[R] : Dictates the order of the size codes on the product pages e.g. if S, M, L, XL is desired, the size indexes should be 0, 1, 2, 3, respectively.
SizeScaleCode[R] : This is the size scale code the size code belongs to; For example, a size scale code can have size codes of S, M, L and another can be XS, S, M, L.
SizeDescription : Optional description of the SizeCode e.g. small
Option : The purpose of Options is to associate codes with readable descriptions. The different ElementTypes are color, division, gender, customerterms, salesperson, shippingoption, productcategory. insignia specific elementTypes: colorchoice, placement (if you do not have insignias for your products, this is not required)
KeyCode[R] : The code of the ElementType, for example, if ElementType is COLOR, KeyCode: BLU, BRWN, BLK
ElementType[R] : The group of Options that this record belongs to (e.g. color, customerterms, division)
NumericValue1 : Numeric Value 1
NumericValue2 : Numeric Value 2
OrderBy : a number that dictates what order the option will show up in; e.g. for ElementType of COLOR you can assign 1 to Blue and Blue will always show up at the top of lists
ParentCode : Parent Key Code (This would be used in the event of a parent/child relationship within one of the data elements.)
StringValue1 : StringValue1
StringValue2 : StringValue2
BrandCode : If your company has multiple brands, populate this with an identifying string.
Description : Description of the KeyCode (For example, if keycode is RED, BLK the description for these colors might be Red, Midnight or Black)
SeasonCode : an identifying string of the season
DivisionCode : If your company has multiple divisions and division specific seasons, populate this with an identifying string.
Hidden: For hiding options; Default is false
Inventory : Dictates the inventory of products.
AvailableDate : The inventory's available
AvailableQuantity : The available quantity
BrandCode : If your company has multiple brands, populate this with an identifying string.
ColorCode : an identifying string for the color of the product
DimensionCode : Optional, the dimension code for the inventory
DivisionCode : If your company has multiple divisions and division specific seasons, populate this with an identifying string.
GenderCode : An identifying string for the gender of the product
InfiniteAvailability : bit; determines whether or not the quantity will be shown as infinite
LocationCode : Maps to the inventory location
ProductCategoryCode : An identifying string for the product category of the product
ProductNumber : The product number
SeasonCode : an identifying string of the season
SizeCode : The size code e.g. S, M, L, XL
Order : Do not write to this table; this table is filled out with submitted orders in RepSpark when the Order sync is run. Our order hierarchy is Order, OrderItems, OrderItemSets, OrderItemSetProducts, OrderItemSetSizes.
OrderId : The RepSpark order id
BrandCode : If your company has multiple brands, populate this with an identifying string.
CancelDate : The order's cancel date
CatalogCode : An identifying string for the catalog of the order
Comments : The comments section of the order
CustomerCode : An identification code for the customer
DivisionCode : If your company has multiple divisions and division specific seasons, populate this with an identifying string.
DropShipAddress1 : The drop ship address field
DropShipAddress2 : The drop ship address field
DropShipAttn : The drop ship Attention to field
DropShipCity : The drop ship city
DropShipCountry The drop ship country
DropShipName : The drop ship name
DropShipState : The drop ship state
DropShipZip : The drop ship zip
EntryDate : The order's entry date
InHandDate : The order's in hand date
LastUpdated : Last date the order date
LastUpdatedBy : The last date
OrderDate : The order date
PriceModification : the price modification applied to an order
PricingTierCode : The order's pricing tier
PurchaseOrder : The purchase order
SalesPersonCode : The sales person code for the order
SeasonCode : an identifying string of the season
ShipViaCode : an identifying string for the ship via method
SpecialHandling : bit; orders can be sent to a queue if enabled
StartDate : order start date
StatusId : 1 submitted; the order is submitted on the RepSpark website
StoreCode : the store code on the order
TermsCode : the terms code on the order
TypeCode : the type code of the order
UserName : the user that placed the order
Order Confirmation : Once orders are received from RepSpark and processed on the ERP, you can run an order confirmation sync for those orders which will update the orders in RepSpark with a Valid status and associate them with an ERP order number
BrandCode : If your company has multiple brands, populate this with an identifying string.
ErpOrderNumber : The order number from the ERP
RepSparkOrderNumber : The RepSpark order number
Inventory Location: Pulls from the InventoryLocations table.
BrandCode : If your company has multiple brands, populate this with an identifying string.
DivisionCode : If your company has multiple divisions and division specific seasons, populate this with an identifying string.
LocationCode : An identifying string for the inventory location
LocationDescription : a description
UPC: Pulls from the UPCs table. UPCs for products.
Upc[R] : Product UPC number
ProductNumber[R] : The product number
SizeCode[R] : The size code e.g. S, M, L, XL
BrandCode : If your company has multiple brands, populate this with an identifying string.
ColorCode : an identifying string for the color of the product
GenderCode : An identifying string for the gender of the product
ProductCategoryCode : An identifying string for the product category of the product
DimensionCode : An identifying string for the dimension of the product
Order Report: Used for reporting data from the ERP. Pulls from the OrderReports, OrderItemReports, and OrderItemSizeReports tables.
Invoice Report: Used for reporting data from the ERP. Pulls from InvoiceReports, InvoiceItems, InvoiceItemSizes tables.
INSIGNIAS/EMBROIDERIES FAQ
Q: How do I limit embroideries to specific customers?
A: for each embroidery limit, it needs to be inserted into the ProductExtensions table with the element type set to CUSTOMERCODELIMIT and the value column be the customer code
Q: How do I limit embroideries to specific placements (e.g. left chest, right sleeve)?
A: for each embroidery placement, it needs to be inserted into the ProductExtensions table with the element type set to PLACEMENTLIMIT and the value column be the placement code (e.g. RS for right sleeve). Furthermore, if you want to add descriptions for each code, you can add them to the Options table with the ElementType of 'PLACEMENT'.