WEBEmailInsert

 

WEBEmailInsert

Initial Build 2008.01
xWeb Web Method
Response Type XML results


The WEBEmailInsert web method inserts a new e-mail address for a customer.

Parameters

The request contains the following required parameter:

Name Type Occurs Description
oFacadeObject CustomerEmailType 0(R)..1  

 

Response

CustomerEmailType—The response returns the newly inserted email address with additional data such as the primary key.

Sample Request

If you omit the <eml_primary> field for a customer who has no email addresses, then the email you insert will not be made primary. Therefore if you are adding a customer's first and only email address, you should set this property to 1.

If you are adding a secondary email address, then set <eml_primary> to 0 or do not supply this property. If you want to make the email be primary, then set the property to 1.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.avectra.com/2005/">
<soapenv:Header>
<ns:AuthorizationToken>
<ns:Token>***************</ns:Token>
</ns:AuthorizationToken>
</soapenv:Header>
<soapenv:Body>
<ns:WEBEmailInsert>
<ns:oFacadeObject>
<ns:Email>
<ns:eml_address>hello@aol.com</ns:eml_address>
<ns:eml_cst_key>d139abf3-2a5e-4ee2-ac4b-a33ee1c16c33</ns:eml_cst_key>
<!-- typically this is "business" or "personal" -->
<ns:eml_type>personal</ns:eml_type>
<!-- set to "1" to make it primary; else set to "0" or leave it out -->
<ns:eml_primary>1</ns:eml_primary>
</ns:Email>
</ns:oFacadeObject>
</ns:WEBEmailInsert>
</soapenv:Body>
</soapenv:Envelope>

Sample Response

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<AuthorizationToken xmlns="http://www.avectra.com/2005/">
<Token>01715f20-66da-4c08-bc7a-ac7c40069ea6</Token>
</AuthorizationToken>
</soap:Header>
<soap:Body>
<WEBEmailInsertResponse xmlns="http://www.avectra.com/2005/">
<WEBEmailInsertResult>
<CurrentKey>f97f3682-6775-4f0c-9211-ea851cbd9bca</CurrentKey>
<Email>
<eml_key>f97f3682-6775-4f0c-9211-ea851cbd9bca</eml_key>
<eml_address>hello@aol.com</eml_address>
<eml_cst_key>d139abf3-2a5e-4ee2-ac4b-a33ee1c16c33</eml_cst_key>
<eml_type>personal</eml_type>
<eml_add_user>dhopkins</eml_add_user>
<eml_add_date>2013-12-20T14:12:55-05:00</eml_add_date>
<eml_delete_flag>0</eml_delete_flag>
<eml_key_ext>f97f3682-6775-4f0c-9211-ea851cbd9bca</eml_key_ext>
<eml_invalid_flag>0</eml_invalid_flag>
<eml_unlisted_flag>0</eml_unlisted_flag>
<eml_primary>1</eml_primary>
</Email>
<Customer>
<cst_key>d139abf3-2a5e-4ee2-ac4b-a33ee1c16c33</cst_key>
<cst_type>Individual</cst_type>
<cst_name_cp>Kindividual4 Lfirst4</cst_name_cp>
<cst_sort_name_dn>Lfirst4 Kindividual4</cst_sort_name_dn>
<cst_ind_full_name_dn>Kindividual4 Lfirst4</cst_ind_full_name_dn>
<cst_add_date>2013-04-05T00:00:00-04:00</cst_add_date>
<cst_add_user>klaiz</cst_add_user>
<cst_change_date>2013-12-20T00:00:00-05:00</cst_change_date>
<cst_change_user>dhopkins</cst_change_user>
<cst_delete_flag>0</cst_delete_flag>
<cst_recno>99875</cst_recno>
<cst_id>000099875I</cst_id>
<cst_key_ext>d139abf3-2a5e-4ee2-ac4b-a33ee1c16c33</cst_key_ext>
<cst_email_text_only>0</cst_email_text_only>
<cst_src_code>KLPROSPECTLIST</cst_src_code>
<cst_tax_exempt_flag>0</cst_tax_exempt_flag>
<cst_cxa_key>a608fcb1-6a7a-4251-8aaa-2703ee6b7a49</cst_cxa_key>
<cst_no_email_flag>0</cst_no_email_flag>
<cst_eml_address_dn>hello@aol.com</cst_eml_address_dn>
<cst_eml_key>f97f3682-6775-4f0c-9211-ea851cbd9bca</cst_eml_key>
<cst_no_phone_flag>0</cst_no_phone_flag>
<cst_no_fax_flag>0</cst_no_fax_flag>
<cst_no_web_flag>0</cst_no_web_flag>
<cst_member_flag>0</cst_member_flag>
<cst_no_msg_flag>0</cst_no_msg_flag>
<cst_no_mail_flag>0</cst_no_mail_flag>
<cst_web_force_password_change>0</cst_web_force_password_change>
<cst_web_login_disabled_flag>0</cst_web_login_disabled_flag>
<cst_credit_hold_flag>0</cst_credit_hold_flag>
<cst_web_forgot_password_status>0</cst_web_forgot_password_status>
<cst_no_publish_flag>0</cst_no_publish_flag>
<cst_salutation_1>Kindividual4  Lfirst4</cst_salutation_1>
<cst_salutation_2></cst_salutation_2>
<cst_default_recognize_as>Kindividual4  Lfirst4</cst_default_recognize_as>
<cst_score>1.2000</cst_score>
<cst_score_normalized>25</cst_score_normalized>
<cst_score_trend>3</cst_score_trend>
<cst_exclude_from_social_flag>0</cst_exclude_from_social_flag>
</Customer>
</WEBEmailInsertResult>
</WEBEmailInsertResponse>
</soap:Body>
</soap:Envelope>

 

JSON Method

Insert a new email address for a customer.

See result from WEBEmailGet for all possible fields in the insert call.

 

GET n/a

POST /xweb/JSON/WEBEmailInsert


DATA: JSON
{
    "WEBEmailInsert": {
            "oFacadeObject": {
                "CurrentKey": null,
                "Email": {
                    "eml_address": "LizaGrimshaw_TEST@otitest.com",
                    "eml_cst_key": "3ebe2b51-7f16-4ada-af2e-401425a45a24",
                    "eml_type": "business",
                    "eml_primary": "0"
                }
          }
     }
}

SAMPLE RESULT
HTTP STATUS: 200
DATA: JSON{
    "CustomerEmailType": {
        "CurrentKey": "76578e32-e245-4759-95fd-f3a174b28106",
        "Email": {
            "eml_key": "76578e32-e245-4759-95fd-f3a174b28106",
            "eml_address": "LizaGrimshaw_TEST@otitest.com",
            "eml_cst_key": "3ebe2b51-7f16-4ada-af2e-401425a45a24",
            "eml_type": "business",
            "eml_add_user": "jwatts",
            "eml_add_date": "2020-04-06T11:44:10-05:00",
            "eml_delete_flag": "0",
            "eml_key_ext": "76578e32-e245-4759-95fd-f3a174b28106",
            "eml_invalid_flag": "0",
            "eml_unlisted_flag": "0",
            "eml_primary": "0"
        },
        "Customer": {
            "cst_key": "3ebe2b51-7f16-4ada-af2e-401425a45a24",
            "cst_type": "Individual",
            "cst_name_cp": "Mrs. Liza Grimshaw, CPPB, VCO, VCA",
            "cst_sort_name_dn": "Grimshaw Liza",
            "cst_ind_full_name_dn": "Mrs. Liza Grimshaw, CPPB, VCO, VCA",
            "cst_org_name_dn": "Medical University of South Carolina",
            "cst_ixo_title_dn": "Supplier and Contracts Specialist ",
            "cst_add_date": "2013-02-18T10:40:00-06:00",
            "cst_add_user": "web:test@otitest.com",
            "cst_change_date": "2020-04-04T23:25:00-05:00",
            "cst_change_user": "jwatts",
            "cst_delete_flag": "0",
            "cst_recno": "109884",
            "cst_id": "000109884I",
            "cst_key_ext": "3ebe2b51-7f16-4ada-af2e-401425a45a24",
            "cst_email_text_only": "0",
            "cst_tax_exempt_flag": "0",
            "cst_cxa_key": "26ff8bc6-26c4-4177-8417-54b81a1b0ffb",
            "cst_no_email_flag": "0",
            "cst_eml_address_dn": "LizaGrimshaw3@otitest.com",
            "cst_eml_key": "46538194-e963-4ffa-8c99-571e79594015",
            "cst_no_phone_flag": "0",
            "cst_phn_number_complete_dn": "843-792-8148",
            "cst_cph_key": "de5f4824-b2cd-4ada-8334-03fde63894c3",
            "cst_no_fax_flag": "0",
            "cst_ixo_key": "b65f04bb-1f8b-4602-b9cb-465f848a45ed",
            "cst_no_web_flag": "0",
            "cst_member_flag": "0",
            "cst_no_msg_flag": "0",
            "cst_web_login": "LizaGrimshaw3@otitest.com",
            "cst_web_password": "fc5c60e877f0a5cd69d7a0c48720bd4",
            "cst_no_mail_flag": "0",
            "cst_web_force_password_change": "0",
            "cst_web_login_disabled_flag": "0",
            "cst_credit_hold_flag": "0",
            "cst_web_forgot_password_status": "0",
            "cst_last_email_date": "2019-12-13T00:00:00-06:00",
            "cst_no_publish_flag": "0",
            "cst_salutation_1": "Mrs.. Liza Grimshaw CPPB, VCO, VCA",
            "cst_salutation_2": "",
            "cst_default_recognize_as": "Mrs.. Liza Grimshaw CPPB, VCO, VCA",
            "cst_exclude_from_social_flag": "0"
        }
    }
}

 

Was this article helpful?
0 out of 0 found this helpful