The site needs to accomodate a customer experience rep logging into the website to enter transactions for an NEPB Customer. NEPB customers are not distributors and therefore have no access to the website and do not have sales contacts. All orders/quotes are entered by ce. Avante handles this by bypassing the Contact# prompt on all screens.
To accomodate this, we will set the CONTACT.NBR for NEPB customers to N:Customer# for the purposes of writing saved items and carts (where contact# is part of the key). But when creating quotes and sales orders, the contact# field in QUHDR.USR/SOHDR.USR will remain blank. When we establish the DATAFIELDS for an NEPB temporary Contact, we will set them as a Master User so that all searches in Order History, Saved Items, and Saved Carts will force them to search by Billto Location and not allow any searches by contact.
LDLIB RPC$CONTACT_VALIDATE (Joe - timeline 25-7):
Modify to set the contact# = N:Billto customer# for NEPB contacts:
- After the call to FIND.AVANTE.WEBINFO and before the setting of KEY: If WEBINFO.REC<1>='' (which is the contact#), set contact to "N":WEBINFO.REC<2> (which is the billto#). This must be done before the INCLUDE of CONTACT.READ
LD.INCLUDES CONTACT.READ (Joe - timeline 25-8):
When working with a temporary contact for an NEPB customer, which doesn't have a SLSCONTACT.USR record, get all info for DATAFIELDS from the customer record instead:
If the contact# in the second part of KEY starts with an "N", extract information from the billto customer to pass in DATAFIELDS as follows:
- DATAFIELDS<-1>= "FIRST.NAME=": CUSTMST<3>
- DATAFIELDS<-1>= "LAST.NAME=":
- DATAFIELDS<-1>= "ADDRESS.1=": CUSTMST<20>
- DATAFIELDS<-1>= "ADDRESS.2=": CUSTMST<21>
- DATAFIELDS<-1>= "CITY=": CUSTMST<22>
- DATAFIELDS<-1>= "STATE=": CUSTMST<23>
- DATAFIELDS<-1>= "ZIP=": CUSTMST<24>
- DATAFIELDS<-1>= "COUNTRY=": CUSTMST<50>
- DATAFIELDS<-1>= "PHONE=": CUSTMST<25>
- DATAFIELDS<-1>= "PHONE.EXT=":
- DATAFIELDS<-1>= "CELL.NBR=":
- DATAFIELDS<-1>= "EMAIL=": CUSTMST<95>
- DATAFIELDS<-1>= "FAX=": CUSTMST<47>
- DATAFIELDS<-1>= "INACTIVE=": CUSTMST.USR<75>
- DATAFIELDS<-1>= "JOB.TITLE=":
- DATAFIELDS<-1>= "JOB.FUNCTION=":
- DATAFIELDS<-1>= "SUPPRESS.EMAIL=":
- DATAFIELDS<-1>= "SUPPRESS.FAX=":
- DATAFIELDS<-1>= "DECISION.MAKER=":
- DATAFIELDS<-1>= "MAILING.LIST=": CUSTMST<17>
- DATAFIELDS<-1>= "CONTACT.MONTHLY=":
- DATAFIELDS<-1>= "WEB.PASSWORD=":
- DATAFIELDS<-1>= "AVATAR.ID=":
- DATAFIELDS<-1>= "MASTER.USER=": "1"
- DATAFIELDS<-1>= "DEFAULT.ZIP=":
- DATAFIELDS<-1>= "FLAG= ":
Testing of login:
Starting in Avante, execute /SOP9116 and start a c/e request. Use customer# 100100
Testing using Testplan - make sure that DATAFIELDS is being set correctly for the NEPB temporary contact:
- Setup a testplan executing RPC$CONTACT_GETBYID
- Set CONTACT.NBR = "N":Customer#
- Check DATAFIELDS
Quote Creation - Don't write a contact# for NEPB customer's quotes (Joe - timeline 25-9)
When creating a quote for an NEPB customer, write null to the contact# field of the quote:
- If CONTACT.NBR[1,1] = "N", write null to QUHDR.USR<6>
Stock/MOD Order Creation - Don't write a contact# for NEPB customer's orders (Wayne - timeline 25-10)
When creating a stock or MOD order for an NEPB customer, write null to the contact# field of the order:
- If CONTACT.NBR[1,1] = "N", write null to SOHDR.USR<17>
Saving a Contact - RPC$CONTACT_SAVE (Joe - timeline 25-11)
We don't want to allow a temporary NEPB contact to be saved to the database. Modify RPC$CONTACT_SAVE to return the following error info when CONTACT.NBR[1,1] = "N" and exit before any saves are done:
- SERVER.STATUS = 0
- ERR.CODE = "2D"
- ERR.MSG = "NEPB Contacts cannot be changed - Save is not allowed"