Sample JSON Field Mapping Data

General Mappings

{
  "mapping": {
    "fields": [
      {
        "generate": "memo",
        "extract": "id"
      },
      {
        "generate": "trandate",
        "extract": "created"
      },
      {
        "generate": "location",
        "hardCodedValue": 2,
        "fieldtype": "",
        "discardIfEmpty": false
      }
    ],
    "sublist": {
      "other": [
        {
          "generate": "account",
          "hardCodedValue": 1
        },
        {
          "generate": "class",
          "hardCodedValue": 2
        },
        {
          "generate": "department",
          "hardCodedValue": 3
        },
        {
          "generate": "location",
          "hardCodedValue": 4
        }
      ]
    }
  }
}

Set Deposit Transaction Date

The JSON example below shows how to change the default configuration to map the Stripe Payout's created date to the NetSuite Bank Deposit Date. In the Payout deposit field mapping configuration, you can update the "trandate" from "created" to "arrival_date".

{
  "mapping": {
    "fields": [
      {
        "generate": "trandate",
        "extract": "arrival_date"
      }
    ]
  }
}

Set Deposit Line Level Field

The JSON example below shows how to set the class and department line level fields using sublist mapping and Stripe transaction type lookups.

NetSuite Deposit Department Field Column.png

In this particular example, the Deposit will only set Stripe Fee line level class and department values under Cash Back tab.

  • Classlookup "stripe_fee": "1" is looking at the NetSuite Class Internal ID of 1. Default is set to blank.
  • Departmentlookup "stripe_fee": "2" is looking at the NetSuite Department Internal ID of 2. Default is set to blank.
{
  "lookups": {
    "accountlookup": {
      "map": {
        "stripe_fee": 1,
        "network_cost": 1,
        "tax": 1,
        "charge": 2,
        "payment": 2,
        "refund": 2,
        "payment_refund": 2,
        "payment_failure_refund": 2,
        "variance": 3
      },
      "default": ""
    }, 
   "classlookup": {
      "map": {
        "stripe_fee": 1
      },
      "default": ""
    },
    "departmentlookup": {
      "map": {
        "stripe_fee": 3
      },
      "default": ""
    },
    "locationlookup": {
      "map": {
        "stripe_fee": 408
      },
      "default": ""
    }
  },
  "mapping": {
    "fields": [
      {
        "generate": "memo",
        "extract": "id"
      },
      {
        "generate": "trandate",
        "extract": "created"
      }
    ],
    "sublist": {
      "other": [
        {
          "generate": "account",
          "extract": "type",
          "lookupName": "accountlookup",
          "discardIfEmpty": true
        },
        {
          "generate": "class",
          "extract": "type",
          "lookupName": "classlookup"
        },
        {
          "generate": "department",
          "extract": "type",
          "lookupName": "departmentlookup"
        },
        {
          "generate": "location",
          "extract": "type",
          "lookupName": "locationlookup"
        }
      ]
    }
  }
}

Set Deposit Bank Account

The JSON example below dynamically selects the appropriate NetSuite bank account based on the Stripe payout's currency.

NetSuite Deposit Bank Account.png

In this particular example, the Deposit will use the Stripe currency to set the NetSuite Bank Account Internal ID.

{
  "lookups": {
    "accountlookup": {
      "map": {
        "usd": 1,
        "gbp": 15,
        "eur": 10
      },
      "default": ""
    },
  },
  "mapping": {
    "fields": [
      {
        "generate": "memo",
        "extract": "id"
      },
      {
        "generate": "trandate",
        "extract": "created"
      },
      {
        "generate": "account",
        "extract": "currency",
        "lookupName": "accountlookup",
        "initializeValue": true
      }
    ],
    "sublist": {
      "payment": [
        {
          "generate": "paymentamount",
          "extract": "amount"
        }
      ]
    }
  }
}

Example Stripe transaction types:

  • stripe_fee
  • charge
  • payment
  • refund
  • network_cost
  • adjustment
  • tax
  • variance
  • payment_refund
  • payment_failure_refund
Was this article helpful?
0 out of 0 found this helpful

More resources