elasticio / sugarcrm-component

SugarCRM component for elastic.io platform
Apache License 2.0
1 stars 6 forks source link

Action / Upsert Account field postal address is limited to 20 characters #27

Closed khanzadyan closed 5 years ago

khanzadyan commented 5 years ago

When the customer wants to use a JSONata expression in the field like billing_address_postalcode in Action Upsert Account the field limitation 20 characters hinders the proper mapping.

sugar-upsert

Confirmed by support.

Input structure looks like:

{
  "group_code": "General",
  "disable_auto_group_change": 0,
  "addresses": [
    {
      "default_billing": true,
      "default_shipping": true,
      "lastname": "Meier",
      "firstname": "Markus",
      "city": "Essen",
      "postcode": "45130",
      "telephone": "0201 / 87 26 40",
      "company": "Markus Meier GmbH",
      "street": [
        {
          "name": "str"
        },
        {
          "name": "str"
        }
      ],
      "country_id": "DE",
      "region_id": 88,
      "region": {
        "region_id": 88,
        "region": "alkjdslakdj",
        "region_code": "NRW"
      },
      "customer_id": 7,
      "id": 6
    }
  ],
  "website_id": 1,
  "store_id": 1,
  "lastname": "Meier",
  "firstname": "Markus",
  "email": "email@example.com",
  "created_in": "Default Store View",
  "updated_at": "2019-04-04 10:27:25",
  "created_at": "2019-04-04 10:26:24",
  "default_shipping": "6",
  "default_billing": "6",
  "group_id": 1,
  "id": 7
}
jhorbulyk commented 5 years ago

I would argue that this is more of a platform problem than a component problem: https://github.com/elasticio/frontend/issues/3291 However, we could tweak the component to produce less rich JSONSchema.

khanzadyan commented 5 years ago

@jhorbulyk most likely a relic of old mapping approach.

zubairov commented 5 years ago

It’s a platform problem. Validation is broken

jhorbulyk commented 5 years ago

Line to comment out is here: https://github.com/elasticio/sugarcrm-component/blob/master/lib/sugarcrm.js#L261

A3a3e1 commented 5 years ago

An estimated number is changed because of lack of a test account. Here we have 2 options to solve:

  1. Request free 7-days trial account
  2. Ask @juhrmacher to provide as with MVISE account access