InsertCustomerAction
| Initial Build | 2011.01 |
| xWeb | Web Method |
| Response Type | string (guid) |
The InsertCustomerAction web method inserts a Customer Action.
Parameters
| Name | Type | Occurs | Description |
|---|---|---|---|
| actionCustomerKey | guid | 1..1 | The customer key. |
| action | string | 0..1 | A description of the Action (up to 100 characters). |
| actionTypeKey | guid | 1..1 | The key of the Action Type code. You can get these from GetActionTypeList. |
| source | string | 0..1 | The source (up to 100 characters). |
| actionDate | dateTime | 1..1 | The DateTime that action occurred. In most cases, the time portion can be blank. |
| actionSubtypeList | List<guid> | 0..1 | A list of guids for any Action Sub-Type code for this particular action. You can get these from GetActionSubTypeList. |
Response
Guid of the inserted Customer Action key.
Sample Request
With actionSubtypes:
<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:InsertCustomerAction>
<ns:actionCustomerKey>abb95afb-3896-448e-a206-3a6cbc9b63c9</ns:actionCustomerKey>
<ns:action>Signed a petition</ns:action>
<ns:actionTypeKey>909B5D5B-B451-449B-A539-547653322849</ns:actionTypeKey>
<ns:source>source code</ns:source>
<ns:actionDate>2011-12-22</ns:actionDate>
<ns:actionSubtypeList>
<ns:guid>AA904587-991C-4276-AAF3-3C33B4867735</ns:guid>
<ns:guid>EF3355F8-EFC8-4346-A7E8-5D4824E2850C</ns:guid>
</ns:actionSubtypeList>
</ns:InsertCustomerAction>
</soapenv:Body>
</soapenv:Envelope>
Without actionSubtypes:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.avectra.com/2005/">
<soapenv:Header>
<ns:AuthorizationToken>
<ns:Token>dhopkins;darryl</ns:Token>
</ns:AuthorizationToken>
</soapenv:Header>
<soapenv:Body>
<ns:InsertCustomerAction>
<ns:actionCustomerKey>abb95afb-3896-448e-a206-3a6cbc9b63c9</ns:actionCustomerKey>
<ns:action>Signed a petition3</ns:action>
<ns:actionTypeKey>909B5D5B-B451-449B-A539-547653322849</ns:actionTypeKey>
<ns:source>source code2</ns:source>
<ns:actionDate>2011-12-22T14:02:05.000</ns:actionDate>
<ns:actionSubtypeList>
</ns:actionSubtypeList>
</ns:InsertCustomerAction>
</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>95e58246-b786-4439-a619-cf586e816d77</Token>
</AuthorizationToken>
</soap:Header>
<soap:Body>
<InsertCustomerActionResponse xmlns="http://www.avectra.com/2005/">
<InsertCustomerActionResult>215929d3-5ed8-479d-ae08-3360f36a5f38</InsertCustomerActionResult>
</InsertCustomerActionResponse>
</soap:Body>
</soap:Envelope>
JSON Method
POST /xWeb/JSON/InsertCustomerAction
DATA: JSON
{
"InsertCustomerAction" : {
"actionCustomerKey" : "{{indCstKeySample}}",
"action" : "Testing xWebJSON InsertCustomerAction",
"actionTypeKey" : "{{catKey}}",
"source" : "xWebJSON Postman test",
"actionDate" : "{{today}}",
"actionSubtypeList" : []
}
}
SAMPLE RESULT
HTTP STATUS: 200
DATA: JSON
"dfb367e0-5293-486e-870b-f15b95dcb7c9"