HOW TO: What's the best way to load a static lookup with a lot of items?

You'll need to format your lookup entries in JSON format. If you have it in CSV format, you can convert it to JSON using a text editor. Once you have it in JSON format, you can copy and paste it in the API request data. You should load at least one entry via the UI, so that when you look at the data via API, you can tell exactly where the remaining data needs to go.

Example:


"lookups": [
{
"name": "5f40018e0b424fea88c2ea234903fef8",
"map": {
"DebitLine_": "10100",
"Order_ItemPrice": "10200",
"Order_ItemWithheldTax",
...
},
"allowFailures": false
}
],
0

Comments

3 comments
Date Votes
  • Where do you put that code?

    0
  • Hi Jack Harris

    This is fairly old content. I'm validating this solution with someone on our team before we recommend this. I'll reach out to you here with an update. Thanks! 

    0
  • Jack Harris this is on the import itself. If you have a field that uses a static mapping, then you can use our api to put in a large amount of mappings. You can either use postman or my preference of Zangabox chrome extension. Here is a screenshot example of an import I have with a static mapping for a field. You can see there is a lookups array at the root level and then in the mapping section it references the lookupName.

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post