Sage100 Visual Integrator Conundrum

SOLVED

All,

I'll try and be concise. I am working with Sage100 2019 and Visual Integrator Jobs. We just moved up from Mas90 4.3. Whoa, I know. Here's my dilemma:

In Mas90, we had a VI job that would bring in website orders in a csv formatted file and import them into Mas. No problems. Our web host exports the orders with every item in a separate row. So one person could order 5 items and each item would be its own row, but with the same customer number. Our VI job would look at the Customer Number, create a Sales Order and only create a new Sales Order when the customer Number changed. No problem. We did this using the Next Operand in SalesOrderNo referencing CustomerNo as the Header field, and using the ChangeTo Record referencing the value of the CustomerNo field which is Column 1 in our csv file. No problem.

Now, in Sage100, I make the VI job the same way as in Mas90, but there is no longer a Record called ChangeTo and the VI job will process the file, but if there are multiple items on a single order (each in their own row), it will create a new Sales Order Number for each item, but give each Sales Order Number the same Customer Number. I cannot for the life of me get all of those items on one single order. Without the ChangeTo Record Operand, I have no idea what to do.

I have tried adding Conditions to the SalesOrderNo field, but to no avail. That's about how far I know to go.

Any suggestions? I am stuck with a capital S.

Thanks!

  • 0

    With using Next for the SO #, VI will create a new order if any of the values in an "H" column changes in the source data.

  • 0 in reply to Kevin M

    Kevin M, thank for the reply. The thing is, I may have 5 rows with an H column that is the same. for instance:

    #23176 will be the H column for 5 rows because John Smith ordered 5 items, and our web host (we use Shopify) will export the items John ordered on their own row. The H column has the same value though. VI will see that the H column is the same and the customer number will be #23176, but it will assign a brand new SO number for each item, and only the first item will have the bill and ship to info.

  • 0 in reply to j-fly

    Any change in any H field (column data) will trigger Next.  You don't get to control which fields trigger Next...

    One thought is to try adding Temp fields using the "Key Assigns Only" option, then calculating your other header fields (anything which is not 100% consistent for all rows in an order) based on these Temp fields.

    Be sure to have the Temp field listed before it's used.  Column order does matter.

  • 0 in reply to Kevin M

    Kevin M. Gave the temp fields a shot as well and to no avail. Here are some screen shots of the scenario:

    Here is my VI job:

    Here is the Source file where email address of the customer is masked. You'll notice row 2 is the first customer with one item. The next 5 rows are the same customer with 5 different items purchased at the same time. Column 1 should be my "H" column and define the CustomerNo, Then SalesOrderNo should create a new SO when the H column changes.

    But as you can see here, for Customer Number 30082 who has 5 items, her first item is separate from the remainder of the items and there are 2 different SO for the same order at the same time. Also, what you cant see here, is that the billing and shipping info for customer number 30082 only shows for the first item. How do I get both of those lines into one SO? I'm befuddled.

    Thanks again for the help!

  • 0 in reply to j-fly

    I suggest 2 things:  1)Remove the Order Date from the mapping.  It might be calculating with the time, and each line might be slightly different by seconds. If you don't map the Order Date, it will default to the current date, which looks like what you are doing anyway.  2) Make sure the Comment column (column 44 of your spreadsheet) is also the same for every row.  Since it is on the Header, if it is different, it would force a new order.  If you need a line comment, map to L.Comment instead. 

  • 0 in reply to hyanaga

    hyanaga, I tried your suggestions, but I get the same results, no matter what I do, the VI job splits up a multi item order into a header record with the customer information and then each item as a line detail. I cannot seem to make the job merge the header record and the line details so that there is one order with multiple items purchased.

  • 0 in reply to j-fly

    Did you create a brand new VI import job on the new version for this?

    We need to see your entire VI import job definition to observe for any header fields that might be pointing to a column that is changing between one item row and the next. You can either take a screenshot of each tab and repeat on tabs where you need to scroll the right list or try printing the job's definition to a PDF and attach that.

    Since you can't post the raw source file, you'll need to thoroughly examine every column referenced by an H.* field that uses the Replace operation.

    Do you have this unchecked?

    Do you have anything defined on this tab? If the above option is unchecked and the source file contains both header and detail info on the same line, the only thing you should have on this tab is a "Skip Record". but only if actually needed.

  • 0 in reply to David Speck

    I'm thinking Perform logic might be required in this situation... because a simple test still split for the rows with / without the extra details.

    Even when only setting Div / CustomerNo from the file, with the temp field being set to Key Assigns Only.

    ...and setting a File Assign value from the SO header when the Temp field is blank.

    What I thought might work... doesn't.

    Personally, I'd write a VBScript to make the file corrections to the source file before import... having done that many times in other situations (when VI doesn't play well with what's in a source file).

  • 0 in reply to Kevin M

    What you are seeing is because even temp fields using the Replace operation are used to compare current record read to prior record read to determine if a new header record is needed.

    Seeing your post and going back to review the screenshot of the source posted made me realize what is actually going on. 

    You can get around this by using the Calculated operation and in the Calculation field, set it to IMP$[x] where x is the column number. You can then conditionally set the actual header field when IMP$[x] is not blank. You can either do this on the header field or in a header temp field if you want to easily use the temp field in other calculations or conditions.

  • 0 in reply to David Speck

    David,

    OK, so I'm using CustomerNo as my header field. In that field, I set the operation to Calculated and then in the Calculation box I add IMP$[1] for my header column and then I'm stumped on the condition. How do I write out that condition? 

    Thank you all for the help. I understand why this is happening, just failing to understand how to fix it with VI.