You are on page 1of 13

ZILLIANT DOCUMENTATION

Introduction:

Zilliant is a third-party tool which is used for by Thomson Reuters to figure out the best prices for their
products or services. It does this by analyzing a lot of information, such as customer behavior, market
trends, and competitor prices etc.

In our case it is used for discount scheme guidance. By discount scheme guidance we mean it helps the
company to analyze on what discount to offer to a customer based on their sales history it captures

Data Model:

The following files are given to Zilliant in a weekly basis to provide discounting estimates. The files are
in .csv format and the necessary columns required in every file is defined below:

1. Order - Header level transaction data; typically represented by orders or invoices - whichever is
the best record of actual sales. The columns required are.
a. OrderID- ID of an order
b. OrderDate – Date on which the order is placed.
c. CustomerId – ID of customer who placed the order.
d. SalesPersonId - ID of salesperson
e. ManagerId – ID of the manager of the salesperson
f. ManagerName - Name of the manager
g. QuoteNumber - OrderID of the order in front end (starts with a Q-)
h. Salesperson Name – Name of the salesperson
i. Distribution Channel – digital or non-digital
j. Approval Status – Status of an order
2. Order Line- Line level transaction data; typically represented by orders or invoices - whichever is
the best record of actual sales. The columns required are.
a. OrderID - ID of an order (starts from a6)
b. Order Name – Name of order
c. OrderlineitemID – ID of line Item ordered.
d. Order Line Status- Status of line item – new or renewed.
e. Productid – ID of the product
f. Quantity- Qty of line item
g. Revenue – Revenue generated from a line item.
h. List Price – Price of the product
i. Discount Amount – Discount offered.
j. Discount Type – type of discount offered.
k. Bridge Discount Length
l. Bridge Discount Percent
m. Contract Length Years - number of years in contract / subscription
n. Contract Length months – number of months in contract / subscription
o. Year1Adjustment- Increase in revenue percent for year 1
p. Year2Adjustment - Increase in revenue percent for year 2
q. Billing Frequency – Frequency of billing
r. PriceUOM
s. Contract Start Date – When did the contract started
t. PrimeryLineNum – Line Number of the line item in one order
u. Yr2Amount – Revenue generated after 2 years
v. Yr3Amount - Revenue generated after 3 years
w. Yr4Amount - Revenue generated after 4 years
x. Yr5Amount Revenue generated after 5 years
y. StartDiscountTag – Lowest Discount
z. TargetDiscountTag – Average Discount
aa. FloorDiscountTag – Highest Discount
bb. MLAAgreement
cc. Bridge Monthly Charge
dd. Bridge
ee. New Bridge Discount
ff. Contract Term – total years
3. Customer: Current attributes of the customer
a. CustomerId- ID of the customer
b. Customer Name - Name of the customer
c. SalesPersonId - Sales person assigned to the customer.
d. Customer Type - type of customer
e. Customer Category – Category of customer
f. Industry Segment - Industry classification
g. ParentCustomerId – parent customer number
h. Address - address of the customer
i. Postal Code - postal code
j. City - city
k. State - state
l. Country - country
m. SegmentLevel1 - segment level of the customer
n. SegmentLevel2 - segment level of the customer
o. SegmentLevel3 - segment level of the customer
p. IndustryLevel1 -industry level of the customer
q. IndustryLevel2 -industry level of the customer
r. IndustryLevel3 -industry level of the customer
s. OnlineAssetFlag - True or False
t. SalesOrg – sales organization
4. Product: Current attributes of the product
a. Productid - ID of the product
b. Product Description - product description
c. ProductLevel1 - levels of the product
d. ProductLevel2 - levels of the product
e. ProductLevel3 - levels of the product
f. ProductLevel4 - levels of the product
g. ProductLevel5 - levels of the product
h. Media High
i. Media Low
j. List Price -price of the product
k. Productid Type – type of product whether subscription or service based or none of
them.
5. Product Pricing:
a. SAPSubMaterialNum - Product ID of the material
b. PricingTypeDesc – description of pricing type
c. Per Seat Low - Low range of single item
d. Per Seat High - Highest range of single item
e. PerSeatCustomerGrp
f. Per Seat Price - Price of the bundle
g. Banded Low - low range of the items bought in bundles
h. Banded High - high range of the items bought in bundles
i. BandedCustomerGrp
j. Banded Price- price of the bundles
6. ProductSubtoSvcMapping:
a. SubMaterialNum - Material number of the product
b. SvcMaterialNum - Material number
7. Practice Area:
a. CustomerId
b. Customer Name
c. Practice Area
d. Number of Attorneys
e. Total Attorneys

Start – lowest.

Floor - highest.

target -middle.

Workflow:

There is a total of 6 workflows in Zilliant in which three run on UAT and three on prod. The data is
fetched from the source and fed to Zilliant on a weekly basis. Zilliant takes transaction data for all the
completed orders and generates discounts for the customer based on their sales pattern.

1. Zilliant _PLWL_DataPull_Workflow_Refactored – This is the workflow for pulling practical law


and west law data.

Views used for Order and Order Line Item:


a. FT_SALESFORCE_GSI_APTTUS_PROPOSAL_PROPOSAL_C_VW - first hierarchy of order
information five trans source order capturing system proposal information.
b. FT_SALESFORCE_GSI_APTTUS_CONFIG_2_ORDER_C_VW - order date information
c. FT_SALESFORCE_GSI_APTTUS_CONFIG_2_ORDER_LINE_ITEM_C_VW – order line-item
information
d. FT_SALESFORCE_GSI_USER_VW – sales representative information
e. FT_SALESFORCE_GSI_APTTUS_PROPOSAL_PROPOSAL_LINE_ITEM_C_VW – proposal line-
item information front end
f. FT_SALESFORCE_GSI_SOURCE_SYSTEM_DETAIL_C_VW - source system details customer
level information
g. FT_SALESFORCE_GSI_APTTUS_CONFIG_2_PRODUCT_CONFIGURATION_C_VW – product
information
h. FT_SALESFORCE_GSI_APTTUS_CONFIG_2_LINE_ITEM_C_VW – line-item information

Views used for Product:

a. PROD.SOURCE.EDW_TRDW_MATERIALDIM_VW

Views used for ProductSubToSvcMapping.csv.

a. CPD_DBO_TBLPRODUCTFORMAT
b. CPD_DBO_TBLPRODUCT

Important Notes:

i) ProposalID- starts from a4.


ii) OrderID – starts from a6.
iii) SalesPersonId – starts from 005.
iv) One Proposal can have many products.
v) FT_SALESFORCE_GSI_APTTUS_PROPOSAL_PROPOSAL_C_VW joins with
FT_SALESFORCE_GSI_APTTUS_CONFIG_2_ORDER_C_VW on ProposalID
vi) FT_SALESFORCE_GSI_APTTUS_CONFIG_2_ORDER_C_VW joins with
FT_SALESFORCE_GSI_APTTUS_CONFIG_2_ORDER_LINE_ITEM_C_VW on orderID.
vii) FT_SALESFORCE_GSI_USER_VW joins with
FT_SALESFORCE_GSI_APTTUS_PROPOSAL_PROPOSAL_C_VW on SalesPersonId
viii) FT_SALESFORCE_GSI_USER_VW self joins with itself on ManagerId and employeeid to select
manager name and representative_employee_number.
ix) FT_SALESFORCE_GSI_APTTUS_PROPOSAL_PROPOSAL_LINE_ITEM_C_VW joins with
FT_SALESFORCE_GSI_APTTUS_PROPOSAL_PROPOSAL_C_VW on ProposalID
x) FT_SALESFORCE_GSI_SOURCE_SYSTEM_DETAIL_C_VW joins with
FT_SALESFORCE_GSI_APTTUS_PROPOSAL_PROPOSAL_C_VW on SourceSystemID
xi) FT_SALESFORCE_GSI_APTTUS_CONFIG_2_PRODUCT_CONFIGURATION_C_VW joins with
FT_SALESFORCE_GSI_APTTUS_PROPOSAL_PROPOSAL_C_VW on ProposalID
xii) FT_SALESFORCE_GSI_APTTUS_CONFIG_2_LINE_ITEM_C_VW joins with
FT_SALESFORCE_GSI_APTTUS_CONFIG_2_PRODUCT_CONFIGURATION_C_VW on
productconfigurationID.

Steps

1.

In the input data we are fetching orders which have been created on and after Jan 1, 2018,
whose SAP status is completed, line item is deleted flag is set to false. After selecting the data
we use formula tool to refine few formulas such as [CONTRACT_TERM_NUMBER] to set to 0 if
empty, [CNTRACT_TERM_WHLE_YARS] to set to 0 if empty, set Distribution Channel to Digital or
non-digital depending on [APTS_IS_DIGITAL_CHANNEL_C] , [APTS_IS_DIGITAL_NEW_SALES_C]
and [TR_STORE_SOURCE_C] , calculate new revenue based on [ORDERLINESTATUS] if set to
renewed, calculate CNTRACT_TERM_WHLE_YARS by dividing [CONTRACT_TERM_NUMBER] by
12.
After applying formulas, we filter the data to remove orders which have customer id as empty.

2.
In the input data we are fetching all the product information where material_num is not null
3.

After getting the orders and product information we join the two on PROD_SUB_NUM and
MATERIAL_NUM and the left unjoined result of the above is then applied to filter tool to select
orders which have PROD_SUB_NUM as empty and PROD_SVC_NUM as non-empty. This result is
again supplied to a join tool to join with product table on PROD_SVC_NUM and MATERIAL_NUM
to join the remaining orders and select orders which have CLSFITION3_DESC value in Westlaw
and Practical Law
4. The inner join of the above result is then applied to filter tool to select orders which have
CLSFITION3_DESC value in Westlaw and Practical Law
5. The orders found in steps 3 and 4 are union-ed together and unique orders are selected based
on orderID and hence order.csv is ready.
a. In the second select statement we apply sort function to
b. In the second select statement we apply sort function to sort orders based on certain
conditions to remove null values as if 2 duplicate orders one having null values in floor
target and start values then by applying sort and then picking unique orders , the second
row containing null values will be removed

6. No
w coming to products found in step 2 we select products where product id and product
description is not null and [ProductLevel3] lies in ("CONCOURSE","FIRM CENTRAL","MONITOR
SUITE","PRACTICAL LAW AU","PRACTICAL LAW CANADA","PRACTICAL LAW CONNECT
US","PRACTICAL LAW GLOBAL","PRACTICAL LAW UK","PRACTICAL LAW US","CASE NOTEBOOK
DRAFTING ASST","CONTRACT EXPRESS","RUTTER","WEST KM","WESTLAW AU","WESTLAW
CANADA","WESTLAW HK","WESTLAW INTERNATIONAL","WESTLAW UK","WESTLAW US" and
then we select all the unique product ids
7. F
or customer view we select all the customer details such as name, id, city from
FT_SALESFORCE_GSI_SOURCE_SYSTEM_DETAIL_C_VW view where customer id is not empty.

8. W
e also select ECM (Enterprise Customer Master) data for getting all the customer information
where SOURCESYSTEM ='ENTWRP'

9.
Now we select all the customers from step 7 and step 8 and join based on CustomerId
(SourceSystemID). The inner join data is then supplied to formula tool to rename
[PARTY_TR_MARKET_SEGM_L1] as SegmentLevel1 and [PARTY_TR_MARKET_SEGM_L2] as
SegmentLevel2. Then using select tool we renamed some columns and finally selected unique
records based on CustomerId and customer.csv is ready.

10.
For input we select data such as SAPSubMaterialNum, SAPsvcmaterialnum etc. and select data
where SAPSubMaterialNum is not null, then we select where SAPFullSvcMaterialNum is not
empty, then we select where Product Format Name equals Online. Then we apply unique tool to
select all the rows with unique SAPSubMaterialNum and SAPsvcmaterialnum
11.

Now the product information from step 6 is supplied as left table and data from step 10 as right
table and are joined based on productid and SubMaterialNum. The inner join of the result is set
to have Productid Type as Subscription. The products which are not found in subtosvc mapping
table are again joined with step 10 data based on productid and SvcMaterialNum. The inner join
of the result is set to have Productid Type as Service. The data which is still not joined after this
is set to have Productid Type as Neither. These three results are then unioned together. A new
column called List Price is set to null and unique productid are finally selected and hence are
product.csv is ready.
12.

Now the orders found in step 3 where orders and product are joined on PROD_SVC_NUM and
material id and then Practical Law and Westlaw products are selected through filter are taken in
the first select statement, and orders found in step 3 without the product level3 filter are taken
in second and third select statement. For second and third select statement another filter is
applied for CLSFITION2_DESC and CLSFITION3_DESC column. From the three select statements
only PROD_SVC_NUM is selected. Then using formula tool PROD_SVC_NUM is renamed to
SubMaterialNum (new column) These three data along with the data chosen in step 10 are
union-ed together. We have chosen orders from step 3 to bring service material number of
products where submaterial number is empty. Again, we select relevant columns and pick
distinct values.
13.

Now we need to pick up orders which are not in CPD but have been captured by Order Capture
System. So, we pick up orders from step 3 which are joined on SubMaterialNum to bring them
into subtoscvmapping document based on certain filters and again they are unioned together
along with CPD data and hence our subtosvcmapping.csv is ready.
14.

In this container we remove all the null discounts if duplicates are found on primary key. We
select all the orders from step 3 and apply tile to select unique values based on orderID,
orderlineitemID, productid. Then we group by records on these columns and select where count
is greater than 1.
a. Now we take these records as left table and all records without group by as right table
and join on tile num.
b. The inner join of step (a) is grouped by tile num, and minimum discount amount is
selected.
c. We then filter records where discount amount is not null. These records are passed as
left table and the inner join result of step (a) as right table.
d. The inner join result is selected where discount amount is not null and unique values
are picked.
e. Now records where discount amount is null from step(b) are picked and given as left
table and inner join of step (a) as right table unique values are picked.
f. Now records from step (d), (e) and right unjoined result of step (a) are unioned together.
g. Now we rename [START_PRICE] as StartDiscountTag, [TARGET_PRICE] as
TargetDiscountTag and [FLOOR_PRICE] as FloorDiscountTag.
15.

Now we need to remove the discrepancy in the discount, list price and revenue. The discrepancy
has arised due to few renewals orders whose revenue is greater than 0 and MLAAgreement is
not null. Now we take all the order line items selected in step 14 and all the orders selected in
step 3. Those orders which are not in discrepancy filter are bypassed through false output and
simply unioned at the last.
16. The orders which lie in this filter are joined with orders found in step 3. The inner join result is
supplied to a join with new data source to get MLAAgreement Number to be used in join. This
data source is supplied as right table to the join.
a. The orders which left unjoined i.e. are not present in the
EDW_TRDW_MATERIALDIM_VW view are bypassed and will be unioned at the last
b. The orders which are in the inner join are now passed through a formula tool to correct
their order date format and then supplied as left table to the join
i. From a new data source select customers where order month is greater than
equal to January 2019
ii. Join this data with step (b) on basis of order item, order document number and
order month
17. The left unjoined and inner join of step (b.ii) are again joined based on order id and lineitemid
and finally unique order items are selected and unioned at the last
18. The inner join of step (b.ii) is now grouped by based on MLAAgreement to get sum od monthly
price and retail price which is then supplied as right join and unique records are also selected
from step (b.ii) which are supplied as left join and are joined based on MLAAgreement Number.
a. The inner join of step 19 is selected, and the final list price is calculated. The unique
records are then selected and unioned at the last
19. Now all the records are selected from step 15), step 16.a), step 17), step 18.a) are unioned
together and finally unique columns are selected to create orderlineitem.csv
20.

Select SAPSubMaterialNum, SAPsvcmaterialnum, bandprice etc. where product description is set


to Available and cleaned the data to remove null values and blank spaces. Now select all the
values where either SAPSubMaterialNum or SAPsvcmaterialnum is not null and selected all the
unique values. We then again cleaned the data and applied formula tool to introduce new
column Filter_unwanted based on certain columns. We selected where Filter_unwanted is
greater than 0, SAPSubMaterialNum is not empty, PricingTypeDesc is not equal to default Pricing
Model. After applying all the filters ProductPricing.csv is ready
21.

Now through a static csv file called Leopard_Data_June2020.csv we create the above csv. First
select all the data and group by based on SAP_CUSTOMER_ID, TOT_FIRM_NAME,
PRACTICE_AREA_1 and count LEOPARD_ATTY_ID and pass as left table for the join. Also
summarize the csv file based on SAP_CUSTOMER_ID and count LEOPARD_ATTY_ID and pass as
right table for the join. The inner join result is then filtered to select where Practice Area is not
null PracticeArea.csv is ready.

Second Workflow: Zilliant HRC_Datapull_Workflow


In this workflow we are only building order.csv, orderlineitem.csv and product.csv
as only these three changes based on the products. It is similar to the upper
workflow with some minor changes.
1. We are picking only those products where productlevel2 is in HighQ, Clear
and Risk Solutions and building the required three files.
2. While picking the initial orders from product file we are filtering out few
records and then taking only required product ids

3. We are picking
up those customers those country is US when joining (inner join) Customers when order capture
data

4. In this we are
picking orders based on some filter conditions based on certain product level columns

Third Workflow: Zilliant_OS_Datapull_Workflow_Refactored

This workflow is for the OneSource data which is also similar to PL_WL workflow and we only need to
create order.csv, orderlineitem.csv and product.csv.

Here are the changes which are made in this workflow:


1. We are picking
certain product ids based on a static product id which are to be excluded and not picking up
products where clsfition4_desc is equal to direct tax prof scvs.
2. Here also we are picking up products where country is US as we did for HRC products workflow.

Deployment

Here are the steps required for the deployment:

1. Browse through the Thomson Reuters gallery and pick the required workflow.
2. Do the necessary changes.
3. Save the workflow again on the TR gallery.
4. Zilliant will automatically run the workflow on the weekend.

Data Refresh:

The data is refreshed in a full load model to capture the changes made for any product, order etc.

You might also like