Does Amazon provides customer phone through MWS - amazon-web-services

We have developed a simple application to retrieve orders for one of our customer. Our customer is a register sellers on amazon market place.
We are able to fetch the orders. Along with the orders info our client is asking for phone number of the customer. Amazon order do have a field called 'Phone' but we are always getting NULL value.
Actually does amazon expose customer phone number? If yes, how we can get that info?
Thanks.

There are multiple ways to retrieve order information through Amazon MWS. If you use the XML OrderReport format, you'll receive both buyer and delivery phone number as part of the XML data:
<Message>
<MessageID>1</MessageID>
<OrderReport>
<AmazonOrderID>...</AmazonOrderID>
...
<BillingData>
...
<BuyerPhoneNumber>123-456 7890</BuyerPhoneNumber>
</BillingData>
<FulfillmentData>
...
<Address>
...
<PhoneNumber>123-456 7890</PhoneNumber>
</Address>
</FulfillmentData>
</OrderReport>
</Message>

As of today the Phone number is given in ShippingAdress when retrieving orders.

Related

NetSuite REST API with Postman: Record not found while using Suiteql

I'm trying to query some records like vendor and customer using suiteql with REST API using Postman.
The issue is that it return everytime the same error:
"Invalid search query. Detailed unprocessed description follows. Search error occurred: Record 'customer' was not found."
I tried:
differents syntax like Customer, CUSTOMER, customers, Customers, CUSTOMERS
but no change.
I added customer access to the role.
Is there something to activate while using suiteql with rest api?
Can you first try with select * from customer and see if any results are returned and then go on appending your conditions like date created greater than this year start
SELECT id, companyname, email, datecreated
FROM customer
WHERE datecreated >= BUILTIN.RELATIVE_RANGES('TFY', 'START')
AND datecreated <= BUILTIN.RELATIVE_RANGES('TFY', 'END');
NetSuite doesn't say it but for a record to be searchable, the user needs to have the following permissions:
Transactions:
Find Transaction
All the records needed
Lists:
Perform search
All the records needed
Setup:
REST WEB Services
Log in using Access Tokens or Oauth 2.0
Reports:
SuiteAnalytics WorkBook

WSO2 IS - Enable Mobile Number Verification when number is updated

We are trying to use the Mobile Number verification on Mobile number update with WSO2 Identity Server (v5.11.0) as per this guide, while the SMS OTP is being sent, it is being sent to the old mobile number.
Example:
User with mobile number 111111
We are sending the request to the SCIM2.0 API https://hostname/scim2/Me to update the mobile number with the following request:
{
"schemas":[
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
],
"Operations":[
{
"op":"replace",
"value":{
"phoneNumbers":[
{
"type":"mobile",
"value":"222222"
}
],
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User":{
"verifyMobile":true
}
}
}
]
}
The SMS OTP is being sent to the old mobile number (111111) instead of the new one (222222)
The guide clearly states:
When a user updates their mobile number in the user profile, an SMS OTP is sent to the new mobile number.
Is there another way to configure that functionality, are we missing a step ? or should the request be modified for us to have the correct behavior?
PS: The server is configured as per the guide
Looks like in the sample event publisher, the number to which the SMS is sent is defined as "to"={{mobile}}. This will pick the existing mobile number persisted under the claim http://wso2.org/claims/mobile. Change that value as to"={{send-to}}. Then it will send the SMS to the verification pending mobile number. The updated sample event publisher should be as follows.
<?xml version="1.0" encoding="UTF-8"?>
<eventPublisher name="HTTPOutputEventAdapter" processing="enable"
statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventpublisher">
<from streamName="id_gov_sms_notify_stream" version="1.0.0"/>
<mapping customMapping="enable" type="json">
<inline>{"api_key"="xxxxxx",
"api_secret"="xxxxxxxx",
"from"="NEXMO",
"to"={{send-to}},
"text"={{body}}
}</inline>
</mapping>
<to eventAdapterType="http">
<property name="http.client.method">httpPost</property>
<property name="http.url">https://rest.nexmo.com/sms/json</property>
</to>
</eventPublisher>

OTRS fetch info from url

I've OTRS 5 working fine . I need to retrieve information from web
for example I received emails from support team they put in the subject (customer ID) I need to put in the body message of the Ticket the customer information based on Customer ID which will fetch it from another local system through Url e.x "skldfj.com/dslkde.php?id=23487893"
for example I received ticket in subject: customer 23487893 have issue
in body need to be something like
hello team this customer (ID 23487893) have issue
customer info (fetch it from skldfj.com/dslkde.php?id=23487893)
name
telephone and more

Sitecore ECM op-tin and opt-out roles dates

I want to know is there any way to get user subscrition / unsubscrition to email campaign ?
Is it saved in one of databases/tables in MSSQL ?
If you use the approach with opting in and out being determined on the fact if user is in role, then it is stored in the aspnet_UsersInRoles table in your core database. This table does not keep the information when role was assigned to the user. That's why you cannot get information when user subscribed or unsubscribed to email campaign.
The only thing you can check is if user is in the role:
user.IsInRole(roleName)
The user's subscription is driven by the users role, but It is possible to get the users subscriptions in ECM, You just have to use the api.
You can get the contact from the email address:
string fullName = commonDomain + "\\" + Util.AddressToUserName(username);
var contact = Contact.FromName(fullName);
var subscriptions = contact.GetSubscriptions();
Once you have a contact you can call the GetSubscriptions() method which will return the recipient lists the user is signed up to. There are a host of other methods you can call on a contact and if there is a a way to get the date unsubscribed/subscribed it will be here.
If not reflect Sitecore.EmailCampaign.dll and keep looking! There might be some extra information in the automation states table in the Analytics database. More info on automation state here:
https://www.sitecore.net/learn/blogs/technical-blogs/sitecore-magnified/posts/2013/09/ecm-automation-states-magic.aspx
Also noticed there is a method GetUnsubscribersStatistics on the Sitecore.Modules.EmailCampaign.Core.Analytics.AnalyticsHelper class. This will have the date of unsubscription.

IN clause usage in WSO2 DSS

I'm facing wso2 data service problem with simple query.
Expected query:
I want to use IN clause with multiple value. This is my sample query:
SELECT ORGANIZATION_ID, ORGANIZATION_NAME FROM ORGANIZATION WHERE ORGANIZATION_ID IN (?)
ORDER BY ORGANIZATION_NAME ASC
Getting error:
When i try web service using "1,2,3" value, i get javax.xml.stream.XMLStreamException error.
How can i write above query in WSO2 DSS?
Please advice me on that.
Thanks,
Eba
Refer the following data service query configuration which contains a sample input parameter of type "ARRAY" which you can effectively use to get your requirement fulfilled.
<query id="setSalaryForEmployeesQuery" useConfig="default">
<sql>update Employees set salary=:salary where employeeNumber in (:employeeNumbers)</sql>
<param name="salary" ordinal="1" paramType="SCALAR" sqlType="DOUBLE" type="IN"/>
<param name="employeeNumbers" ordinal="2" paramType="ARRAY" sqlType="INTEGER" type="IN"/>
</query>
There, if you refer the input mapping configuration named "employeeNumbers", it basically addresses the same requirement mentioned in your query.
To try this functionality, you can use the "tryIt" functionality provided with each data service(similar to other service types) and the data service request format corresponding to the aforementioned configuration would look like what's depicted below.
<p:setSalaryForEmployees xmlns:p="http://ws.wso2.org/dataservice/samples/rdbms_sample">
<!--Exactly 1 occurrence-->
<xs:salary xmlns:xs="http://ws.wso2.org/dataservice/samples/rdbms_sample">1000</xs:salary>
<!--1 or more occurrences-->
<xs:employeeNumbers xmlns:xs="http://ws.wso2.org/dataservice/samples/rdbms_sample">1011</xs:employeeNumbers>
<xs:employeeNumbers xmlns:xs="http://ws.wso2.org/dataservice/samples/rdbms_sample">1022</xs:employeeNumbers>
</p:setSalaryForEmployees>
The complete data service configuration which contains the above configuration snippet can be located in the "DSS_HOME/sample/dbs/rdbms/RDBMSSample.dbs" which resides in DSS product archive.